Skip to content

[BUG] FastAPI 0.137.0 breaks fastapiutils #382

Description

@jkugler

Describe the bug
Per https://fastapi.tiangolo.com/release-notes/#01370-2026-06-14 router.routes has changed, causing failure using fastapiutils. Namely, the timing module.

To Reproduce
See https://github.com/fastapiutils/fastapi-utils/blob/master/fastapi_utils/timing.py#L180

Add a timer to a route via add_timing_middleware.

From the release notes:

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.

This project appears abandoned, but I thought I'd raise the issue in case someone can fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions