Migrating to Starlette 0.46.0
Version 0.46.0 introduces 1 breaking change. This guide details how to update your code.
Released: 2/22/2025
1
Breaking Changes
2
Migration Steps
4
Affected Symbols
⚠️ Check Your Code
If you use any of these symbols, you need to read this guide:
GZipMiddlewareBaseHTTPMiddlewareMultiPartParserTestClientBreaking Changes
●Issue #1
`MultiPartParser`: renamed parameter `max_file_size` to `spool_max_size`. Update any code that passes `max_file_size` to use `spool_max_size`.
Migration Steps
- 1Replace any usage of `MultiPartParser(max_file_size=…)` with `MultiPartParser(spool_max_size=…)`.
- 2If you rely on `TestClient(timeout=…)`, adjust your code to the recommended timeout configuration to avoid deprecation warnings.
Release Summary
Starlette 0.46.0 adds a Vary header to GZipMiddleware, renames MultiPartParser’s `max_file_size` to `spool_max_size`, and deprecates `TestClient(timeout=…)`, while fixing background task exception handling and SSE compression.
Need More Details?
View the full release notes and all changes for Starlette 0.46.0.
View Full Changelog