Repository navigation
Lower the pydantic minimum version to 2.0.2 - #40
Merged
Merged
Conversation
Require pydantic>=2.0.2, regenerate uv.lock and test the package against pydantic 2.0.2 in the build job. pydantic 2.0 and 2.0.1 pin pydantic-core versions without Python 3.12 wheels, so 2.0.2 is the lowest release that installs on 3.12 without a Rust build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015guwcb2VbULqaendfa6d3k
Gal-Gilor
force-pushed
the
chore/pydantic-2.0-minimum
branch
from
October 18, 2026 17:39
58f1dad to
15ccfdf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pyproject.toml: the requirement is nowpydantic>=2.0.2(was>=2.14.1).uv.lock: regenerated with uv 0.13.1. Only therequires-distspecifier changes; the locked development version stays at pydantic 2.14.1..github/workflows/lint-test-build.yaml: added the "Test with the lowest supported pydantic" step from the issue as the last step of thebuildjob, pinned topydantic==2.0.2. It comes after the wheel import check so the build and wheel checks still run first, and it installs the package from source (.), not from the built wheel.CHANGELOG.md, 0.3.0 "Changed": the minimum pydantic version is now 2.0.2, and the upper bound is removed.Why 2.0.2 instead of the issue's 2.0: pydantic 2.0 pins pydantic-core 2.0.1 and pydantic 2.0.1 pins pydantic-core 2.0.2, and neither core release has cp312 wheels. Installing them on Python 3.12 means building pydantic-core from source with Rust. Locally,
uv pip install . "pydantic==2.0" pyteston 3.12 took about 74s to compile pydantic-core 2.0.1, and the same install with--only-binary :all:fails because no usable wheel exists. pydantic 2.0.2 pins pydantic-core 2.1.2, which has cp312 wheels.Testing
uv run ruff check --no-fix .anduv run ruff format --check .: pass.uv run pytest -q: 99 passed.uv buildfollowed by the build job's wheel import check: pass.uv lockand thenuv sync --lockedwith uv 0.13.1: pass.uv venv, thenuv pip install . "pydantic==2.0.2" pytest, thenpython -m pytestgives 99 passed. Running the install again with--only-binary pydantic-corealso works (0.5s, pydantic 2.0.2 and pydantic-core 2.1.2 from wheels), so nothing is built from source.ValidationError(frozen_instance), so the frozen-model tests hold.