werkzeug breaking changes
Updated December 4, 2026
On this page
Latest version 3.1.9, released September 27, 2026. Source repository
Its 3.1.0 release drops Python 3.8. Python end of life dates.
- From 2.0.0 to 3.1.9: 473 breaking changes in 13 versions.
- From 1.0.0 to 3.1.9: 905 breaking changes in 14 versions.
werkzeug 3.1.9 breaking changes
- Behavior changed
Authorization
Parsing of basic Authorization headers now disallows non-base64 characters, which were previously accepted. Clients sending such credentials will be rejected. github.com - Behavior changed
get_host
get_host now checks the port is in the valid range and can reject values it previously accepted. Code passing out-of-range ports must handle the error. github.com - Behavior changed
iri_to_uri
iri_to_uri keeps an empty username, an empty password and port 0 in its output instead of dropping them. Code that depends on the previous output must be checked. github.com - Behavior changed
max_form_memory_size
application/x-www-form-urlencoded form data is now limited only by max_content_length, not by max_form_memory_size. Apps relying on max_form_memory_size to cap such forms should review their limits. github.com - Behavior changed
safe_join
On Windows, safe_join now refuses special device names carrying empty NTFS alternate data stream markers, which it previously accepted. Code that relied on those paths being joined must handle the rejection. github.com - Behavior changed
uri_to_iri
uri_to_iri keeps an empty username, an empty password and port 0 in its output instead of dropping them. Code that depends on the previous output must be checked. github.com
werkzeug 3.1.7 breaking changes
- Behavior changed
get_host
The host value is validated character by character and an empty value is no longer allowed. A Unix socket server address is ignored. github.com - Behavior changed
host_is_trusted
The host value is validated character by character and an empty value is no longer allowed. The trusted_list argument is now optional. github.com - Behavior changed
merge_slashes
merge_slashes collapses any run of consecutive slashes rather than a limited number. URL handling that relied on the old behavior may change. github.com - Behavior changed
parse_list_header
Partially quoted items are preserved, empty items are discarded, and unclosed quoted values return an empty result. Code relying on the old parsing output may need review. github.com - Behavior changed
Request.host
The host value is validated character by character and an empty value is no longer allowed. A Unix socket server address is ignored. Code that depended on empty or socket hosts may need changes. github.com - Behavior changed
Response.make_conditional
Response.make_conditional sets the Accept-Ranges header even when the range request is not satisfiable. Code that checks response headers may see a new header. github.com - Signature changed
werkzeug.debug.host_is_trusted
Was def host_is_trusted(hostname: str | None, trusted_list: t.Iterable[str]) -> bool; now def host_is_trusted(hostname: str | None, trusted_list: t.Collection[str] | None = None) -> bool. pypi.org - Signature changed
werkzeug.routing.map.get_host
Was def get_host(environ: WSGIEnvironment, trusted_hosts: t.Iterable[str] | None = None) -> str; now def get_host(environ: WSGIEnvironment, trusted_hosts: t.Collection[str] | None = None) -> str. pypi.org - Signature changed
werkzeug.sansio.request.get_host
Was def get_host(scheme: str, host_header: str | None, server: tuple[str, int | None] | None = None, trusted_hosts: t.Iterable[str] | None = None) -> str; now def get_host(scheme: str, host_header: str | None, server: tuple[str, int |... pypi.org - Signature changed
werkzeug.sansio.utils.get_host
Was def get_host(scheme: str, host_header: str | None, server: tuple[str, int | None] | None = None, trusted_hosts: t.Iterable[str] | None = None) -> str; now def get_host(scheme: str, host_header: str | None, server: tuple[str, int |... pypi.org
And 6 more in this version. Sign up to see every change
werkzeug 3.1.6 breaking changes
- Behavior changed
safe_join
Security fix: safe_join now refuses Windows special device names within multi-segment paths. Code that passes such paths must handle the rejection or use different paths. github.com
werkzeug 3.1.5 breaking changes
- Removed
werkzeug.formparser.MultipartDecoder.last_newline
MultipartDecoder.last_newline was removed in Werkzeug 3.1.5 pypi.org - Behavior changed
safe_join
As a security fix, safe_join on Windows rejects more special device names, regardless of extension or surrounding spaces. Code that relied on it accepting such names must handle the rejection. github.com
werkzeug 3.1.4 breaking changes
- Removed
werkzeug.exceptions.Response
werkzeug.exceptions.Response was removed in Werkzeug 3.1.4 pypi.org - Behavior changed
safe_join
On Windows, safe_join no longer allows special device names, so paths using them are refused. This prevents reading from those devices through send_from_directory. github.com - Signature changed
werkzeug.exceptions.abort
Was def abort(status: int | Response, *args: t.Any, **kwargs: t.Any) -> t.NoReturn; now def abort(status: int | SansIOResponse, *args: t.Any, **kwargs: t.Any) -> t.NoReturn. pypi.org - Signature changed
werkzeug.exceptions.Aborter.__call__
Was def __call__(self, code: int | Response, *args: t.Any, **kwargs: t.Any) -> t.NoReturn; now def __call__(self, code: int | SansIOResponse, *args: t.Any, **kwargs: t.Any) -> t.NoReturn. pypi.org - Signature changed
werkzeug.exceptions.HTTPException.__init__
Was def __init__(self, description: str | None = None, response: Response | None = None) -> None; now def __init__(self, description: str | None = None, response: SansIOResponse | None = None) -> None. pypi.org - Signature changed
werkzeug.exceptions.HTTPException.get_response
Was def get_response(self, environ: WSGIEnvironment | WSGIRequest | None = None, scope: dict[str, t.Any] | None = None) -> Response; now def get_response(self, environ: WSGIEnvironment | WSGIRequest | None = None, scope: dict[str, t.Any] |... pypi.org - Signature changed
werkzeug.exceptions.InternalServerError.__init__
Was def __init__(self, description: str | None = None, response: Response | None = None, original_exception: BaseException | None = None) -> None; now def __init__(self, description: str | None = None, response: SansIOResponse | None =... pypi.org - Signature changed
werkzeug.exceptions.MethodNotAllowed.__init__
Was def __init__(self, valid_methods: t.Iterable[str] | None = None, description: str | None = None, response: Response | None = None) -> None; now def __init__(self, valid_methods: t.Iterable[str] | None = None, description: str | None =... pypi.org - Signature changed
werkzeug.exceptions.RequestedRangeNotSatisfiable.__init__
Was def __init__(self, length: int | None = None, units: str = 'bytes', description: str | None = None, response: Response | None = None) -> None; now def __init__(self, length: int | None = None, units: str = 'bytes', description: str |... pypi.org - Signature changed
werkzeug.exceptions.ServiceUnavailable.__init__
Was def __init__(self, description: str | None = None, response: Response | None = None, retry_after: datetime | int | None = None) -> None; now def __init__(self, description: str | None = None, response: SansIOResponse | None = None... pypi.org
And 6 more in this version. Sign up to see every change
werkzeug 3.1.3 breaking changes
- Behavior changed
MultiDict
Passing bytes or other Collection types as initial data is now treated as a single value, not multiple values. Code that relied on the 3.1.x Collection handling must pass a list, tuple, or set instead. github.com - Behavior changed
Request.host
When the Host header is missing and Request.host falls back to SERVER_NAME, an IPv6 address is now returned wrapped in square brackets. Code that parses this value must expect the brackets. github.com - Signature changed
werkzeug.datastructures.CombinedMultiDict.__or__
Was def __or__(self, other: cabc.Mapping[K, V | cabc.Collection[V]]) -> MultiDict[K, V]; now def __or__(self, other: cabc.Mapping[K, V | list[V] | tuple[V, ...] | set[V]]) -> MultiDict[K, V]. pypi.org - Signature changed
werkzeug.datastructures.FileMultiDict.__init__
Was def __init__(self, mapping: MultiDict[K, V] | cabc.Mapping[K, V | cabc.Collection[V]] | cabc.Iterable[tuple[K, V]] | None = None) -> None; now def __init__(self, mapping: MultiDict[K, V] | cabc.Mapping[K, V | list[V] | tuple[V, ...] |... pypi.org - Signature changed
werkzeug.datastructures.FileMultiDict.__ior__
Was def __ior__(self, other: cabc.Mapping[K, V | cabc.Collection[V]] | cabc.Iterable[tuple[K, V]]) -> te.Self; now def __ior__(self, other: cabc.Mapping[K, V | list[V] | tuple[V, ...] | set[V]] | cabc.Iterable[tuple[K, V]]) -> te.Self. pypi.org - Signature changed
werkzeug.datastructures.FileMultiDict.__or__
Was def __or__(self, other: cabc.Mapping[K, V | cabc.Collection[V]]) -> MultiDict[K, V]; now def __or__(self, other: cabc.Mapping[K, V | list[V] | tuple[V, ...] | set[V]]) -> MultiDict[K, V]. pypi.org - Signature changed
werkzeug.datastructures.FileMultiDict.update
Was def update(self, mapping: MultiDict[K, V] | cabc.Mapping[K, V | cabc.Collection[V]] | cabc.Iterable[tuple[K, V]]) -> None; now def update(self, mapping: MultiDict[K, V] | cabc.Mapping[K, V | list[V] | tuple[V, ...] | set[V]] |... pypi.org - Signature changed
werkzeug.datastructures.Headers.__init__
Was def __init__(self, defaults: Headers | MultiDict[str, t.Any] | cabc.Mapping[str, t.Any | cabc.Collection[t.Any]] | cabc.Iterable[tuple[str, t.Any]] | None = None) -> None; now def __init__(self, defaults: Headers | MultiDict[str... pypi.org - Signature changed
werkzeug.datastructures.Headers.__ior__
Was def __ior__(self, other: cabc.Mapping[str, t.Any | cabc.Collection[t.Any]] | cabc.Iterable[tuple[str, t.Any]]) -> te.Self; now def __ior__(self, other: cabc.Mapping[str, t.Any | list[t.Any] | tuple[t.Any, ...] | cabc.Set[t.Any]] |... pypi.org - Signature changed
werkzeug.datastructures.Headers.__or__
Was def __or__(self, other: cabc.Mapping[str, t.Any | cabc.Collection[t.Any]]) -> te.Self; now def __or__(self, other: cabc.Mapping[str, t.Any | list[t.Any] | tuple[t.Any, ...] | cabc.Set[t.Any]]) -> te.Self. pypi.org
And 12 more in this version. Sign up to see every change
Older versions
9 older versions, each with its first changes. Sign up to see every change
Show 9 older versions
werkzeug 3.1.2 breaking changes
- Behavior changed
Headers
The Headers class no longer subclasses MutableMapping because it does not fully match that interface. Code that checks isinstance against MutableMapping for Headers objects will now get False. github.com - Signature changed
werkzeug.datastructures.CombinedMultiDict.get
Was def get(self, key: K, default: V | T | None = None, type: type[T] | None = None) -> V | T | None; now def get(self, key: K, default: V | T | None = None, type: cabc.Callable[[V], T] | None = None) -> V | T | None. pypi.org
And 20 more in this version.
werkzeug 3.1.0 breaking changes
- Removed
Werkzeug 3.1.0 no longer supports Python 3.8, so users on that version must upgrade Python before installing it. github.com - Removed
Previously deprecated code has been removed, so code relying on it will fail and must be updated. github.com
And 218 more in this version.
werkzeug 3.0.6 breaking changes
- Behavior changed
max_form_memory_size
max_form_memory_size is now enforced when parsing large non-file form fields, so requests with such fields that exceed the limit may now be rejected. github.com - Behavior changed
safe_join
safe_join now rejects certain Windows paths on Python below 3.11 that were previously accepted, so code that relied on those paths must be checked. github.com
werkzeug 3.0.5 breaking changes
- Signature changed
werkzeug.middleware.shared_data.SharedDataMiddleware.__init__
Was def __init__(self, app: WSGIApplication, exports: dict[str, str | tuple[str, str]] | t.Iterable[tuple[str, str | tuple[str, str]]], disallow: None = None, cache: bool = True, cache_timeout: int = 60 * 60 * 12, fallback_mimetype: str =... pypi.org
werkzeug 3.0.3 breaking changes
- Behavior changed
The dev server's debugger now only answers requests from localhost, .localhost, 127.0.0.1, or the specified hostname. To allow other hosts, use the debugger middleware directly. github.com - Signature changed
werkzeug.datastructures.cache_control.cache_control_property
Was def cache_control_property(key: str, empty: _OptCPT, type: type[_CPT]) -> property; now def cache_control_property(key: str, empty: _CPT | None, type: type[_CPT]) -> property. pypi.org
And 72 more in this version.
werkzeug 3.0.2 breaking changes
- Signature changed
werkzeug.formparser.MultiPartParser.parse
Was def parse(self, stream: t.IO[bytes], boundary: bytes, content_length: int | None) -> tuple[MultiDict, MultiDict]; now def parse(self, stream: t.IO[bytes], boundary: bytes, content_length: int | None) -> tuple[MultiDict[str, str]... pypi.org - Signature changed
werkzeug.middleware.lint.check_type
Was def check_type(context: str, obj: object, need: t.Type = str) -> None; now def check_type(context: str, obj: object, need: type = str) -> None. pypi.org
And 6 more in this version.
werkzeug 3.0.0 breaking changes
- Removed
werkzeug.Client.cookie_jar
Client.cookie_jar was removed in Werkzeug 3.0.0 pypi.org - Removed
werkzeug.datastructures.auth.auth_property
werkzeug.datastructures.auth.auth_property was removed in Werkzeug 3.0.0 pypi.org
And 81 more in this version.
werkzeug 2.0.0 breaking changes
- Removed
werkzeug.datastructures.BytesIO
werkzeug.datastructures.BytesIO was removed in Werkzeug 2.0.0 pypi.org - Removed
werkzeug.datastructures.collections_abc
werkzeug.datastructures.collections_abc was removed in Werkzeug 2.0.0 pypi.org
And 430 more in this version.
werkzeug 1.0.0 breaking changes
- Removed
Code that was deprecated in earlier releases has been removed. Run 0.16.1 first to see deprecation warnings and upgrade your code before moving to 1.0.0. github.com - Removed
werkzeug.contrib
werkzeug.contrib was removed in Werkzeug 1.0.0 pypi.org
And 32 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.