Skip to content

[CI ONLY — DO NOT MERGE] Trigger matrix on drop-python-dateutil#2

Closed
splch wants to merge 4 commits into
mainfrom
drop-python-dateutil
Closed

[CI ONLY — DO NOT MERGE] Trigger matrix on drop-python-dateutil#2
splch wants to merge 4 commits into
mainfrom
drop-python-dateutil

Conversation

@splch
Copy link
Copy Markdown
Owner

@splch splch commented May 27, 2026

Temporary intra-fork PR to fire the Run Checks matrix (Python 3.10-3.14 × Linux/macOS/Windows) on the latest head of drop-python-dateutil (f3ea270).

Fork main was synced to upstream main (eeda8c5) immediately before opening this, so the diff matches upstream PR openapi-generators#1429 byte-for-byte (38 files, 4 commits).

Will be closed as soon as CI finishes — do not merge.

splch added 4 commits April 24, 2026 11:10
Drop the python-dateutil dependency from both the generator and all
generated client code. Date/datetime parsing now uses the stdlib:

- datetime fields: datetime.datetime.fromisoformat(v.replace("Z", "+00:00"))
- date fields: datetime.date.fromisoformat(v)

The .replace("Z", "+00:00") call is needed because Python 3.10's
fromisoformat() does not accept the Z timezone suffix (added in 3.11).
It is a no-op on strings that do not contain Z.

Default values in OpenAPI specs are normalized at generation time
(Z replaced with +00:00), so the generated default expressions are
clean datetime.datetime.fromisoformat("...") calls without the
replace.

This removes one runtime dependency from every generated client
package, reducing install size and eliminating a dependency that is
in maintenance-only mode upstream.
Make the .replace("Z", "+00:00") workaround discoverable by both
`rg TODO` and `rg "3.10|py3.10"` so it can be cleanly removed
when the project drops Python 3.10 support.
Brings in 8 commits since the PR opened, notably:
  - typer constraint bump to <0.27
  - uv_build 0.11 template update
  - mypy v2 cast cleanup in generated output

Conflict resolution:
  - pdm.lock, integration-tests/pdm.lock: regenerated via 'pdm lock'
    against the merged pyproject.toml.
  - Golden records: regenerated via 'pdm run regen' to absorb the
    mypy-cast cleanup; the dateutil -> fromisoformat change from this
    branch is preserved.

Verified locally with ruff check, ruff format --check, mypy, and the
unit-test suite (283 passed, 4 skipped).
The minimal lockfiles were previously regenerated without
'-S direct_minimal_versions', so direct dependencies were locked
to highest-compatible versions instead of lowest. That defeats the
point of the test_min_deps CI job, which exists to verify the
declared lower bounds in pyproject.toml still work.

Re-locked both pdm.minimal.lock files using:
    pdm lock -S direct_minimal_versions -L pdm.minimal.lock

Strategy marker confirmed as
["direct_minimal_versions", "inherit_metadata"] in the metadata
of both files. python-dateutil is absent (this branch's main change).
@splch splch closed this May 27, 2026
@splch splch reopened this May 27, 2026
@splch
Copy link
Copy Markdown
Owner Author

splch commented May 27, 2026

Diagnosis complete. The two macOS failures are an upstream click-dep regression (typer 0.26 vendors click; end_to_end_tests/functional_tests/helpers.py still imports click.testing.Result but click is no longer in pdm.lock). test_min_deps (×3) and integration tests (×2) — the actual signal for PR openapi-generators#1429 — all passed. Not closing in error; the PR is unrelated to the failures.

@splch splch closed this May 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant