Skip to content

Commit a7c9e98

Browse files
authored
fix: repair the litestar and faststream floors (#220)
litestar 2.15 imports sniffio without declaring it and relied on anyio, which dropped the dependency in 4.14; 2.19 is the first release that declares it. litestar also declares typing-extensions bare while using ReadOnly, so that floor is declared here too. faststream pulls pydantic through fast-depends, which allows it back to 1.7.4. With typing-extensions pinned at the declared floor the chain resolves a pydantic whose pydantic-core has no cp313 or cp314 wheel, so both constraints are declared on the extra.
1 parent d346d22 commit a7c9e98

1 file changed

Lines changed: 16 additions & 2 deletions

File tree

‎pyproject.toml‎

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,13 @@ fastapi-all = [
106106
litestar = [
107107
# >=2.13 for AppConfig.request_max_body_size (LitestarBootstrapper._apply_config reads it);
108108
# >=2.15 for litestar.middleware.ASGIMiddleware (LitestarOpenTelemetryInstrumentationMiddleware
109-
# subclasses it) -- the higher floor wins.
110-
"litestar>=2.15",
109+
# subclasses it); >=2.19 because litestar/concurrency.py imports sniffio and only 2.19 declares
110+
# it -- until then it arrived via anyio, which dropped the dependency in 4.14. The highest wins.
111+
"litestar>=2.19",
112+
# litestar declares `typing-extensions` bare while importing typing_extensions.ReadOnly (4.9),
113+
# so the floor has to come from here. >=4.12 rather than 4.9: 4.9 and 4.11 assign
114+
# `typing.ParamSpec.__default__`, which Python 3.13 made read-only.
115+
"typing-extensions>=4.12",
111116
]
112117
litestar-sentry = [
113118
"lite-bootstrap[litestar,sentry]",
@@ -132,6 +137,15 @@ faststream = [
132137
# >=0.6 for faststream._internal.logger.params_storage.ManualLoggerStorage and for
133138
# broker.config.logger.params_storage (FastStreamLoggingInstrument swaps and restores it).
134139
"faststream>=0.6",
140+
# Not imported here: faststream pulls pydantic through fast-depends[pydantic], which allows it
141+
# back to 1.7.4, and pydantic-core ships no cp314 wheel before pydantic 2.12. Without this the
142+
# lowest declared combination has no installable pydantic on 3.14. Marked, because 2.7.4 is fine
143+
# everywhere else and there is no reason to raise the floor for older interpreters.
144+
"pydantic>=2.12; python_version >= '3.14'",
145+
# pydantic requires typing-extensions>=4.12.2 on 3.13+; without this the lowest declared
146+
# combination pins typing-extensions at 4.8 and drags pydantic back to a build that has no
147+
# cp313 wheel either.
148+
"typing-extensions>=4.12.2",
135149
]
136150
faststream-sentry = [
137151
"lite-bootstrap[faststream,sentry]",

0 commit comments

Comments
 (0)