pypi / yarl
yarl
What changed in yarl 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.
15 breaking4 new APIs and options3 performance1 behavior and defaults4 tooling7 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli inityarl 134 changes
Breaking changes 15
The pure Python quoter now rejects non-ASCII safe and protected characters when created, matching the C extension.
C and pure Python quoting implementations now reject percent signs in safe or protected when requoting, and spaces in safe or protected for query strings, keeping their behavior consistent.
The URL constructor and builder APIs now reject Unicode default-ignorable and format code points in hosts when IDNA normalization could change the host.
URL.build and URL.with_host now reject hosts that expand to /, ? or # under IDNA normalization.
When validate_host=True, IPv6 zone IDs now reject ASCII control characters and the empty string.
URL-building APIs now percent-encode a scheme-shaped leading colon in a relative path so its serialized form cannot be parsed as an absolute or executable-scheme URL.
Host validation now rejects Unicode percent characters that NFKC-normalize to a literal percent sign.
Support for the experimental free-threaded build of Python 3.13 was dropped.
Raises ValueError when the authority has multiple bracket characters or an opening bracket that is not at the start of the host subcomponent.
URLs with text before an opening bracket in the host component are now rejected as strictly invalid per RFC 3986.
A URL whose authority contains a backslash now raises ValueError because backslash is not valid under RFC 3986.
Rejects text after the closing bracket of an IP-literal host unless it is a port introduced by a colon or the end of the authority.
Python 3.9 support was dropped; Python 3.10 is now the minimum supported version.
The public yarl.quote function was dropped.
The public yarl.unquote function was dropped.
New APIs and options 4
Added a faster replacement for urllib.parse.parse_qsl with keep_blank_values=True that also accepts max_fields and encoding.
The PEP 517 build backend adds a config setting to choose in-tree or temporary-directory wheel builds; it defaults to a temporary directory and does not affect editable wheels.
yarl.URL can now be used seamlessly as a field type in pydantic models.
yarl.URL.build() supports encoded=True.
Performance 3
Improved C and pure Python unquoter performance, especially for long strings and strings with many percent-encoded characters.
Pydantic is imported only when needed to avoid increased import time.
Quoted strings that do not need requoting use a fast path.
Behavior and default changes 1
IP zones are no longer recoded.
Tooling 4
The project starts building and shipping riscv64 wheels.
The in-tree build backend now allows users to append CFLAGS externally; it also sets compiler flags for optimized release builds and line-tracing builds.
The build backend injects this compiler option into CFLAGS for temporary-directory wheel builds to make downstream build results more reproducible.
The in-tree build backend now allows users to append LDFLAGS externally; it also configures linker flags for line-tracing builds.
Fixes and other changes 7
Fixed query parsing to stop returning empty fields and preserve invalid percent-encoded UTF-8; behavior again matches urllib.parse.parse_qsl. Related query methods also no longer double encode those escapes.
The Cython quoting backend now drops lone surrogates consistently with the pure-Python backend and preserves percent escapes when a surrogate falls within one.
IPv6 Zone ID URLs now expose the decoded % separator in host instead of %25.
Preserves percent-encoding of the colon in relative paths when decoding it would materialize a URL scheme, keeping serialized output consistent with parsed properties.
This release was yanked from PyPI because of a partial wheel publishing problem.
Fixed pickling on Python 3.15; pickles from older yarl releases continue to load unchanged.
Updating a query with multiple keys is fixed.