-
Notifications
You must be signed in to change notification settings - Fork 0
chore: track Litestar v3 upgrade (currently beta, no release date) #551
Copy link
Copy link
Closed
Labels
prio:lowNice to have, can deferNice to have, can deferscope:smallLess than 1 day of workLess than 1 day of workspec:architectureDESIGN_SPEC Section 15 - Technical ArchitectureDESIGN_SPEC Section 15 - Technical Architecturetype:choreMaintenance, cleanup, dependency updatesMaintenance, cleanup, dependency updates
Description
Summary
Litestar v3 is at 3.0.0b0 (beta) with no release date. We're on v2.21.1 (latest stable, March 2026). This issue tracks what to check when v3.0.0 stable ships.
Current Status (March 2026)
- Our version:
litestar[standard,structlog,pydantic,brotli,prometheus]==2.21.1 - Latest stable: v2.21.1 (2026-03-07)
- v3 beta: 3.0.0b0 (on
mainbranch) - v3 milestone: 54% complete (6/11 issues closed), no due date
- Migration guide: Not written yet (TODO in roadmap)
Known v3 Breaking Changes (for our codebase)
High Impact
-
AbstractAuthenticationMiddlewarerework -- OurApiAuthMiddleware(api/auth/middleware.py) inherits this. v3 is moving built-in middlewares to newASGIMiddlewarebase class. Will need rewrite ofcreate_auth_middleware_class(). - Implicit Optional removal -- v3 removes implicit
Nonedefaults forOptionalhandler params. Audit all controller handlers for explicit defaults.
Medium Impact
- Route handler config overhaul -- May affect how we register controllers and guards on Routers.
- Plugin protocols -> ABCs -- Deprecation of protocol-based plugin interface. We don't define custom plugins but may need import changes.
-
RateLimitConfigmiddleware -- Base class changing; our rate limit setup in_build_middleware()may need updates.
Low Impact / Positive
- Pydantic v1 compat layer likely dropped -- Fixes our
UserWarning: Core Pydantic V1 functionality isn't compatible with Python 3.14warning (fromlitestar.plugins.pydantic.utils). -
__future__.annotationsremoval -- Aligns with our Python 3.14 / PEP 649 convention. -
OpenAPIController-> plugins -- We already useScalarRenderPlugin, so this is a no-op for us.
No Impact
ChannelsPlugin+ WebSocket handler -- No changes mentionedCORSConfig,CompressionConfig-- No changes mentionedstructlogintegration -- No changes mentioned
Python 3.14 Support
v3 main branch declares >=3.9,<4.0 with classifiers up to 3.13 only. No 3.14 classifier yet. Likely works (we run 3.14 on v2.21.1 with only the pydantic v1 warning), but untested by Litestar CI.
Upgrade Triggers
Do NOT upgrade until ALL of these are true:
- v3.0.0 stable released (not beta)
- Migration guide published
- Python 3.14 in their test matrix or confirmed working
When Ready to Upgrade
- Read migration guide
- Check
AbstractAuthenticationMiddlewarereplacement - Audit all handlers for implicit Optional params
- Run full test suite against v3
- Test WebSocket auth flow (may fix bug: WebSocket connections rejected with 403 despite correct auth exclude path #549)
- Update
pyproject.tomlpin
References
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
prio:lowNice to have, can deferNice to have, can deferscope:smallLess than 1 day of workLess than 1 day of workspec:architectureDESIGN_SPEC Section 15 - Technical ArchitectureDESIGN_SPEC Section 15 - Technical Architecturetype:choreMaintenance, cleanup, dependency updatesMaintenance, cleanup, dependency updates