Janet Carson
06/16/2026, 11:47 PMMarvin
06/16/2026, 11:48 PMMarvin
06/16/2026, 11:49 PM0.137.1.
Why I’m confident:
- Prefect’s CI installs dependencies with uv sync --locked
- The repo’s uv.lock pins fastapi to 0.137.1
- The latest successful run was on a commit where that lockfile already contained 0.137.1
Relevant repo files:
- `uv.lock`
- `pyproject.toml`
Important nuance:
- pyproject.toml allows a range like fastapi>=0.111.0,<1.0.0
- But the actual test run version comes from the lockfile, which resolves that to 0.137.1
If you want, I can also help identify which workflow/run that was and point to the exact GitHub Actions run page.Janet Carson
06/16/2026, 11:50 PMMarvin
06/16/2026, 11:50 PMMarvin
06/16/2026, 11:52 PM0.137.0/0.137.1.
Direct compatibility fixes
1. 254498fac2cc324bb152c9c6ba3f82b1c44e257b
- First fix attempt for FastAPI 0.137.0 compatibility
- Adjusted Prefect’s router-handling logic in src/prefect/server/api/server.py
- This addressed a breaking change in FastAPI’s include_router behavior
2. 336bb4900a3bbca169ca3582aeeff9d58976a51c
- Follow-up / refined fix, associated with PR #22277
- Replaced a more fragile feature-detection approach with explicit FastAPI version comparison
- Also in src/prefect/server/api/server.py
- This looks like the final compatibility fix for 0.137.0+
Dependency bump
3. b0ae1da3bf55b4131e41eb0fa30df115dfb09452
- Associated with PR #22281
- Bumped FastAPI from 0.136.3 to 0.137.1
- This was primarily a dependency update, not the original compatibility fix
- It also included some test changes, but those appear to be broader test maintenance rather than the core FastAPI compatibility logic
Bottom line
- Yes, there were explicit compatibility commits for FastAPI 0.137.0.
- Then Prefect bumped to 0.137.1 after those fixes were in place.
- So the sequence was basically:
1. detect breakage with 0.137.0
2. add compatibility fix
3. refine the fix
4. update dependency to 0.137.1
If you want, I can also summarize exactly what changed in server.py and why FastAPI 0.137 broke the previous Prefect behavior.Janet Carson
06/16/2026, 11:53 PMMarvin
06/16/2026, 11:53 PMMarvin
06/16/2026, 11:54 PM3.7.5.dev4
That dev release includes:
- the FastAPI 0.137.0+ compatibility fix: 336bb4900a3bbca169ca3582aeeff9d58976a51c
- the FastAPI bump to `0.137.1`: b0ae1da3bf55b4131e41eb0fa30df115dfb09452
PyPI status
- prefect==3.7.5.dev4 → available on PyPI
- prefect==3.7.4 → latest stable at the time of this check, but does not include those commits
- stable 3.7.5 → not yet published at the time of this check
So if you want those fixes now, you need either:
1. The dev release on PyPI
bash
pip install prefect==3.7.5.dev4
2. A Git checkout / Git install at or after:
- b0ae1da3bf55b4131e41eb0fa30df115dfb09452
For example:
bash
pip install git+<https://github.com/PrefectHQ/prefect.git@b0ae1da3bf55b4131e41eb0fa30df115dfb09452>
Or just use `main`:
bash
pip install git+<https://github.com/PrefectHQ/prefect.git@main>
Recommendation
- For testing the fix quickly: use 3.7.5.dev4
- For production: I’d generally wait for the stable 3.7.5 release unless you specifically need the FastAPI compatibility fix immediately
Useful links:
- Prefect 3.7.5.dev4 on PyPI
- Compatibility fix commit
- FastAPI 0.137.1 bump commit
If you want, I can also tell you the smallest possible git ref/tag to pin to, or help confirm whether a newer stable release has gone out since this check.