starlette breaking changes
Updated December 4, 2026
On this page
Latest version 1.10.0, released October 24, 2026. Source repository
Its 1.8.0 release requires Python 3.11 or later. Python end of life dates.
- From 0.52.0 to 1.10.0: 86 breaking changes in 14 versions.
- From 0.18.0 to 1.10.0: 440 breaking changes in 50 versions.
starlette 1.10.0 breaking changes
- Removed
starlette.formparsers.FormParser.messages
The messages attribute is gone because the parser no longer builds FormMessage objects. pypi.org - Removed
starlette.formparsers.FormParser.on_end
FormParser.on_end was removed in starlette 1.10.0 pypi.org - Behavior changed
Config
Quoted values in env files are now unquoted, so values read from a .env file may differ from before. github.com - Behavior changed
FileResponse
A POST endpoint returning a file now sends the full file rather than a byte range. github.com - Behavior changed
QueryParams
Two QueryParams with the same repeated key in a different value order no longer compare equal. Update any code that relies on order-insensitive comparison. github.com
starlette 1.9.0 breaking changes
- Behavior changed
MutableHeaders.add_vary_header
MutableHeaders.add_vary_header now preserves all existing Vary headers instead of replacing them. github.com - Behavior changed
request.url
Request.url percent-encodes ?, #, backslash and a leading // in the request path, which changes the URL string users see. github.com - Behavior changed
TestClient.stream
client.stream() now returns before the application finishes; closing an unfinished streamed response cancels the application. github.com - Behavior changed
TrustedHostMiddleware
Host routing and TrustedHostMiddleware now match host names case-insensitively. github.com - Behavior changed
url_path_for
url_path_for escapes backslashes and a leading // in generated URLs. github.com
starlette 1.8.0 breaking changes
- Removed
Starlette 1.8.0 requires Python 3.11 or later. Users on Python 3.10 must stay on an older Starlette release or upgrade Python. github.com - Behavior changed
GZipMiddleware
Responses with application/grpc media types are excluded from GZip compression by default. Users who need gRPC responses compressed must configure this themselves. github.com
starlette 1.7.0 breaking changes
- Removed
Starlette now requires anyio>=4.0.0,<5. Projects pinned to AnyIO 3 must upgrade AnyIO to 4 before using this release. github.com - Removed
starlette.testclient.TestClient.delete
TestClient.delete was removed in starlette 1.7.0 pypi.org - Removed
starlette.testclient.TestClient.get
TestClient.get was removed in starlette 1.7.0 pypi.org - Removed
starlette.testclient.TestClient.head
TestClient.head was removed in starlette 1.7.0 pypi.org - Removed
starlette.testclient.TestClient.options
TestClient.options was removed in starlette 1.7.0 pypi.org - Removed
starlette.testclient.TestClient.patch
TestClient.patch was removed in starlette 1.7.0 pypi.org - Removed
starlette.testclient.TestClient.post
TestClient.post was removed in starlette 1.7.0 pypi.org - Removed
starlette.testclient.TestClient.put
TestClient.put was removed in starlette 1.7.0 pypi.org - Behavior changed
BaseHTTPMiddleware
With BaseHTTPMiddleware, background tasks now run only after the response has been sent, which changes their timing. github.com - Behavior changed
CORSMiddleware
All normal CORS responses now include Vary: Origin, and preflight responses vary by all request headers that affect them. Caches and tests that depend on the previous headers may need updating. github.com
And 5 more in this version. Sign up to see every change
starlette 1.6.0 breaking changes
- Signature changed
starlette.applications.Router.__init__
Was def __init__(self, routes: Sequence[BaseRoute] | None = None, redirect_slashes: bool = True, default: ASGIApp | None = None, lifespan: Lifespan[Any] | None = None, *, middleware: Sequence[Middleware] | None = None) -> None; now def... pypi.org - Signature changed
starlette.applications.Starlette.__init__
Was def __init__(self: AppType, debug: bool = False, routes: Sequence[BaseRoute] | None = None, middleware: Sequence[Middleware] | None = None, exception_handlers: Mapping[Any, ExceptionHandler] | None = None, lifespan: Lifespan[AppType] |... pypi.org - Signature changed
starlette.routing.Mount.__init__
Was def __init__(self, path: str, app: ASGIApp | None = None, routes: Sequence[BaseRoute] | None = None, name: str | None = None, *, middleware: Sequence[Middleware] | None = None) -> None; now def __init__(self, path: str, app: ASGIApp |... pypi.org - Signature changed
starlette.routing.Route.__init__
Was def __init__(self, path: str, endpoint: Callable[..., Any], *, methods: Collection[str] | None = None, name: str | None = None, include_in_schema: bool = True, middleware: Sequence[Middleware] | None = None) -> None; now def... pypi.org
starlette 1.5.1 breaking changes
- Behavior changed
FileResponse
Requests with an inverted single-byte Range header are now rejected instead of being served. Code that relied on those requests succeeding must handle the new rejection. github.com
Older versions
45 older versions, each with its first changes. Sign up to see every change
Show 45 older versions
starlette 1.5.0 breaking changes
- Behavior changed
GZipMiddleware
Partial responses are now passed through without compression, so code that expected them to be gzipped will see uncompressed output. github.com - Default changed
GZipMiddleware
The default list of excluded content types was expanded, so more responses are now left uncompressed unless you pass your own list. github.com
And 3 more in this version.
starlette 1.4.1 breaking changes
- Default changed
GZipResponder.thread_minimum_size
The default thread_minimum_size in GZipResponder changed in this release. If your code relies on the previous default, set the value explicitly. github.com - Signature changed
starlette.middleware.gzip.GZipResponder.__init__
Was def __init__(self, app: ASGIApp, minimum_size: int, compresslevel: int = 9, *, thread_minimum_size: int) -> None; now def __init__(self, app: ASGIApp, minimum_size: int, compresslevel: int = 9, *, thread_minimum_size: int = 128 * 1024)... pypi.org
starlette 1.4.0 breaking changes
- Removed
starlette.middleware.gzip.GZipResponder.gzip_buffer
GZipResponder.gzip_buffer was removed in starlette 1.4.0 pypi.org - Removed
starlette.middleware.gzip.GZipResponder.gzip_file
GZipResponder.gzip_file was removed in starlette 1.4.0 pypi.org
And 3 more in this version.
starlette 1.3.1 breaking changes
- Behavior changed
Starlette deprecation warnings are now issued as StarletteDeprecationWarning rather than DeprecationWarning. Code that filters or catches DeprecationWarning may need to also handle StarletteDeprecationWarning. github.com - Behavior changed
FormParser
FormParser now enforces the max_fields and max_part_size limits, so form submissions exceeding them are rejected. Users relying on larger forms may need to raise these limits. github.com
And 1 more in this version.
starlette 1.3.0 breaking changes
- Removed
starlette.middleware.base.collapse_excgroups
starlette.middleware.base.collapse_excgroups was removed in starlette 1.3.0 pypi.org - Removed
starlette.responses.collapse_excgroups
starlette.responses.collapse_excgroups was removed in starlette 1.3.0 pypi.org
And 4 more in this version.
starlette 1.1.0 breaking changes
- Behavior changed
FileResponse
When no media type can be determined, FileResponse now uses application/octet-stream. Code that relied on the previous fallback type must set media_type explicitly. github.com - Behavior changed
HTTPEndpoint
HTTPEndpoint now dispatches only standard HTTP methods to handler methods. Non-standard method names no longer reach their handlers. github.com
And 1 more in this version.
starlette 1.0.0 breaking changes
- Removed
starlette.applications.BaseHTTPMiddleware
starlette.applications.BaseHTTPMiddleware was removed in starlette 1.0.0 pypi.org - Removed
starlette.applications.Router.add_event_handler
Router.add_event_handler was removed in starlette 1.0.0 pypi.org
And 27 more in this version.
starlette 1.0.0rc1 breaking changes
- Removed
Features deprecated and marked for removal in 1.0 are removed in this release, so code that still uses them will break. Replace them before upgrading, using the deprecation warnings from earlier versions. github.com
starlette 0.52.0 breaking changes
- Signature changed
starlette.applications.Request
Was class Request(HTTPConnection); now class Request(HTTPConnection[StateT]). pypi.org - Signature changed
starlette.authentication.HTTPConnection
Was class HTTPConnection(Mapping[str, Any]); now class HTTPConnection(Mapping[str, Any], Generic[StateT]). pypi.org
And 15 more in this version.
starlette 0.51.0 breaking changes
- Behavior changed
wsgi
The DeprecationWarning raised by the wsgi module now uses a higher warning stacklevel, so the warning location shifts to the calling code. Code that filters or matches these warnings by location may need updating. github.com - Signature changed
starlette.middleware.cors.CORSMiddleware.__init__
Was def __init__(self, app: ASGIApp, allow_origins: Sequence[str] = (), allow_methods: Sequence[str] = ('GET'), allow_headers: Sequence[str] = (), allow_credentials: bool = False, allow_origin_regex: str | None = None, expose_headers... pypi.org
starlette 0.50.0 breaking changes
- Removed
Starlette 0.50.0 no longer supports Python 3.9. Upgrade to a newer Python version before installing this release. github.com
starlette 0.49.3 breaking changes
- Removed
starlette.middleware.ASGIApp
starlette.middleware.ASGIApp was removed in starlette 0.49.3 pypi.org
starlette 0.49.0 breaking changes
- Behavior changed
BaseHTTPMiddleware
Exceptions raised through BaseHTTPMiddleware no longer carry extra exception context. Code that inspects exception chaining in middleware should be checked. github.com - Signature changed
starlette.config.Config.__init__
Was def __init__(self, env_file: str | Path | None = None, environ: Mapping[str, str] = environ, env_prefix: str = '') -> None; now def __init__(self, env_file: str | Path | None = None, environ: Mapping[str, str] = environ, env_prefix... pypi.org
And 1 more in this version.
starlette 0.48.0 breaking changes
- Removed
starlette.status.HTTP_413_REQUEST_ENTITY_TOO_LARGE
starlette.status.HTTP_413_REQUEST_ENTITY_TOO_LARGE was removed in starlette 0.48.0 pypi.org - Removed
starlette.status.HTTP_414_REQUEST_URI_TOO_LONG
starlette.status.HTTP_414_REQUEST_URI_TOO_LONG was removed in starlette 0.48.0 pypi.org
And 2 more in this version.
starlette 0.47.1 breaking changes
- Signature changed
starlette.applications.ExceptionMiddleware.__init__
Was def __init__(self, app: ASGIApp, handlers: Mapping[Any, Callable[[Request, Exception], Response]] | None = None, debug: bool = False) -> None; now def __init__(self, app: ASGIApp, handlers: Mapping[Any, ExceptionHandler] | None = None... pypi.org - Signature changed
starlette.applications.ExceptionMiddleware.add_exception_handler
Was def add_exception_handler(self, exc_class_or_status_code: int | type[Exception], handler: Callable[[Request, Exception], Response]) -> None; now def add_exception_handler(self, exc_class_or_status_code: int | type[Exception], handler... pypi.org
And 2 more in this version.
starlette 0.47.0 breaking changes
- Behavior changed
ExceptionMiddleware.http_exception
ExceptionMiddleware.http_exception was changed to an async method to prevent thread creation. Code that calls it synchronously must now await it. github.com - Signature changed
starlette.applications.ExceptionMiddleware.http_exception
Was def http_exception(self, request: Request, exc: Exception) -> Response; now async def http_exception(self, request: Request, exc: Exception) -> Response. pypi.org
And 5 more in this version.
starlette 0.46.0 breaking changes
- Removed
starlette.formparsers.MultiPartParser.max_file_size
The MultiPartParser option max_file_size was renamed to spool_max_size. Code using the old name must switch to the new one. pypi.org - Renamed
starlette.middleware.gzip.GZipResponder.send_with_gzip
Use GZipResponder.send_with_compression instead. pypi.org
And 3 more in this version.
starlette 0.45.2 breaking changes
- Configuration changed
Starlette now requires anyio 3.6.2 or newer, so environments with an older anyio must upgrade it. github.com
starlette 0.45.1 breaking changes
- Removed
starlette.testclient.WebSocketTestSession.should_close
WebSocketTestSession.should_close was removed in starlette 0.45.1 pypi.org - Signature changed
starlette.testclient.WebSocketTestSession.__exit__
Was def __exit__(self, *args: typing.Any) -> None; now def __exit__(self, *args: typing.Any) -> bool | None. pypi.org
starlette 0.45.0 breaking changes
- Removed
Starlette 0.45.0 no longer supports Python 3.8; users on Python 3.8 must upgrade Python before upgrading. github.com - Removed
starlette.exceptions.ExceptionMiddleware
The ExceptionMiddleware import from the starlette.exceptions module has been removed; import it from starlette.middleware.exceptions instead. github.com
And 3 more in this version.
starlette 0.44.0 breaking changes
- Signature changed
starlette.applications.Request.form
Was def form(self, *, max_files: int | float = 1000, max_fields: int | float = 1000) -> AwaitableOrContextManager[FormData]; now def form(self, *, max_files: int | float = 1000, max_fields: int | float = 1000, max_part_size: int = 1024 *... pypi.org - Signature changed
starlette.formparsers.MultiPartParser.__init__
Was def __init__(self, headers: Headers, stream: typing.AsyncGenerator[bytes, None], *, max_files: int | float = 1000, max_fields: int | float = 1000) -> None; now def __init__(self, headers: Headers, stream: typing.AsyncGenerator[bytes... pypi.org
And 1 more in this version.
starlette 0.43.0 breaking changes
- Removed
TestClient.allow_redirects
The deprecated allow_redirects argument was removed from TestClient in this release. Stop passing it and use follow_redirects instead. github.com - Signature changed
starlette.testclient.TestClient.delete
Was def delete(self, url: httpx._types.URLTypes, *, params: httpx._types.QueryParamTypes | None = None, headers: httpx._types.HeaderTypes | None = None, cookies: httpx._types.CookieTypes | None = None, auth: httpx._types.AuthTypes |... pypi.org
And 7 more in this version.
starlette 0.42.0 breaking changes
- Configuration changed
The minimum required httpx version is now 0.27.0. Environments pinning an older version must upgrade it. github.com - Configuration changed
The minimum required python-multipart version is now 0.0.18. Environments pinning an older version must upgrade it. github.com
starlette 0.41.3 breaking changes
- Removed
starlette.middleware.Receive
starlette.middleware.Receive was removed in starlette 0.41.3 pypi.org - Removed
starlette.middleware.Scope
starlette.middleware.Scope was removed in starlette 0.41.3 pypi.org
And 5 more in this version.
starlette 0.40.0 breaking changes
- Signature changed
starlette.formparsers.MultipartPart.__init__
Was def __init__(self, content_disposition: bytes | None = None, field_name: str = '', data: bytes = b'', file: UploadFile | None = None, item_headers: list[tuple[bytes, bytes]] = list()) -> None; now def __init__(self... pypi.org - Signature changed
starlette.formparsers.MultipartPart.data
Was data: bytes; now data: bytearray. pypi.org
starlette 0.38.0 breaking changes
- Behavior changed
Jinja2Template
Invalid Jinja2Template parameters now fail at instantiation instead of later. Check that existing template setup passes valid parameters. github.com - Signature changed
starlette.applications.Response.render
Was def render(self, content: typing.Any) -> bytes; now def render(self, content: typing.Any) -> bytes | memoryview. pypi.org
And 4 more in this version.
starlette 0.36.0 breaking changes
- Behavior changed
Config
Passing an env_file path that is not valid to Config now raises FileNotFoundError. Code that relied on an invalid env_file being silently ignored must now supply a valid file. github.com - Behavior changed
WebSocket.send
When sending fails with an IOError, WebSocket.send now raises WebSocketDisconnect. Code that catches IOError around send must catch WebSocketDisconnect instead. github.com
And 4 more in this version.
starlette 0.35.0 breaking changes
- Removed
starlette.applications.Middleware.options
Middleware.options was removed in starlette 0.35.0 pypi.org - Removed
starlette.middleware.Middleware.options
Middleware.options was removed in starlette 0.35.0 pypi.org
And 7 more in this version.
starlette 0.34.0 breaking changes
- Removed
starlette.responses.FileResponse.send_header_only
FileResponse.send_header_only was removed in starlette 0.34.0 pypi.org - Removed
starlette.staticfiles.FileResponse.send_header_only
FileResponse.send_header_only was removed in starlette 0.34.0 pypi.org
And 2 more in this version.
starlette 0.33.0 breaking changes
- Behavior changed
WebSocket.send_json
WebSocket.send_json() now calls json.dumps() with ensure_ascii=False, so non-ASCII characters are sent as-is instead of escaped. Code that expects ASCII-only output must be updated. github.com - Signature changed
starlette.applications.Router.__init__
Was def __init__(self, routes: typing.Optional[typing.Sequence[BaseRoute]] = None, redirect_slashes: bool = True, default: typing.Optional[ASGIApp] = None, on_startup: typing.Optional[typing.Sequence[typing.Callable[[], typing.Any]]] =... pypi.org
And 5 more in this version.
starlette 0.32.0 breaking changes
- Removed
starlette.templating.Response
starlette.templating.Response was removed in starlette 0.32.0 pypi.org - Behavior changed
_TemplateResponse
The private _TemplateResponse class now subclasses HTMLResponse rather than Response, so isinstance checks and subclasses relying on the old base may behave differently. github.com
And 5 more in this version.
starlette 0.31.0 breaking changes
- Removed
starlette.authentication.Response
starlette.authentication.Response was removed in starlette 0.31.0 pypi.org - Removed
starlette.concurrency.P
starlette.concurrency.P was removed in starlette 0.31.0 pypi.org
And 75 more in this version.
starlette 0.30.0 breaking changes
- Removed
Starlette 0.30.0 no longer supports Python 3.7. Users on Python 3.7 must stay on an earlier release or upgrade their Python version. github.com - Removed
starlette.requests.AwaitableOrContextManager.__aenter__
AwaitableOrContextManager.__aenter__ was removed in starlette 0.30.0 pypi.org
And 14 more in this version.
starlette 0.29.0 breaking changes
- Signature changed
starlette.responses.JSONResponse.__init__
Was def __init__(self, content: typing.Any, status_code: int = 200, headers: typing.Optional[typing.Dict[str, str]] = None, media_type: typing.Optional[str] = None, background: typing.Optional[BackgroundTask] = None) -> None; now def... pypi.org - Signature changed
starlette.templating.Jinja2Templates.TemplateResponse
Was def TemplateResponse(self, name: str, context: dict, status_code: int = 200, headers: typing.Optional[typing.Mapping[str, str]] = None, media_type: typing.Optional[str] = None, background: typing.Optional[BackgroundTask] = None) ->... pypi.org
And 1 more in this version.
starlette 0.28.0 breaking changes
- Removed
starlette.middleware.exceptions.is_async_callable
starlette.middleware.exceptions.is_async_callable was removed in starlette 0.28.0 pypi.org - Removed
starlette.middleware.exceptions.Message
starlette.middleware.exceptions.Message was removed in starlette 0.28.0 pypi.org
And 6 more in this version.
starlette 0.27.0 breaking changes
- Behavior changed
WebSocket.send_json
The JSON websocket payload produced by send_json is now minified. Code that depends on the exact text of the sent JSON may need to change. github.com
starlette 0.26.0 breaking changes
- Signature changed
starlette.applications.BaseRoute.url_path_for
Was def url_path_for(self, name: str, **path_params: typing.Any) -> URLPath; now def url_path_for(self, __name: str, **path_params: typing.Any) -> URLPath. pypi.org - Signature changed
starlette.applications.Router.__init__
Was def __init__(self, routes: typing.Optional[typing.Sequence[BaseRoute]] = None, redirect_slashes: bool = True, default: typing.Optional[ASGIApp] = None, on_startup: typing.Optional[typing.Sequence[typing.Callable]] = None, on_shutdown... pypi.org
And 15 more in this version.
starlette 0.25.0 breaking changes
- Removed
starlette.formparsers.MultiPartMessage
starlette.formparsers.MultiPartMessage was removed in starlette 0.25.0 pypi.org - Removed
starlette.formparsers.MultiPartParser.messages
MultiPartParser.messages was removed in starlette 0.25.0 pypi.org
And 6 more in this version.
starlette 0.24.0 breaking changes
- Removed
starlette.datastructures.UploadFile.spool_max_size
UploadFile.spool_max_size was removed in starlette 0.24.0 pypi.org - Removed
starlette.formparsers.UploadFile.spool_max_size
UploadFile.spool_max_size was removed in starlette 0.24.0 pypi.org
And 16 more in this version.
starlette 0.23.0 breaking changes
- Signature changed
starlette.testclient.TestClient.__init__
Was def __init__(self, app: ASGIApp, base_url: str = 'http://testserver', raise_server_exceptions: bool = True, root_path: str = '', backend: str = 'asyncio', backend_options: typing.Optional[typing.Dict[str, typing.Any]] = None, cookies... pypi.org
starlette 0.22.0 breaking changes
- Behavior changed
GZipMiddleware
Responses that already include a Content-Encoding header are no longer compressed by GZipMiddleware. Check code that relies on it compressing such responses. github.com - Behavior changed
TestClient
TestClient now passes query parameters without calling unquote() on them. Code that relied on the extra unquoting must quote or adjust its parameters. github.com
And 16 more in this version.
starlette 0.21.0 breaking changes
- Removed
starlette.datastructures.Headers.get
Headers.get was removed in starlette 0.21.0 pypi.org - Removed
starlette.formparsers.Headers.get
Headers.get was removed in starlette 0.21.0 pypi.org
And 18 more in this version.
starlette 0.20.0 breaking changes
- Removed
Starlette 0.20.0 no longer supports Python 3.6. Users on Python 3.6 must stay on an earlier release or upgrade their Python version. github.com - Signature changed
starlette.applications.Response.delete_cookie
Was def delete_cookie(self, key: str, path: str = '/', domain: typing.Optional[str] = None, secure: bool = False, httponly: bool = False, samesite: str = 'lax') -> None; now def delete_cookie(self, key: str, path: str = '/', domain... pypi.org
And 4 more in this version.
starlette 0.19.0 breaking changes
- Behavior changed
Internal responses with a 405 status code now insert an Allow header, which changes response headers. github.com - Behavior changed
Error handlers always run, including when the error happens in a background task, so existing handlers may now be invoked in more cases. github.com
And 45 more in this version.
starlette 0.18.0 breaking changes
- Behavior changed
Responses with Content-Length: 0 now keep the Content-Length header instead of omitting it, which may change response headers that code inspects. github.com - Behavior changed
Responses with 1xx, 204 and 304 status codes no longer get headers set, which may change response headers that code expects. github.com
And 42 more in this version.
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The API reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

Put your code on continuous maintenance.
Scan a public repository now, or give your agent one line.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.