Repository navigation
Update httpx2 and datamodel-code-generator - #3645
Conversation
There was a problem hiding this comment.
I reviewed this PR and found no bugs; because the generator jumps seven minor versions and I could not run the codegen reproducibility check locally, the CI gen_surface_types.py --check result is the one thing worth a human confirming before merge.
What was reviewed:
- Only the dev-only
codegenexact pin moves (pyproject.toml line 113); the runtimehttpx2>=2.10.0floor is unchanged and the 2.12.0 lock resolution stays within it, consistent with DEPENDENCY_POLICY. - uv.lock entries, hashes, and the
requires-devspecifier all match the new pin. - Checked whether the new
black/isortemscripten markers could change generated output: no, the script strips the generator header and re-formats withruff format, so only semantic generator changes could cause drift.
Extended reasoning...
The change is a Dependabot bump touching only pyproject.toml and uv.lock: the codegen dev group's exact pin goes from datamodel-code-generator 0.57.0 to 0.64.0, and the locked (not floored) versions of httpx2 and httpcore2 move from 2.10.0 to 2.12.0. No source code, runtime dependency floors, or security-sensitive surface (auth, crypto, data handling) is touched, and no CODEOWNERS file exists. Approval was withheld only because the merge gate for this bump is whether the new generator still reproduces the committed surface types under scripts/gen_surface_types.py --check, and that command could not be executed in this review environment, so it rests on CI rather than on a result I observed. The hunt exited on dry_streak with no findings.
Bumps the python-security group with 2 updates in the / directory: [datamodel-code-generator](https://github.com/datamodel-code-generator/datamodel-code-generator) and [httpx2](https://github.com/pydantic/httpx2). Updates `datamodel-code-generator` from 0.57.0 to 0.81.0 - [Release notes](https://github.com/datamodel-code-generator/datamodel-code-generator/releases) - [Changelog](https://github.com/datamodel-code-generator/datamodel-code-generator/blob/main/CHANGELOG.md) - [Commits](datamodel-code-generator/datamodel-code-generator@0.57.0...0.81.0) Updates `httpx2` from 2.10.0 to 2.12.0 - [Release notes](https://github.com/pydantic/httpx2/releases) - [Changelog](https://github.com/pydantic/httpx2/blob/main/src/httpx2/CHANGELOG.md) - [Commits](pydantic/httpx2@v2.10.0...v2.12.0) --- updated-dependencies: - dependency-name: datamodel-code-generator dependency-version: 0.64.0 dependency-type: direct:development dependency-group: python-security - dependency-name: httpx2 dependency-version: 2.12.0 dependency-type: direct:production dependency-group: python-security ... Signed-off-by: dependabot[bot] <support@github.com>
a1c04f7 to
3cf0fee
Compare
Bumps the python-security group with 2 updates in the / directory: [datamodel-code-generator](https://github.com/datamodel-code-generator/datamodel-code-generator) and [httpx2](https://github.com/pydantic/httpx2). Updates `datamodel-code-generator` from 0.57.0 to 0.81.0 - [Release notes](https://github.com/datamodel-code-generator/datamodel-code-generator/releases) - [Changelog](https://github.com/datamodel-code-generator/datamodel-code-generator/blob/main/CHANGELOG.md) - [Commits](datamodel-code-generator/datamodel-code-generator@0.57.0...0.81.0) Updates `httpx2` from 2.10.0 to 2.12.0 - [Release notes](https://github.com/pydantic/httpx2/releases) - [Changelog](https://github.com/pydantic/httpx2/blob/main/src/httpx2/CHANGELOG.md) - [Commits](pydantic/httpx2@v2.10.0...v2.12.0) --- updated-dependencies: - dependency-name: datamodel-code-generator dependency-version: 0.64.0 dependency-type: direct:development dependency-group: python-security - dependency-name: httpx2 dependency-version: 2.12.0 dependency-type: direct:production dependency-group: python-security ... Signed-off-by: dependabot[bot] <support@github.com>
3cf0fee to
054906a
Compare
…6c75412a' into codex/update-pr-3645
📚 Documentation preview
|
There was a problem hiding this comment.
LGTM — the surface modules are now regenerated with the new pin, which addresses the earlier inline note, and the rest is a mechanical dev-group/lockfile bump.
What was reviewed:
- The
__annotations__ = {"__pydantic_extra__": ...}blocks the new generator inserts on the open classes: checked whether they shadow the fields declared below them on 3.14+ (PEP 649) — both modules start withfrom __future__ import annotations, so every version still writes each field into that same class-body dict, and pydantic skips the dunder entry during field collection. scripts/gen_surface_types.py:--default-valueskeepsElicitRequestFormParams.mode = "form"in both versions (confirmed in the committed output); the newruff check --fixpass only selects F401/UP006/UP035, all auto-fixable, socheck=Truecannot trip on a leftover violation.uv.lock:requires-dev.codegenmatches the pyproject pin; thehttpx2>=2.10.0runtime floor is untouched, and the collapse to a singletyping-extensions4.16.0 entry covers 3.11–3.15.
Extended reasoning...
The diff bumps the exact codegen dev-group pin of datamodel-code-generator (0.57.0 to 0.81.0), updates uv.lock accordingly (plus httpx2/httpcore2 2.10.0 to 2.12.0 and a typing-extensions consolidation), adds two post-processing tweaks to scripts/gen_surface_types.py, and commits the regenerated src/mcp-types/mcp_types/_v2025_11_25/init.py and _v2026_07_28/init.py, which differ only by seven identical three-line __annotations__ insertions on the extra="allow" classes. It touches no auth, crypto, or input-handling surface; the generated modules are wire validators, but the only behavioural candidate (annotation shadowing on Python 3.14+) is ruled out by the from __future__ import annotations header, and no field or default changed. The runtime dependency floors in pyproject are unchanged, so DEPENDENCY_POLICY is respected, there is no CODEOWNERS file, the bug hunt ran dry, and my only prior objection (surface types not regenerated) is addressed by the maintainer's follow-up commits.
There was a problem hiding this comment.
LGTM — the follow-up commits adapt the generator so the committed wire models stay byte-identical under datamodel-code-generator 0.81.0, which closes the regeneration concern raised earlier.
What was reviewed:
- Net diff against the base contains no changes under src/mcp-types/mcp_types/_v*/ — the intermediate commit shows the new codegen adding
__annotations__blocks on theextra="allow"classes, and HEAD strips them (plus the then-unusedDictimport) in post-processing beforeruff format. --default-valuescovers the only non-requiredconstfield in either generated surface (ElicitRequestFormParams.modein both 2025-11-25 and 2026-07-28); no other const fields need the same treatment.- uv.lock: the
typing-extensionscollapse to a single 4.16.0 entry is applied consistently across every dependent and the resolution-marker reorders are pure permutations;codegenrequires-dev matches the new pyproject pin. - New test follows the repo test conventions (top-level function,
pytest.raiseswithoutmatch=, typed, docstring). I could not execute the--checkdrift step in this session, so CI's "Surface types match vendored schema" step remains the authoritative confirmation.
Extended reasoning...
The change bumps the exact datamodel-code-generator pin (0.57.0 -> 0.81.0) and httpx2/httpcore2 (2.10.0 -> 2.12.0) in pyproject.toml/uv.lock, adds two post-processing steps to scripts/gen_surface_types.py so the new codegen's output matches the committed wire models, and adds one parametrized validation test in tests/types/test_methods.py. It touches no auth, crypto, or input-handling runtime code; the generated runtime validators under src/mcp-types are unchanged in the net diff. The earlier inline concern (pin moved without regenerating) is addressed by the later commits, there is no CODEOWNERS file, no CHANGES_REQUESTED review is outstanding, and the bug hunt ran dry. The only residual uncertainty is that the drift check could not be executed locally, but CI runs it deterministically on every push.
Update
datamodel-code-generatorfrom 0.57.0 to 0.81.0 andhttpx2from 2.10.0 to 2.12.0. Merge the latestmainand preserve the existingmode="form"default during generation. Strip redundant extra-field annotations that hide declared fields on Python 3.14, with a regression test for tool schema validation.Validation: all pre-commit hooks and the schema regeneration check pass.
./scripts/testpasses with 6,204 tests, 100% coverage, and a cleanstrict-no-covercheck.AI Disclaimer
This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.