fix(deps): raise the opentelemetry and fastapi floors - #187
Merged
Merged
Conversation
opentelemetry 1.21 added the schema_url argument to get_meter, which the telemetry middleware passes; 1.20 raised TypeError. fastapi 0.113 is the first release the FastAPI router builds against; 0.112 and below raise "must be called with a dataclass type or instance". With these the whole declared lower bound passes the full suite on every supported interpreter.
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.
Last two floors from the audit started in #185 and continued in #186. Origin: modern-python/.github#107.
1. opentelemetry
opentelemetry-api>=1.20/opentelemetry-sdk>=1.20, but the telemetry middleware passesschema_urltoget_meter, which 1.21 added:5 failures in
tests/test_middleware_opentelemetry.py. 1.20.0 fails; 1.21.0 and every version after it passes. Raised to>=1.21in both the extra and the dev group.2. fastapi
fastapi>=0.95resolves to 0.100.0, and the FastAPI router does not build against it:Bisected on 3.11, with an
httpxthe resolved starlette can actually use (see the note below, the first attempt at this measured the wrong thing):tests/test_fastapi.pyRaised to
>=0.113. Unmarked: no interpreter in the supported range works below it, so there is nothing to mark.The lower bound is now green, and this time it is the whole suite
uv pip install --resolution lowest-direct ".[all]"plus test tooling, then the complete suite including the Postgres integration tests:Resolved floors, for the record:
At the normal (highest) resolution nothing changes —
uv.lockpicks fastapi 0.141.1 and opentelemetry 1.44.0 — so this is inert for anyone not installing at the lower bound.A measurement note worth keeping
My first pass at the fastapi bisect was wrong, and it is the kind of wrong a lower-bound CI job will hit too.
starlette1.6 switchedTestClienttohttpx2, falling back tohttpxwith a deprecation warning, and the dev group correctly declareshttpx2>=2.2. But at the fastapi floor the resolved starlette is 0.38, which knows nothing abouthttpx2and callshttpx.Client(app=...)— removed in httpx 0.28. Install currenthttpxand every FastAPI test fails withClient.__init__() got an unexpected keyword argument 'app', which looks exactly like a floor problem and is not one.So the test tooling a lower-bound job installs cannot simply be "current": it has to be something the resolved stack can use. Here that is
httpx>=0.27,<0.28. Worth recording in modern-python/.github#107 — along with the broader point from #186 that a job which only installs would have missed four of the six floors fixed across these three PRs.No test
Same as #185 and #186: a declared range that does not work is only observable by resolving it on a given interpreter and running the suite. A unit test reading a floor back out of
pyproject.tomlwould restate the string. The tables above are the verification.Verification
just lint-ciclean (eof-fixer,ruff format,ruff check,ty). Full suite against Postgres 17 at normal resolution: 624 passed, 100% coverage.