chore(deps): update dependency fastapi to v0.137.1 #115

Merged
alpha-nerd merged 1 commit from renovate/fastapi-0.x into main 2026-06-16 11:31:48 +02:00
Collaborator

This PR contains the following updates:

Package Change Age Confidence
fastapi (changelog) ==0.136.3==0.137.1 age confidence

Release Notes

fastapi/fastapi (fastapi)

v0.137.1

Compare Source

Fixes

v0.137.0

Compare Source

Breaking Changes

Unblocks SO MANY THINGS

Before this, router.include_router(other_router) would take each path operation from other_router and "clone" it, or recreate it from scratch.

This would mean that in the end there was only one top level router, part of the app.

The way it is structured here is that there are a few additional classes to handle intermediate metadata for router and route inclusion. That way the information of "router X includes Y and Y includes Z" is stored somewhere, without affecting (recreating / clonning) the final route.

Non Objectives

Dependencies for 404: previously I intended to support dependencies that would be executed even for 404, but that would conflict with the fact that a router could not find a match, but the next router did find a match. Executing dependencies in the router that did not find a match would not make sense, they could consume the request, body, etc. This original idea was discarded.

Specific Breaking Changes

Now router.routes is no longer a plain list of APIRoute objects, it can contain these intermediate objects that can contain additional routers, forming a tree.

Any logic that depended on iterating on the router.routes directly would be affected, that logic cannot expect to be able to extract data from a plain list of routes, as it's no longer a plain list but a tree.

Additionally, any logic that iterated on router.routes to modify them would now also see these new objects, and would not see all the routes in the app.

router.routes should be considered an internal implementation detail, only passed around to the FastAPI functions that need it.

Features
  • Adding routes (path operations) after a router is included now works, they are reflected as they are not copied.
  • Including subrouter in mainrouter can be done before adding routes (path operations) to subrouter, because now the the entire object is stored instead of copying the routes.
  • As routes are not copied, in some cases that might save some memory.
Alpha Features

This is not documented yet, so it's not officially supported yet and could change in the future.

But, as APIRoute and APIRouter instances are now preserved, they could be customized.

APIRouter has two new methods, .matches() and .handle(), counterpart to the existing ones in APIRoute. With this a router could customize how it matches and handles requests. For example, it could match only requests that include some specific header, for example for handling versions in headers.

Still, for now, consider this very experimental and potentially changing and breaking in the future.

Future Features Enabled
  • Custom APIRoute subclasses (undocumented, but alraedy works as desccribed above)
  • Custom APIRouter subclasses (undocumented, but already works as described above)
  • Dependencies per router
  • Exception handlers per router
  • Middleware per router
  • Other features planned
Docs
Translations
Internal

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate.

This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [fastapi](https://github.com/fastapi/fastapi) ([changelog](https://fastapi.tiangolo.com/release-notes/)) | `==0.136.3` → `==0.137.1` | ![age](https://developer.mend.io/api/mc/badges/age/pypi/fastapi/0.137.1?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/fastapi/0.136.3/0.137.1?slim=true) | --- ### Release Notes <details> <summary>fastapi/fastapi (fastapi)</summary> ### [`v0.137.1`](https://github.com/fastapi/fastapi/releases/tag/0.137.1) [Compare Source](https://github.com/fastapi/fastapi/compare/0.137.0...0.137.1) ##### Fixes - 🚨 Fix typing checks for APIRoute. PR [#&#8203;15765](https://github.com/fastapi/fastapi/pull/15765) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🐛 Fix bug, allow empty path in path operation in prefixless router. PR [#&#8203;15763](https://github.com/fastapi/fastapi/pull/15763) by [@&#8203;tiangolo](https://github.com/tiangolo). ### [`v0.137.0`](https://github.com/fastapi/fastapi/releases/tag/0.137.0) [Compare Source](https://github.com/fastapi/fastapi/compare/0.136.3...0.137.0) ##### Breaking Changes - ♻️ Refactor internals to preserve `APIRouter` and `APIRoute` instances. PR [#&#8203;15745](https://github.com/fastapi/fastapi/pull/15745) by [@&#8203;tiangolo](https://github.com/tiangolo). Unblocks ✨ SO MANY THINGS ✨ Before this, `router.include_router(other_router)` would take each path operation from `other_router` and "clone" it, or recreate it from scratch. This would mean that in the end there was only one top level router, part of the app. The way it is structured here is that there are a few additional classes to handle intermediate metadata for router and route inclusion. That way the information of "router X includes Y and Y includes Z" is stored somewhere, without affecting (recreating / clonning) the final route. ##### Non Objectives Dependencies for 404: previously I intended to support dependencies that would be executed even for 404, but that would conflict with the fact that a router could *not* find a match, but the next router *did* find a match. Executing dependencies in the router that did not find a match would not make sense, they could consume the request, body, etc. This original idea was discarded. ##### Specific Breaking Changes Now `router.routes` is no longer a plain list of `APIRoute` objects, it can contain these intermediate objects that can contain additional routers, forming a tree. Any logic that depended on iterating on the `router.routes` directly would be affected, that logic cannot expect to be able to extract data from a plain list of routes, as it's no longer a plain list but a tree. Additionally, any logic that iterated on `router.routes` to modify them would now also see these new objects, and would not see all the routes in the app. `router.routes` should be considered an internal implementation detail, only passed around to the FastAPI functions that need it. ##### Features - Adding routes (path operations) after a router is included now works, they are reflected as they are not copied. - Including `subrouter` in `mainrouter` can be done before adding routes (path operations) to `subrouter`, because now the the entire object is stored instead of copying the routes. - As routes are not copied, in some cases that might save some memory. ##### Alpha Features This is not documented yet, so it's not officially supported yet and could change in the future. But, as `APIRoute` and `APIRouter` instances are now preserved, they could be customized. `APIRouter` has two new methods, `.matches()` and `.handle()`, counterpart to the existing ones in `APIRoute`. With this a router could customize how it matches and handles requests. For example, it could match only requests that include some specific header, for example for handling versions in headers. Still, for now, consider this very experimental and potentially changing and breaking in the future. ##### Future Features Enabled - Custom `APIRoute` subclasses (undocumented, but alraedy works as desccribed above) - Custom `APIRouter` subclasses (undocumented, but already works as described above) - Dependencies per router - Exception handlers per router - Middleware per router - Other features planned ##### Docs - 📝 Update release notes. PR [#&#8203;15747](https://github.com/fastapi/fastapi/pull/15747) by [@&#8203;tiangolo](https://github.com/tiangolo). - 📝 Update FastAPI Cloud deployment instructions. PR [#&#8203;15724](https://github.com/fastapi/fastapi/pull/15724) by [@&#8203;alejsdev](https://github.com/alejsdev). - ✏️ Use `Annotated` in inline example in `docs/en/docs/tutorial/body-multiple-params.md`. PR [#&#8203;15591](https://github.com/fastapi/fastapi/pull/15591) by [@&#8203;TheArchons](https://github.com/TheArchons). - 📝 Remove "NGINX Unit" from the list of ASGI-servers in docs. PR [#&#8203;15475](https://github.com/fastapi/fastapi/pull/15475) by [@&#8203;angryfoxx](https://github.com/angryfoxx). - 📝 Update `docs/en/docs/tutorial/security/oauth2-jwt.md`. PR [#&#8203;14781](https://github.com/fastapi/fastapi/pull/14781) by [@&#8203;zadevhub](https://github.com/zadevhub). ##### Translations - 🌐 Update translations for zh-hant (update-outdated). PR [#&#8203;15671](https://github.com/fastapi/fastapi/pull/15671) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🌐 Update translations for es (update-outdated). PR [#&#8203;15670](https://github.com/fastapi/fastapi/pull/15670) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🌐 Update translations for fr (update-outdated). PR [#&#8203;15669](https://github.com/fastapi/fastapi/pull/15669) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🌐 Update translations for ja (update-outdated). PR [#&#8203;15668](https://github.com/fastapi/fastapi/pull/15668) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🌐 Update translations for pt (update-outdated). PR [#&#8203;15667](https://github.com/fastapi/fastapi/pull/15667) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🌐 Update translations for tr (update-outdated). PR [#&#8203;15666](https://github.com/fastapi/fastapi/pull/15666) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🌐 Update translations for zh (update-outdated). PR [#&#8203;15665](https://github.com/fastapi/fastapi/pull/15665) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🌐 Update translations for ko (update-outdated). PR [#&#8203;15664](https://github.com/fastapi/fastapi/pull/15664) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🌐 Update translations for de (update-outdated). PR [#&#8203;15673](https://github.com/fastapi/fastapi/pull/15673) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🌐 Update translations for uk (update-outdated). PR [#&#8203;15672](https://github.com/fastapi/fastapi/pull/15672) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🌐 Update translations for ru (update-outdated). PR [#&#8203;15674](https://github.com/fastapi/fastapi/pull/15674) by [@&#8203;tiangolo](https://github.com/tiangolo). ##### Internal - 🔧 Update sponsors: remove TalorData. PR [#&#8203;15744](https://github.com/fastapi/fastapi/pull/15744) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors: remove ExoFlare. PR [#&#8203;15736](https://github.com/fastapi/fastapi/pull/15736) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors: remove InterviewPal. PR [#&#8203;15735](https://github.com/fastapi/fastapi/pull/15735) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors: remove Liblab. PR [#&#8203;15731](https://github.com/fastapi/fastapi/pull/15731) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors: remove Scalar. PR [#&#8203;15730](https://github.com/fastapi/fastapi/pull/15730) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ Bump the python-packages group across 1 directory with 6 updates. PR [#&#8203;15721](https://github.com/fastapi/fastapi/pull/15721) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump python-multipart from 0.0.29 to 0.0.30. PR [#&#8203;15723](https://github.com/fastapi/fastapi/pull/15723) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump the github-actions group with 3 updates. PR [#&#8203;15720](https://github.com/fastapi/fastapi/pull/15720) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump starlette from 1.1.0 to 1.2.1. PR [#&#8203;15722](https://github.com/fastapi/fastapi/pull/15722) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump <https://github.com/crate-ci/typos> from v1.46.0 to v1.47.1 in the pre-commit group. PR [#&#8203;15719](https://github.com/fastapi/fastapi/pull/15719) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 🔧 Update sponsors, add Rapidproxy. PR [#&#8203;15689](https://github.com/fastapi/fastapi/pull/15689) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔧 Update sponsors: Remove TestMu. PR [#&#8203;15688](https://github.com/fastapi/fastapi/pull/15688) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ Bump the python-packages group across 1 directory with 11 updates. PR [#&#8203;15683](https://github.com/fastapi/fastapi/pull/15683) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump aiohttp from 3.13.4 to 3.14.0. PR [#&#8203;15681](https://github.com/fastapi/fastapi/pull/15681) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump the github-actions group with 2 updates. PR [#&#8203;15682](https://github.com/fastapi/fastapi/pull/15682) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump starlette from 1.0.0 to 1.1.0. PR [#&#8203;15684](https://github.com/fastapi/fastapi/pull/15684) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 👥 Update FastAPI People - Experts. PR [#&#8203;15677](https://github.com/fastapi/fastapi/pull/15677) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👥 Update FastAPI GitHub topic repositories. PR [#&#8203;15675](https://github.com/fastapi/fastapi/pull/15675) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👥 Update FastAPI People - Contributors and Translators. PR [#&#8203;15662](https://github.com/fastapi/fastapi/pull/15662) by [@&#8203;tiangolo](https://github.com/tiangolo). - 👷 Automate release preparation. PR [#&#8203;15661](https://github.com/fastapi/fastapi/pull/15661) by [@&#8203;tiangolo](https://github.com/tiangolo). - 🔥 Remove slim package stub, deprecated for a while. PR [#&#8203;15649](https://github.com/fastapi/fastapi/pull/15649) by [@&#8203;tiangolo](https://github.com/tiangolo). - ⬆ Bump authlib from 1.6.11 to 1.7.2. PR [#&#8203;15512](https://github.com/fastapi/fastapi/pull/15512) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump pymdown-extensions from 10.21.2 to 10.21.3. PR [#&#8203;15569](https://github.com/fastapi/fastapi/pull/15569) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump CodSpeedHQ/action from 4.14.0 to 4.15.1. PR [#&#8203;15513](https://github.com/fastapi/fastapi/pull/15513) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - ⬆ Bump python-multipart from 0.0.26 to 0.0.29. PR [#&#8203;15595](https://github.com/fastapi/fastapi/pull/15595) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 🔒️ Improve GitHub actions security. PR [#&#8203;15607](https://github.com/fastapi/fastapi/pull/15607) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov). - ⚰️ Remove ruff and coverage ignores for non-existing files. PR [#&#8203;15610](https://github.com/fastapi/fastapi/pull/15610) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov). - ✅ Use custom `changing_dir` instead of `CLIRunner.isolated_filesystem` to set working dir. PR [#&#8203;15616](https://github.com/fastapi/fastapi/pull/15616) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov). - ✅ Add `httpx2` test dependency to avoid deprecation warning. PR [#&#8203;15603](https://github.com/fastapi/fastapi/pull/15603) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov). - ⬆ Bump the python-packages group with 15 updates. PR [#&#8203;15594](https://github.com/fastapi/fastapi/pull/15594) by [@&#8203;dependabot\[bot\]](https://github.com/apps/dependabot). - 👷 Configure Dependabot to group updates and update weekly. PR [#&#8203;15560](https://github.com/fastapi/fastapi/pull/15560) by [@&#8203;YuriiMotov](https://github.com/YuriiMotov). </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNjguNSIsInVwZGF0ZWRJblZlciI6IjQzLjE2OC41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJkZXBlbmRlbmNpZXMiXX0=-->
renovate-bot added the
dependencies
label 2026-06-14 15:30:34 +02:00
renovate-bot added 1 commit 2026-06-14 15:30:35 +02:00
chore(deps): update dependency fastapi to v0.137.0
All checks were successful
PR Tests / test (pull_request) Successful in 1m15s
NYX Security Scan / nyx-scan (pull_request) Successful in 5m33s
5bf0b7c8c2
renovate-bot scheduled this pull request to auto merge when all checks succeed 2026-06-14 15:30:41 +02:00
Owner

/oc check if the breaking changes affect this application

/oc check if the breaking changes affect this application
Owner

No breaking changes affect this application.

The only breaking change in FastAPI 0.137.0 is that router.routes is no longer a plain list but a tree structure. This application:

  • Uses APIRouter and FastAPI only as imports (no direct manipulation of routes)
  • Never iterates over or accesses .routes on any router/app instance

The .routes references found in the codebase are unrelated (a custom _routes dict in a test mock and a docstring comment).

opencode session  |  forgejo run

**No breaking changes affect this application.** The only breaking change in FastAPI 0.137.0 is that `router.routes` is no longer a plain list but a tree structure. This application: - Uses `APIRouter` and `FastAPI` only as imports (no direct manipulation of routes) - Never iterates over or accesses `.routes` on any router/app instance The `.routes` references found in the codebase are unrelated (a custom `_routes` dict in a test mock and a docstring comment). [opencode session](https://opencode.ai/s/TO4yxlXa)&nbsp;&nbsp;|&nbsp;&nbsp;[forgejo run](https://bitfreedom.net/code/nomyo-ai/nomyo-router/actions/runs/474)
renovate-bot force-pushed renovate/fastapi-0.x from 5bf0b7c8c2 to a710de7324 2026-06-15 14:30:38 +02:00 Compare
renovate-bot changed title from chore(deps): update dependency fastapi to v0.137.0 to chore(deps): update dependency fastapi to v0.137.1 2026-06-15 14:30:39 +02:00
alpha-nerd merged commit aeeb3cdd74 into main 2026-06-16 11:31:48 +02:00
Sign in to join this conversation.
No description provided.