Skip to content

Update httpx2 and datamodel-code-generator - #3645

Merged
Kludex merged 6 commits into
mainfrom
dependabot/uv/python-security-4a6c75412a
Oct 12, 2026
Merged

Kludex merged 6 commits into
mainfrom
dependabot/uv/python-security-4a6c75412a

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Update datamodel-code-generator from 0.57.0 to 0.81.0 and httpx2 from 2.10.0 to 2.12.0. Merge the latest main and preserve the existing mode="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/test passes with 6,204 tests, 100% coverage, and a clean strict-no-cover check.

AI Disclaimer

This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code labels Oct 5, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 codegen exact pin moves (pyproject.toml line 113); the runtime httpx2>=2.10.0 floor is unchanged and the 2.12.0 lock resolution stays within it, consistent with DEPENDENCY_POLICY.
  • uv.lock entries, hashes, and the requires-dev specifier all match the new pin.
  • Checked whether the new black/isort emscripten markers could change generated output: no, the script strips the generator header and re-formats with ruff 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>
@dependabot
dependabot Bot force-pushed the dependabot/uv/python-security-4a6c75412a branch from a1c04f7 to 3cf0fee Compare October 12, 2026 11:52
Comment thread pyproject.toml
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>
@dependabot
dependabot Bot force-pushed the dependabot/uv/python-security-4a6c75412a branch from 3cf0fee to 054906a Compare October 12, 2026 12:19
@Kludex Kludex changed the title Bump the python-security group across 1 directory with 2 updates Update httpx2 and datamodel-code-generator Oct 12, 2026
@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

📚 Documentation preview

Preview https://pr-3645.mcp-python-docs.pages.dev
Deployment https://2881504a.mcp-python-docs.pages.dev
Commit 013ce5a
Triggered by @Kludex
Updated 2026-10-12 12:35:26 UTC

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 with from __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-values keeps ElicitRequestFormParams.mode = "form" in both versions (confirmed in the committed output); the new ruff check --fix pass only selects F401/UP006/UP035, all auto-fixable, so check=True cannot trip on a leftover violation.
  • uv.lock: requires-dev.codegen matches the pyproject pin; the httpx2>=2.10.0 runtime floor is untouched, and the collapse to a single typing-extensions 4.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.

@Kludex
Kludex enabled auto-merge (squash) October 12, 2026 12:37
@Kludex
Kludex disabled auto-merge October 12, 2026 12:37
@Kludex
Kludex merged commit c9356a2 into main Oct 12, 2026
37 checks passed
@Kludex
Kludex deleted the dependabot/uv/python-security-4a6c75412a branch October 12, 2026 12:37

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 the extra="allow" classes, and HEAD strips them (plus the then-unused Dict import) in post-processing before ruff format.
  • --default-values covers the only non-required const field in either generated surface (ElicitRequestFormParams.mode in both 2025-11-25 and 2026-07-28); no other const fields need the same treatment.
  • uv.lock: the typing-extensions collapse to a single 4.16.0 entry is applied consistently across every dependent and the resolution-marker reorders are pure permutations; codegen requires-dev matches the new pyproject pin.
  • New test follows the repo test conventions (top-level function, pytest.raises without match=, typed, docstring). I could not execute the --check drift 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file python:uv Pull requests that update python:uv code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant