fix(deps): mark the sqlalchemy floor and complete pydantic's - #186
Merged
Merged
Conversation
sqlalchemy 2.0.0 fails SQLAlchemy's own TypingOnly check at import on 3.13+, which only reached the surface once the build failures ahead of it were gone. 2.0.31 is the first release that tolerates __static_attributes__ and __firstlineno__. pydantic's floor was declared only for 3.14, so everything below it still admitted pydantic 1.x, under which FastStream's serializer calls model_dump and publishing a model raises AttributeError. v2 is a hard requirement; the marked floors above it are wheel coverage.
Benchmark gate✅ gate passed
Gated (fails the build): |
This was referenced Sep 20, 2026
The typing-extensions floor does not install on Python 3.14
modern-python/faststream-redis-timers#88
Closed
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.
Follow-up to #185. Continues the audit from modern-python/.github#107.
1. sqlalchemy
sqlalchemy[asyncio]>=2.0resolves to 2.0.0, which predates SQLAlchemy's handling of the__static_attributes__and__firstlineno__attributes Python 3.13 added. It installs fine and then fails its own check at import:This only reached the surface once #185 cleared the build failures ahead of it. Bisected on 3.13:
2.0.31 imports cleanly on 3.14 too.
2. pydantic, completing what #185 started
#185 declared
pydantic>=2.12; python_version >= '3.14'for wheel coverage and stopped there. That left every interpreter below 3.14 with no pydantic floor at all, andfast-depends[pydantic]allows it back to 1.x — so the lowest declared combination resolved pydantic 1.10.26, under which three tests fail:model_dumpis FastStream's serializer, not our code, but the promise is ours: we declared a range that admits a pydantic our publish path cannot use. v2 is a hard requirement, and the two marked floors above it are wheel coverage — pydantic-core ships no cp313 wheel before pydantic 2.8, and no cp314 wheel before 2.12 (2.7.1 and 2.7.4 both fail on 3.13; 2.8.0 is the first that works).Where the lower bound stands now
uv pip install --resolution lowest-direct ".[all]"plus current test tooling:tests/test_unit.py+tests/test_fake.pyThe full suite is not green at the lower bound yet. Running everything, with Postgres, on 3.11 leaves 12 failures from two floors this PR does not touch:
opentelemetry-api>=1.20/opentelemetry-sdk>=1.20— 5 failures intests/test_middleware_opentelemetry.py. Upgrading opentelemetry to current in place fixes all 5, so the floor is the cause; the exact boundary is not bisected.fastapi>=0.95— 7 failures intests/test_fastapi.py, still failing at the resolved 0.100.0 and after the opentelemetry upgrade.Both are left for a follow-up rather than folded in here.
At the normal (highest) resolution nothing changes —
uv.lockpicks sqlalchemy 2.0.54 and pydantic 2.13.5 — so this is inert for anyone not installing at the lower bound.No test
Same as #185: the defect is that a declared range does not resolve or does not work, which only a resolver on a given interpreter can show. A unit test reading a floor back out of
pyproject.tomlwould restate the string. The tables above are the verification, and modern-python/.github#107 is the job that would make it standing. Worth noting for that issue: the sqlalchemy and pydantic failures here were invisible to a job that only installs — it has to import and run tests.Verification
just lint-ciclean (eof-fixer,ruff format,ruff check,ty). Full suite against Postgres 17 at normal resolution: 624 passed, 100% coverage.