Skip to content

v0.4.2

Choose a tag to compare

@feodor-ra feodor-ra released this 21 Oct 10:01
· 8 commits to master since this release
ac373fb

FastAPI 0.145 removed FastAPI(**extra), which the FastAPI(api_version=N) declaration relies on. This patch release caps FastAPI below 0.145, deprecates that declaration and fixes two inheritance bugs. A new way to declare versions, with FastAPI 0.145+ support, is coming in 0.5.0 — until then, stay on FastAPI < 0.145.

Changed

  • FastAPI is capped below 0.145 — that release removed FastAPI(**extra) together with app.extra, so FastAPI(api_version=N) raises TypeError there and the middleware fails on its first ASGI event. by @feodor-ra in 1802e87
  • Build backend requirement widened to uv_build>=0.8.3,<0.14.0 by @feodor-ra in 2855e87

Deprecated

  • FastAPI(api_version=N) now emits a FutureWarning, once per process. It keeps working on FastAPI < 0.145, and 0.5.0 will replace it with a new interface. If you run with warnings as errors, see how to silence it. by @feodor-ra in 76c3aa6

Fixed

  • Versioned WebSockets from included routers on FastAPI 0.143.1+ — such an endpoint failed with "Versioning is not initialized" in its own version and was inherited without the include-time prefix and dependencies. by @feodor-ra in 4ad2e68
  • strict_content_type survives inheritance — routes inherited from an included router lost it, so APIRouter(strict_content_type=False) became strict again in the versions that inherit them. by @feodor-ra in 44f333d

📖 https://feodor-ra.github.io/fastapi-easy-versioning/

Full Changelog: v0.4.1...v0.4.2