NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #50 most downloaded on PyPI
Yet another URL library
Last release 19 days ago
15 Sep 2026
Release timing varies
gaps range from 1 weeks to 5 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
7 versions withdrawn
withdrawn after publishing
10 years old
139 releases · first in 2016
Important The v1.25.0 release never published: its riscv64 wheel job hit the job timeout, so no packages reached PyPI and no GitHub release was create
Important
The v1.25.0 release never published: its riscv64 wheel job hit the job timeout, so no packages reached PyPI and no GitHub release was created. No changes were lost; everything intended for v1.25.0 shipped in v1.25.1. Its changelog entries are reproduced below.
Stopped running the test suite inside the riscv64 wheel builds; every wheel
for that architecture is built under emulation and the test run did not fit
in the job timeout -- by :user:bdraco.
Related issues and pull requests on GitHub:
#1906.
(2026-09-15)
Made the C and pure Python quoting implementations reject % in safe
or protected when requoting and a space in safe or protected for
query strings, since the two implementations disagreed on those
configurations -- by :user:bdraco.
Related issues and pull requests on GitHub:
#1869.
Made the pure Python quoter reject non-ASCII safe and protected
characters when it is created, the same way the C extension does
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1893.
Fixed :attr:URL.query <yarl.URL.query> returning empty fields and keeping
invalid percent-encoded UTF-8 as is, a regression in 1.19.0. It matches
:func:urllib.parse.parse_qsl again, and so do the methods built on it,
:meth:~yarl.URL.update_query, :meth:~yarl.URL.without_query_params and
:meth:~yarl.URL.human_repr, which also no longer double encode those escapes
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1899.
Added :func:~yarl.query_to_pairs, a faster replacement for
:func:urllib.parse.parse_qsl with keep_blank_values=True that also
takes max_fields and encoding arguments -- by :user:bdraco.
Related issues and pull requests on GitHub:
#1899.
Added CodSpeed benchmarks for unquoting long strings, decoding
+ as a space, and parsing real world form bodies and large query
strings
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1884.
Stopped running the test suite inside the wheel build jobs outside of
release builds, since the test matrix already installs and tests the
same wheels, and added Python 3.15 and 3.15t to the test matrix so
those wheels stay covered. Release builds still test every wheel, and
all release checks in the CI workflow now use github.ref_type
-- by :user:bdraco.
Added tests that check the C and pure Python unquoting implementations
produce the same output, including long runs and invalid or incomplete
UTF-8 escapes, and that plus=True matches
:func:urllib.parse.unquote_plus for valid input -- by :user:bdraco.
Related issues and pull requests on GitHub:
#1888.
Added tests that check the C and pure Python unquoting implementations
agree for any combination of ignore, qs and plus, including
non-ASCII ignore characters -- by :user:bdraco.
Related issues and pull requests on GitHub:
#1890.
Added CodSpeed benchmarks for the pure Python unquoter, which is used
when the C extension is not available, and for unquoting with several
unsafe characters -- by :user:bdraco.
Related issues and pull requests on GitHub:
#1891.
Added tests that check the C and pure Python unquoting implementations
never return a string longer than their input -- by :user:bdraco.
Related issues and pull requests on GitHub:
#1896.
Added tests that pin how the C and pure Python unquoting implementations
handle overlong, surrogate and out of range UTF-8 escapes, the smallest and
largest valid sequences, and sequences interrupted by other characters, so
they also run when hypothesis is not installed -- by :user:bdraco.
Related issues and pull requests on GitHub:
#1898.
Improved performance of the C unquoter, especially for long strings and
strings with many percent-encoded characters -- by :user:bdraco.
Related issues and pull requests on GitHub:
#1886.
Improved performance of the pure Python unquoter, especially for long
strings and strings with many percent-encoded characters
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1889.
Removed the unused unsafe option from the internal unquoting classes;
the unquoting done by :class:~yarl.URL never depended on it
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1894.
Replaced magic numbers in the C quoting helpers with named constants
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1897.
Made the internal unquoting classes, C and pure Python, reject ignore
characters that are decoded anyway, such as letters or + when not parsing
a query string, instead of silently accepting them -- by :user:bdraco.
Related issues and pull requests on GitHub:
#1900.
Removed unused string constants from the C and pure Python quoting modules
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1901.
Simplified the C unquoter so it writes the escapes for ignored characters
itself instead of calling the quoter, which also made it slightly faster
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1902.
Made the internal unquoting classes, C and pure Python, reject non-ASCII
ignore characters, as the quoting classes already do for safe
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1903.
Simplified the pure Python unquoter so it writes the escapes for ignored
characters itself instead of calling the quoter, which also made decoding
escaped ASCII characters faster -- by :user:bdraco.
Related issues and pull requests on GitHub:
#1904.
One column per quarter.
Important The v1.24.3 and v1.24.4 releases never published: their wheel builds failed on the emulated odd architectures, so no packages reached PyPI a
Important
The v1.24.3 and v1.24.4 releases never published: their wheel builds failed on the emulated odd architectures, so no packages reached PyPI and no GitHub release was created for either version. No changes were lost; everything intended for v1.24.3 and v1.24.4 shipped in v1.24.5. Their changelog entries are reproduced below.
Restricted the exhaustive IDNA default-ignorable sweep test to a native
Linux x86_64 runner. It iterates roughly 140,000 code points and its result
does not depend on the architecture, so running it under emulated wheel
builds only added minutes and intermittently crashed the test workers
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1806.
(2026-07-19)
Stopped installing hypothesis in the wheel-build test environment. The
property-based quoting tests that need it are skipped there already, and
building it from source on architectures without a prebuilt wheel (such as
armv7l musllinux, where the build pulls in a Rust toolchain) was failing
the wheel jobs -- by :user:bdraco.
Related issues and pull requests on GitHub:
#1804.
(2026-07-19)
Fixed the :attr:~yarl.URL.host property incorrectly returning the
percent-encoded zone ID separator %25 instead of decoding it to %
for IPv6 Zone ID URLs (e.g. http://[fe80::1%251]/ now correctly exposes
.host as fe80::1%1 per :rfc:6874)
-- by :user:rodrigobnogueira.
Related issues and pull requests on GitHub:
#1653.
Fixed _check_netloc() missing % from its NFKC normalization character
check, which allowed Unicode characters U+FF05 (FULLWIDTH PERCENT SIGN) and
U+FE6A (SMALL PERCENT SIGN) to produce a literal % in url.host via
the standard library IDNA fallback
-- by :user:rodrigobnogueira.
Related issues and pull requests on GitHub:
#1655.
Fixed :meth:~yarl.URL.build failing to validate characters in the zone ID
portion of IPv6 addresses when validate_host=True, allowing control
characters such as CR, LF, and NUL to pass through into url.host.
Zone IDs now reject ASCII control characters and the empty string (a bare
trailing %) per
RFC 9844 §6.3 <https://datatracker.ietf.org/doc/html/rfc9844#section-6-3>_
-- by :user:rodrigobnogueira.
Related issues and pull requests on GitHub:
#1655.
Fixed the Cython quoting backend retaining a lone surrogate code
point when it was the only character forcing a rewrite; the
pure-Python backend already dropped lone surrogates, so both now
drop them and produce identical output
-- by :user:rodrigobnogueira.
Related issues and pull requests on GitHub:
#1751.
Fixed the Cython quoting backend percent-encoding the % of a
%XX escape when a lone surrogate fell within it, instead of
dropping the surrogate and keeping the escape; it now matches the
pure-Python backend and produces identical output
-- by :user:rodrigobnogueira.
Related issues and pull requests on GitHub:
#1752.
Fixed the Cython quoter preserving lone surrogate characters
(U+D800..U+DFFF) instead of dropping them; it now matches the
pure-Python quoter, which strips them, so both backends produce the
same output for the same input -- by :user:bdraco.
Related issues and pull requests on GitHub:
#1799.
Fixed :meth:URL.build() <yarl.URL.build> and
:meth:~yarl.URL.with_host accepting hosts that expand to a URL
delimiter (/, ? or #) under IDNA normalization; such hosts
are now rejected, so the builder APIs agree with the parser
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1800.
Fixed host encoding accepting Unicode default-ignorable and format code
points (such as soft hyphen, zero-width space, and word joiner) that IDNA
normalization silently drops or otherwise folds into a different host,
so the parsed host could differ from the input string; such hosts are now
rejected on both the :class:~yarl.URL constructor and the builder APIs
(:meth:URL.build() <yarl.URL.build> and :meth:~yarl.URL.with_host)
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1801.
Fixed :meth:~yarl.URL.build, :meth:~yarl.URL.joinpath (and the /
operator), :meth:~yarl.URL.with_name, and :meth:~yarl.URL.with_suffix
building a URL with no host and no scheme whose serialized string could be
parsed back as an absolute or executable-scheme URL; a scheme-shaped leading
colon in a relative path is now percent-encoded, matching the parser and
:meth:~yarl.URL.human_repr -- by :user:bdraco.
Related issues and pull requests on GitHub:
#1802.
Documented how :attr:~yarl.URL.host and :attr:~yarl.URL.raw_host
expose :rfc:6874 IPv6 zone identifiers and that the host subcomponent
properties include the zone identifier verbatim
-- by :user:rodrigobnogueira.
Related issues and pull requests on GitHub:
#998.
Fixed the stale with_name() example output in the API reference; the
apostrophe is a character that :rfc:3986 allows unencoded in path
segments -- by :user:rodrigobnogueira.
Related issues and pull requests on GitHub:
#1784.
The setuptools build dependency lower bound has been restored to be
>= 47 after an incorrect automated increase in #1657
-- by :user:bbhtt.
Related issues and pull requests on GitHub:
#1764.
Fixed the in-tree PEP 517 build backend to import Cython at the point
of use instead of module load time. The build front-ends that serve all
the build hooks from a single long-running backend process, the way
pyproject-api under tox does, import the backend before the
dynamically declared Cython build dependency is provisioned, so the
accelerated build used to fail with a NameError
-- by :user:rodrigobnogueira.
Related issues and pull requests on GitHub:
#1784.
Added UV_CONSTRAINT and UV_BUILD_CONSTRAINT alongside
PIP_CONSTRAINT and PIP_BUILD_CONSTRAINT in the
cibuildwheel environment so the :file:requirements/cython.txt
pin is honored under the build[uv] frontend; uv pip
ignores the PIP_ variables and reads only the UV_ ones,
while the PIP_ variants are kept for the pip fallback path
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1729.
Dependabot has been restricted to the requirements subdirectory to
avoid unintended updates outside dependency requirement files
-- by :user:bbhtt.
Related issues and pull requests on GitHub:
#1764.
Started running the Sphinx doctest builder in CI through the
doctest-docs tox environment, which existed but was never wired
into the lint matrix and never installed the package whose examples it
runs. Also added spelling word list entries so the spell check passes
with dictionary backends other than the one CI uses
-- by :user:rodrigobnogueira.
Related issues and pull requests on GitHub:
#1784.
Added regression tests ensuring that lone surrogates produced by
decoding invalid UTF-8 with surrogateescape are preserved when
building a URL with encoded=True and are dropped consistently by
the C and pure-Python quoting backends when parsing
-- by :user:pajod.
Related issues and pull requests on GitHub:
#991.
Expanded the test suite to pin IPv6 zone identifier handling per the
:rfc:6874 compatibility research: the %25 and legacy bare %
separator forms, empty zone and reserved character corner cases,
encoded=True round-trips, and zone survival through URL mutation
APIs -- by :user:rodrigobnogueira.
Related issues and pull requests on GitHub:
#998.
Switched the aarch64 and armv7l wheel builds to GitHub's native ARM runners. The aarch64 wheels now build without QEMU emulation, and armv7l runs on a
Switched the aarch64 and armv7l wheel builds to GitHub's native ARM
runners. The aarch64 wheels now build without QEMU emulation, and
armv7l runs on aarch64 hosts so its 32-bit ARM execution is far
cheaper than the previous aarch64-on-x86_64 path
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1724.
Restored per-runner native arches in the Windows wheel matrix on tag
releases. The previous CIBW_ARCHS_WINDOWS=AMD64 ARM64 setting made
both windows-latest and windows-11-arm cross-compile the other
arch, producing two artifacts with identically-named wheels whose
bytes differed; the deploy job's download-artifact ... merge-multiple
step tore those writes together, yielding a wheel that PyPI rejected
with 400 Invalid distribution file. ZIP archive not accepted: Mis-matched data size during the 1.24.0 and 1.24.1 releases
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1725.
This release was yanked from PyPI due to a partial wheel publishing problem.
Allowed re-running the deploy job after a partial release failure: the
Make Release step now skips when the GitHub Release already exists,
and the PyPI publish step uses skip-existing so dists that were
already uploaded on a prior attempt do not break the retry
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1721.
Removals and backward incompatible breaking changes
Delayed importing pydantic until it's needed to avoid increased import time -- by :user:Dreamsorcerer.
Fixed pickling of :class:~yarl.URL on Python 3.15, where SplitResult
gained a __getstate__ that requires attributes set by __init__.
__getstate__ now returns the raw 5-tuple instead of a SplitResult
built via tuple.__new__, so pickling no longer touches SplitResult
serialization at all. Pickles produced by older yarl releases (which embed
a SplitResult) continue to load unchanged
-- by :user:befeleme.
Related issues and pull requests on GitHub:
#1632, #1642, #1687.
Fixed a parsing issue where URLs containing text before an opening bracket
in the host component (e.g. http://127.0.0.1[aa::ff]) were silently accepted
instead of being rejected as strictly invalid per RFC 3986
-- by :user:rodrigobnogueira.
Related issues and pull requests on GitHub:
#1654.
Raise :exc:ValueError when a URL's authority component contains a
backslash, which is not a valid character per :rfc:3986
-- by :user:rodrigobnogueira.
Related issues and pull requests on GitHub:
#1659.
Fixed a host-confusion parsing bug where URLs containing multiple bracket
characters in the host component (e.g. http://[:localhost[]].google:80)
were silently parsed as an unintended host. Both split_url() and
split_netloc() now raise :exc:ValueError when more than one [ or
] is found in the authority, or when [ does not appear at the start of
the host subcomponent, in compliance with :rfc:3986 -- by
:user:rodrigobnogueira.
Related issues and pull requests on GitHub:
#1661.
Fixed a parser/serializer inconsistency where percent-encoded characters in
the scheme portion of a URL (e.g. ht%74p://...) were decoded by the
requoter, causing str() and :py:meth:~yarl.URL.human_repr to emit an
absolute URL with a scheme and host while the parsed properties
(:attr:~yarl.URL.scheme, :attr:~yarl.URL.host, :attr:~yarl.URL.absolute)
reported a relative, hostless URL. The fix preserves the percent-encoding of
the colon (%3A) in relative paths whenever decoding it would materialize a
URL scheme -- by :user:rodrigobnogueira.
Related issues and pull requests on GitHub:
#1669.
Fixed a parsing issue where URLs containing text after the closing bracket
of an IP-literal host (e.g. http://[::1]allowed.example:1/) were silently
accepted and normalized to the bracketed IP address (http://[::1]:1/),
dropping the trailing suffix and changing the effective host identity.
Per RFC 3986, after the closing ] only : followed by a port number or
end-of-authority is valid
-- by :user:rodrigobnogueira.
Related issues and pull requests on GitHub:
#1672.
Start building and shipping riscv64 wheels
-- by :user:justeph.
Related issues and pull requests on GitHub:
#1626.
Dropped support for the experimental free-threaded build of Python 3.13 -- by :user:ngoldbaum.
Related issues and pull requests on GitHub:
#1667.
Added a note in the :meth:~yarl.URL.with_query documentation explaining
that types implementing __int__ (e.g. :class:~uuid.UUID) are
converted to integers, and advising users to cast to :class:str when the
human-readable representation is needed -- by :user:r266-tech.
Resolved a ruff ISC004 violation in the PEP 517 build backend so the
pre-commit ruff-check hook passes again
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1674.
Renamed the actions/checkout depth input to fetch-depth in the
reusable codspeed workflow so the actionlint pre-commit hook passes and the
intended shallow clone actually takes effect
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1676.
Bumped the pinned pyupgrade pre-commit hook to v3.21.2 so it stops
crashing on Python 3.14, which made tokenize.cookie_re bytes-only
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1677.
The type preciseness coverage report generated by MyPy <https://mypy-lang.org>__ is now uploaded to Coveralls <https://coveralls.io/github/aio-libs/yarl>__ and
will not be included in the Codecov views <https://app.codecov.io/gh/aio-libs/yarl>__ going forward
-- by :user:webknjaz.
Related issues and pull requests on GitHub:
#1680.
Raised the per-matrix-cell timeout of the CI Test job from
5 to 10 minutes to prevent false failures on slower runners
-- by :user:aiolibsbot.
Related issues and pull requests on GitHub:
#1683.
Added an AGENTS.md orientation file at the repository root,
covering the pull request template, CHANGES/ news fragment
conventions, draft-PR workflow, and the Cython quoter layout, so
LLM contributors land changes that match project style
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1685.
Documented in :file:AGENTS.md that the coverage gate also
applies to test code, so unreachable defensive raise guards
and one-sided cleanup branches in tests will fail CI
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1689.
Shrunk the CI wheel-build matrix on pull requests and non-tag pushes by
restricting CIBW_ARCHS_MACOS to arm64, CIBW_ARCHS_WINDOWS to
AMD64, and skipping the windows-11-arm runner -- the test matrix only
exercises those architectures, so the previously-built x86_64 macOS and
ARM64 Windows wheels were never installed. Tag releases still build the
full architecture set
-- by :user:aiolibsbot.
Related issues and pull requests on GitHub:
#1692.
Documented the docs spell check (make doc-spelling) in
:file:AGENTS.md as a pre-push gate, mirroring
aio-libs/multidict#1345 <https://github.com/aio-libs/multidict/pull/1345>__. The
spell checker reads every CHANGES/*.rst fragment as part
of the docs build, so an unknown technical word in a news
fragment fails CI before a human sees the PR
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1693.
Added a CLAUDE.md at the repository root that imports
:file:AGENTS.md via Claude Code's @-syntax, so the
project's LLM contributor rules load automatically when
working in Claude Code
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1696.
Enforced top-level imports across yarl and tests via the ruff
PLC0415 rule, wired through a new ruff-check pre-commit hook.
Function-scoped imports must now opt in with # noqa: PLC0415 plus
a comment explaining the import-time reason. Dropped the yesqa
hook, which could not recognize ruff-only codes and stripped the new
noqa comments as stale; a wider migration off flake8 onto ruff
will follow separately
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1697.
Migrated the main tree from standalone black and isort
pre-commit hooks to ruff format and the ruff I lint rule,
sharing the existing [tool.ruff] config in pyproject.toml.
ruff-check now runs with --fix so import-order fixes apply
on commit, and the orphan [isort] block in setup.cfg was
removed. The packaging/pep517_backend/ subtree keeps its own
.ruff.toml and is unaffected
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1698.
Switched the cibuildwheel build frontend to build[uv] so
that uv provisions every build and test virtual environment
in the wheel matrix. Test-dependency installation in particular
drops from a multi-second pip install per ABI to a roughly
sub-second uv resolve
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1699.
Restructured the root :file:CLAUDE.md to import contributor
context from a shared aio-libs layer
(~/.claude/aio-libs/context.md), a project-specific layer
(~/.claude/aio-libs/yarl/context.md), the in-tree
:file:AGENTS.md, and an optional per-checkout
:file:CLAUDE.local.md override (added to :file:.gitignore),
so shared aio-libs guidance can live outside the repository
while project rules continue to load automatically in Claude
Code -- by :user:aiolibsbot.
Switched CI/CD to tox-dev/workflow's :file:reusable-tox.yml
driven by an in-tree :file:tox.ini. The build,
metadata-validation and lint (pre-commit,
spellcheck-docs, build-docs) jobs all run through the
reusable workflow; MyPy coverage uploads to Coveralls from a
post-tox-job hook
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1711.
Switched the CI test job from actions/setup-python to
astral-sh/setup-uv with uv pip install. Pre-release
interpreters skip the wheel cache so each run resolves freshly
against the current snapshot
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1715.
Switched the Aiohttp workflow that runs the aiohttp test
suite against the in-tree yarl checkout from
actions/setup-python to astral-sh/setup-uv with uv pip install
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1716.
Switched the Aiohttp workflow's make .develop step to
install aiohttp's dev env through uv pip by passing
PIP="uv pip"
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1717.
The deprecated license classifier was removed from :file: setup.cfg -- by :user: yegorich .
Added support for pydantic, the :class:~yarl.URL could be used as a
field type in pydantic models seamlessly.
Related issues and pull requests on GitHub:
#1607.
The CI has been set up to notify Codecov about upload completion
-- by :user:webknjaz.
With this, Codecov no longer needs to guess whether it received all
the intended coverage reports or not.
Related issues and pull requests on GitHub:
#1577.
The in-tree build backend allows the end-users appending
CFLAGS and LDFLAGS by setting respective environment
variables externally.
It additionally sets up default compiler flags to perform
building with maximum optimization in release mode. This
makes the resulting artifacts shipped to PyPI smaller.
When line tracing is requested, the compiler and linker
flags are configured to include as much information as
possible for debugging and coverage tracking. The
development builds are therefore smaller.
-- by :user:webknjaz
Related issues and pull requests on GitHub:
#1586.
The :pep:517 build backend now supports a new config
setting for controlling whether to build the project in-tree
or in a temporary directory. It only affects wheels and is
set up to build in a temporary directory by default. It does
not affect editable wheel builds — they will keep being
built in-tree regardless.
-- by :user:webknjaz
Here's an example of using this setting:
.. code-block:: console
$ python -m build
--config-setting=build-inplace=true
Related issues and pull requests on GitHub:
#1590.
Starting this version, when building the wheels is happening
in an automatically created temporary directory, the build
backend makes an effort to normalize the respective file
system path to a deterministic source checkout directory.
-- by :user:webknjaz
It does so by injecting the -ffile-prefix-map compiler
option into the CFLAGS environment variable as suggested
by known reproducible build practices <https://reproducible-builds.org/docs/build-path/>__.
The effect is that downstreams will get more reproducible
build results.
Related issues and pull requests on GitHub:
#1591.
Dropped Python 3.9 support; Python 3.10 is the minimal supported Python version
-- by :user:bdraco.
Related issues and pull requests on GitHub:
#1609.
The deprecated license classifier was removed from :file:setup.cfg
-- by :user:yegorich.
Related issues and pull requests on GitHub:
#1550.
The in-tree build backend allows the end-users appending
CFLAGS and LDFLAGS by setting respective environment
variables externally.
It additionally sets up default compiler flags to perform
building with maximum optimization in release mode. This
makes the resulting artifacts shipped to PyPI smaller.
When line tracing is requested, the compiler and linker
flags are configured to include as much information as
possible for debugging and coverage tracking. The
development builds are therefore smaller.
-- by :user:webknjaz
Related issues and pull requests on GitHub:
#1586.
The CI has been updated to consistently benchmark optimized
release builds -- by :user:webknjaz.
When the release workflow is triggered, the pre-built wheels
ready to hit PyPI are being tested. Otherwise, the job
builds the project from source, while the rest of the
workflow uses debug builds for line tracing and coverage
collection.
Related issues and pull requests on GitHub:
#1587.
Added arm64 Windows wheel builds -- by finnagin.
Added arm64 Windows wheel builds
-- by :user:finnagin.
Related issues and pull requests on GitHub: #1516.
Added arm64 Windows wheel builds
-- by :user:finnagin.
Related issues and pull requests on GitHub:
#1516.
(2025-10-05)
Added arm64 Windows wheel builds -- by finnagin.
Related issues and pull requests on GitHub: 1516.
The reusable-cibuildwheel.yml workflow has been refactored to be more generic and ci-cd.yml now holds all the configuration toggles -- by webknjaz.
The :file:reusable-cibuildwheel.yml workflow has been refactored to
be more generic and :file:ci-cd.yml now holds all the configuration
toggles -- by :user:webknjaz.
Related issues and pull requests on GitHub: #1535.
When building wheels, the source distribution is now passed directly
to the cibuildwheel invocation -- by :user:webknjaz.
Related issues and pull requests on GitHub: #1536.
Added CI for Python 3.14 -- by :user:kumaraditya303.
Related issues and pull requests on GitHub: #1560.
The :file:reusable-cibuildwheel.yml workflow has been refactored to
be more generic and :file:ci-cd.yml now holds all the configuration
toggles -- by :user:webknjaz.
Related issues and pull requests on GitHub:
#1535.
When building wheels, the source distribution is now passed directly
to the cibuildwheel invocation -- by :user:webknjaz.
Related issues and pull requests on GitHub:
#1536.
Added CI for Python 3.14 -- by :user:kumaraditya303.
Related issues and pull requests on GitHub:
#1560.
Started raising a :exc: ValueError exception raised for corrupted IPv6 URL values.
Started raising a :exc:ValueError exception raised for corrupted
IPv6 URL values.
These fixes the issue where exception :exc:IndexError was
leaking from the internal code because of not being handled and
transformed into a user-facing error. The problem was happening
under the following conditions: empty IPv6 URL, brackets in
reverse order.
-- by :user:MaelPic.
Related issues and pull requests on GitHub:
#1512.
Updated to use Cython 3.1 universally across the build path -- by :user:lysnikolaou.
Related issues and pull requests on GitHub:
#1514.
Made Cython line tracing opt-in via the with-cython-tracing build config setting -- by :user:bdraco.
Previously, line tracing was enabled by default in :file:pyproject.toml, which caused build issues for some users and made wheels nearly twice as slow.
Now line tracing is only enabled when explicitly requested via pip install . --config-setting=with-cython-tracing=true or by setting the YARL_CYTHON_TRACING environment variable.
Related issues and pull requests on GitHub:
#1521.
Implemented support for the free-threaded build of CPython 3.13 -- by lysnikolaou.
Implemented support for the free-threaded build of CPython 3.13 -- by :user:lysnikolaou.
Related issues and pull requests on GitHub: #1456.
Started building wheels for the free-threaded build of CPython 3.13 -- by :user:lysnikolaou.
Related issues and pull requests on GitHub: #1456.
Fixed entire name being re-encoded when using meth:yarl.URL.with_suffix -- by NTFSvolume.
Fixed entire name being re-encoded when using yarl.URL.with_suffix -- by NTFSvolume.
Related issues and pull requests on GitHub: #1468.
Started building armv7l wheels for manylinux -- by bdraco.
Related issues and pull requests on GitHub: #1495.
GitHub Actions CI/CD is now configured to manage caching pip-ecosystem dependencies using re-actors/cache-python-deps -- an action by webknjaz that takes into account ABI stability and the exact version of Python runtime.
Related issues and pull requests on GitHub: #1471.
Increased minimum propcache version to 0.2.1 to fix failing tests -- by bdraco.
Related issues and pull requests on GitHub: #1479.
Added all hidden folders to pytest's norecursedirs to prevent it from trying to collect tests there -- by lysnikolaou.
Related issues and pull requests on GitHub: #1480.
Improved accuracy of type annotations -- by Dreamsorcerer.
Related issues and pull requests on GitHub: #1484.
Improved performance of parsing query strings -- by bdraco.
Related issues and pull requests on GitHub: #1493, #1497.
Improved performance of the C unquoter -- by bdraco.
Related issues and pull requests on GitHub: #1496, #1498.
Fixed uppercase ASCII hosts being rejected by URL.build() and meth:~yarl.URL.with_host -- by bdraco.
Fixed uppercase ASCII hosts being rejected by URL.build() and ~yarl.URL.with_host -- by bdraco.
Related issues and pull requests on GitHub: #954, #1442.
Improved performances of multiple path properties on cache miss -- by bdraco.
Related issues and pull requests on GitHub: #1443.
This release also failed to fully upload and was yanked from PyPI. Please use 1.18.3 instead.
This release also failed to fully upload and was yanked from PyPI. Please use 1.18.3 instead.
No significant changes.
This release failed to fully upload and was yanked from PyPI. Please use 1.18.2 instead.
This release failed to fully upload and was yanked from PyPI. Please use 1.18.2 instead.
Improved cache performance when ~yarl.URL objects are constructed from ~yarl.URL.build with encoded=True -- by bdraco.
Related issues and pull requests on GitHub: #1432.
Improved cache performance for operations that produce a new ~yarl.URL object -- by bdraco.
Related issues and pull requests on GitHub: #1434, #1436.
Added keep_query and keep_fragment flags in the meth:yarl.URL.with_path, meth:yarl.URL.with_name and meth:yarl.URL.with_suffix methods, allowing users
Added keep_query and keep_fragment flags in the yarl.URL.with_path, yarl.URL.with_name and yarl.URL.with_suffix methods, allowing users to optionally retain the query string and fragment in the resulting URL when replacing the path -- by paul-nameless.
Related issues and pull requests on GitHub: #111, #1421.
Started running downstream aiohttp tests in CI -- by Cycloctane.
Related issues and pull requests on GitHub: #1415.
Improved performance of converting ~yarl.URL to a string -- by bdraco.
Related issues and pull requests on GitHub: #1422.
Stopped implicitly allowing the use of Cython pre-release versions when building the distribution package -- by ajsanchezsanz and markgreene74.
Stopped implicitly allowing the use of Cython pre-release versions when building the distribution package -- by ajsanchezsanz and markgreene74.
Related issues and pull requests on GitHub: #1411, #1412.
Fixed a bug causing ~yarl.URL.port to return the default port when the given port was zero -- by gmacon.
Related issues and pull requests on GitHub: #1413.
Make error messages include details of incorrect type when port is not int in ~yarl.URL.build. -- by Cycloctane.
Related issues and pull requests on GitHub: #1414.
Stopped implicitly allowing the use of Cython pre-release versions when building the distribution package -- by ajsanchezsanz and markgreene74.
Related issues and pull requests on GitHub: #1411, #1412.
Improved performance of the ~yarl.URL.joinpath method -- by bdraco.
Related issues and pull requests on GitHub: #1418.
Improved performance of many ~yarl.URL methods -- by bdraco.
Improved performance of many ~yarl.URL methods -- by bdraco.
Related issues and pull requests on GitHub: #1396, #1397, #1398.
Improved performance of passing a dict or str to ~yarl.URL.extend_query -- by bdraco.
Related issues and pull requests on GitHub: #1401.
Added ~yarl.URL.host_port_subcomponent which returns the RFC 3986#section-3.2.2 host and RFC 3986#section-3.2.3 port subcomponent -- by bdraco.
Added ~yarl.URL.host_port_subcomponent which returns the 3986#section-3.2.2 host and 3986#section-3.2.3 port subcomponent -- by bdraco.
Related issues and pull requests on GitHub: #1375.
Removals and backward incompatible breaking changes
Fixed blocking I/O to load Python code when creating a new ~yarl.URL with non-ascii characters in the network location part -- by bdraco.
Related issues and pull requests on GitHub: #1342.
Migrated to using a single cache for encoding hosts -- by bdraco.
Passing ip_address_size and host_validate_size to ~yarl.cache_configure is deprecated in favor of the new encode_host_size parameter and will be removed in a future release. For backwards compatibility, the old parameters affect the encode_host cache size.
Related issues and pull requests on GitHub: #1348, #1357, #1363.
Improved performance of constructing ~yarl.URL -- by bdraco.
Related issues and pull requests on GitHub: #1336.
Improved performance of calling ~yarl.URL.build and constructing unencoded ~yarl.URL -- by bdraco.
Related issues and pull requests on GitHub: #1345.
Reworked the internal encoding cache to improve performance on cache hit -- by bdraco.
Related issues and pull requests on GitHub: #1369.
Removals and backward incompatible breaking changes
Fixed blocking I/O to load Python code when creating a new ~yarl.URL with non-ascii characters in the network location part -- by bdraco.
Related issues and pull requests on GitHub: #1342.
Migrated to using a single cache for encoding hosts -- by bdraco.
Passing ip_address_size and host_validate_size to ~yarl.cache_configure is deprecated in favor of the new encode_host_size parameter and will be removed in a future release. For backwards compatibility, the old parameters affect the encode_host cache size.
Related issues and pull requests on GitHub: #1348, #1357, #1363.
Improved performance of constructing ~yarl.URL -- by bdraco.
Related issues and pull requests on GitHub: #1336.
Improved performance of calling ~yarl.URL.build and constructing unencoded ~yarl.URL -- by bdraco.
Related issues and pull requests on GitHub: #1345.
Reworked the internal encoding cache to improve performance on cache hit -- by bdraco.
Related issues and pull requests on GitHub: #1369.
Improved performance of the meth:~yarl.URL.joinpath method -- by bdraco.
Improved performance of the ~yarl.URL.joinpath method -- by bdraco.
Related issues and pull requests on GitHub: #1304.
Improved performance of the ~yarl.URL.extend_query method -- by bdraco.
Related issues and pull requests on GitHub: #1305.
Improved performance of the ~yarl.URL.origin method -- by bdraco.
Related issues and pull requests on GitHub: #1306.
Improved performance of the ~yarl.URL.with_path method -- by bdraco.
Related issues and pull requests on GitHub: #1307.
Improved performance of the ~yarl.URL.with_query method -- by bdraco.
Related issues and pull requests on GitHub: #1308, #1328.
Improved performance of the ~yarl.URL.update_query method -- by bdraco.
Related issues and pull requests on GitHub: #1309, #1327.
Improved performance of the ~yarl.URL.join method -- by bdraco.
Related issues and pull requests on GitHub: #1313.
Improved performance of ~yarl.URL equality checks -- by bdraco.
Related issues and pull requests on GitHub: #1315.
Improved performance of ~yarl.URL methods that modify the network location -- by bdraco.
Related issues and pull requests on GitHub: #1316.
Improved performance of the ~yarl.URL.with_fragment method -- by bdraco.
Related issues and pull requests on GitHub: #1317.
Improved performance of calculating the hash of ~yarl.URL objects -- by bdraco.
Related issues and pull requests on GitHub: #1318.
Improved performance of the ~yarl.URL.relative method -- by bdraco.
Related issues and pull requests on GitHub: #1319.
Improved performance of the ~yarl.URL.with_name method -- by bdraco.
Related issues and pull requests on GitHub: #1320.
Improved performance of ~yarl.URL.parent -- by bdraco.
Related issues and pull requests on GitHub: #1321.
Improved performance of the ~yarl.URL.with_scheme method -- by bdraco.
Related issues and pull requests on GitHub: #1322.
Improved performance of the quoter when all characters are safe -- by bdraco.
Improved performance of the quoter when all characters are safe -- by bdraco.
Related issues and pull requests on GitHub: #1288.
Improved performance of unquoting strings -- by bdraco.
Related issues and pull requests on GitHub: #1292, #1293.
Improved performance of calling ~yarl.URL.build -- by bdraco.
Related issues and pull requests on GitHub: #1297.
Removals and backward incompatible breaking changes
Fixed ~yarl.URL.build failing to validate paths must start with a / when passing authority -- by bdraco.
The validation only worked correctly when passing host.
Related issues and pull requests on GitHub: #1265.
Removed support for Python 3.8 as it has reached end of life -- by bdraco.
Related issues and pull requests on GitHub: #1203.
Improved performance of constructing ~yarl.URL when the net location is only the host -- by bdraco.
Related issues and pull requests on GitHub: #1271.
Improved performance of converting ~yarl.URL to a string -- by bdraco.
Improved performance of converting ~yarl.URL to a string -- by bdraco.
Related issues and pull requests on GitHub: #1234.
Improved performance of ~yarl.URL.joinpath -- by bdraco.
Related issues and pull requests on GitHub: #1248, #1250.
Improved performance of constructing query strings from ~multidict.MultiDict -- by bdraco.
Related issues and pull requests on GitHub: #1256.
Improved performance of constructing query strings with int values -- by bdraco.
Related issues and pull requests on GitHub: #1259.
Improved performance of calling meth:~yarl.URL.build -- by bdraco.
Improved performance of calling ~yarl.URL.build -- by bdraco.
Related issues and pull requests on GitHub: #1222.
Improved performance of all ~yarl.URL methods that create new ~yarl.URL objects -- by bdraco.
Related issues and pull requests on GitHub: #1226.
Improved performance of ~yarl.URL methods that modify the network location -- by bdraco.
Related issues and pull requests on GitHub: #1229.
Fixed validation with meth:~yarl.URL.with_scheme when passed scheme is not lowercase -- by bdraco.
Fixed validation with ~yarl.URL.with_scheme when passed scheme is not lowercase -- by bdraco.
Related issues and pull requests on GitHub: #1189.
Started building armv7l wheels -- by bdraco.
Related issues and pull requests on GitHub: #1204.
Improved performance of constructing unencoded ~yarl.URL objects -- by bdraco.
Related issues and pull requests on GitHub: #1188.
Added a cache for parsing hosts to reduce overhead of encoding ~yarl.URL -- by bdraco.
Related issues and pull requests on GitHub: #1190.
Improved performance of constructing query strings from ~collections.abc.Mapping -- by bdraco.
Related issues and pull requests on GitHub: #1193.
Improved performance of converting ~yarl.URL objects to strings -- by bdraco.
Related issues and pull requests on GitHub: #1198.
Packaging updates and notes for downstreams
Switched to using the propcache package for property caching -- by bdraco.
The propcache package is derived from the property caching code in yarl and has been broken out to avoid maintaining it for multiple projects.
Related issues and pull requests on GitHub: #1169.
Started testing with Hypothesis -- by webknjaz and bdraco.
Special thanks to Zac-HD for helping us get started with this framework.
Related issues and pull requests on GitHub: #860.
Improved performance of ~yarl.URL.is_default_port when no explicit port is set -- by bdraco.
Related issues and pull requests on GitHub: #1168.
Improved performance of converting ~yarl.URL to a string when no explicit port is set -- by bdraco.
Related issues and pull requests on GitHub: #1170.
Improved performance of the ~yarl.URL.origin method -- by bdraco.
Related issues and pull requests on GitHub: #1175.
Improved performance of encoding hosts -- by bdraco.
Related issues and pull requests on GitHub: #1176.
Improved performance of calling meth:~yarl.URL.build with authority -- by bdraco.
Improved performance of calling ~yarl.URL.build with authority -- by bdraco.
Related issues and pull requests on GitHub: #1163.
(2024-09-27)
Improved performance of calling ~yarl.URL.build with authority -- by bdraco.
Related issues and pull requests on GitHub: 1163.
Started rejecting ASCII hostnames with invalid characters. For host strings that look like authority strings, the exception message includes advice on
Started rejecting ASCII hostnames with invalid characters. For host strings that look like authority strings, the exception message includes advice on what to do instead -- by mjpieters.
Related issues and pull requests on GitHub: #880, #954.
Fixed IPv6 addresses missing brackets when the ~yarl.URL was converted to a string -- by bdraco.
Related issues and pull requests on GitHub: #1157, #1158.
Added ~yarl.URL.host_subcomponent which returns the 3986#section-3.2.2 host subcomponent -- by bdraco.
The only current practical difference between ~yarl.URL.raw_host and ~yarl.URL.host_subcomponent is that IPv6 addresses are returned bracketed.
Related issues and pull requests on GitHub: #1159.
This release was created because the signatures failed to upload for 1.12.0
No significant changes.
This release was created because the signatures failed to upload for 1.12.0
Removals and backward incompatible breaking changes
Added ~yarl.URL.path_safe to be able to fetch the path without %2F and %25 decoded -- by bdraco.
Related issues and pull requests on GitHub: #1150.
Restore decoding %2F (/) in URL.path -- by bdraco.
This change restored the behavior before #1057.
Related issues and pull requests on GitHub: #1151.
Improved performance of processing paths -- by bdraco.
Related issues and pull requests on GitHub: #1143.
Allowed scheme replacement for relative URLs if the scheme does not require a host -- by bdraco.
Allowed scheme replacement for relative URLs if the scheme does not require a host -- by :user:bdraco.
Related issues and pull requests on GitHub: #280, #1138.
Allowed empty host for URL schemes other than the special schemes listed in the WHATWG URL spec -- by :user:bdraco.
Related issues and pull requests on GitHub: #1136.
Loosened restriction on integers as query string values to allow classes that implement __int__ -- by :user:bdraco.
Related issues and pull requests on GitHub: #1139.
Improved performance of normalizing paths -- by :user:bdraco.
Related issues and pull requests on GitHub: #1137.
Added URL.extend_query() method, which can be used to extend parameters without replacing same named keys -- by bdraco.
Added URL.extend_query() method, which can be used to extend parameters without replacing same named keys -- by bdraco.
This method was primarily added to replace the inefficient hand rolled method currently used in aiohttp.
Related issues and pull requests on GitHub: #1128.
Improved performance of the Cython cached_property implementation -- by bdraco.
Related issues and pull requests on GitHub: #1122.
Simplified computing ports by removing unnecessary code -- by bdraco.
Related issues and pull requests on GitHub: #1123.
Improved performance of encoding non IPv6 hosts -- by bdraco.
Related issues and pull requests on GitHub: #1125.
Improved performance of URL.build() when the path, query string, or fragment is an empty string -- by bdraco.
Related issues and pull requests on GitHub: #1126.
Improved performance of the URL.update_query() method -- by bdraco.
Related issues and pull requests on GitHub: #1130.
Improved performance of processing query string changes when arguments are str -- by bdraco.
Related issues and pull requests on GitHub: #1131.
Fixed joining a path when the existing path was empty -- by bdraco.
Fixed joining a path when the existing path was empty -- by bdraco.
A regression in URL.join() was introduced in #1082.
Related issues and pull requests on GitHub: #1118.
Added URL.without_query_params() method, to drop some parameters from query string -- by hongquan.
Related issues and pull requests on GitHub: #774, #898, #1010.
The previously protected types _SimpleQuery, _QueryVariable, and _Query are now available for use externally as SimpleQuery, QueryVariable, and Query -- by bdraco.
Related issues and pull requests on GitHub: #1050, #1113.
Replaced all ~typing.Optional with ~typing.Union -- by bdraco.
Related issues and pull requests on GitHub: #1095.
Significantly improved performance of parsing the network location -- by bdraco.
Related issues and pull requests on GitHub: #1112.
Added internal types to the cache to prevent future refactoring errors -- by bdraco.
Related issues and pull requests on GitHub: #1117.
Fixed a TypeError with MultiDictProxy and Python 3.8 -- by bdraco.
Fixed a :exc:TypeError with MultiDictProxy and Python 3.8 -- by :user:bdraco.
Related issues and pull requests on GitHub: #1084, #1105, #1107.
Improved performance of encoding hosts -- by :user:bdraco.
Previously, the library would unconditionally try to parse a host as an IP Address. The library now avoids trying to parse a host as an IP Address if the string is not in one of the formats described in :rfc:3986#section-3.2.2.
Related issues and pull requests on GitHub: #1104.
URL.join() has been changed to match RFC 3986 and align with / operation and URL.joinpath() when joining URLs with empty segments. Previously func:url
URL.join() has been changed to match 3986 and align with / operation and URL.joinpath() when joining URLs with empty segments. Previously urllib.parse.urljoin was used, which has known issues with empty segments (python/cpython#84774).
Due to the semantics of URL.join(), joining an URL with scheme requires making it relative, prefixing with ./.
>>> URL("https://web.archive.org/web/").join(URL("./https://github.com/aio-libs/yarl"))
URL('https://web.archive.org/web/https://github.com/aio-libs/yarl')
Empty segments are honored in the base as well as the joined part.
>>> URL("https://web.archive.org/web/https://").join(URL("github.com/aio-libs/yarl"))
URL('https://web.archive.org/web/https://github.com/aio-libs/yarl')
-- by commonism
This change initially appeared in 1.9.5 but was reverted in 1.9.6 to resolve a problem with query string handling.
Related issues and pull requests on GitHub: #1039, #1082.
Added ~yarl.URL.absolute which is now preferred over URL.is_absolute() -- by bdraco.
Related issues and pull requests on GitHub: #1100.
Added missing type on ~yarl.URL.port -- by bdraco.
Added missing type on ~yarl.URL.port -- by bdraco.
Related issues and pull requests on GitHub: #1097.
(2024-09-04)
Added missing type on ~yarl.URL.port -- by bdraco.
Related issues and pull requests on GitHub: 1097.
Covered the ~yarl.URL object with types -- by bdraco.
Covered the ~yarl.URL object with types -- by bdraco.
Related issues and pull requests on GitHub: #1084.
Cache parsing of IP Addresses when encoding hosts -- by bdraco.
Related issues and pull requests on GitHub: #1086.
Covered the ~yarl.URL object with types -- by bdraco.
Related issues and pull requests on GitHub: #1084.
Improved performance of handling ports -- by bdraco.
Related issues and pull requests on GitHub: #1081.
Covered the ~yarl.URL object with types -- by bdraco.
Covered the ~yarl.URL object with types -- by bdraco.
Related issues and pull requests on GitHub: #1084.
Cache parsing of IP Addresses when encoding hosts -- by bdraco.
Related issues and pull requests on GitHub: #1086.
Covered the ~yarl.URL object with types -- by bdraco.
Related issues and pull requests on GitHub: #1084.
Improved performance of handling ports -- by bdraco.
Related issues and pull requests on GitHub: #1081.
Removals and backward incompatible breaking changes
Removed support :rfc:3986#section-3.2.3 port normalization when the scheme is not one of http, https, wss, or ws -- by :user:bdraco.
Support for port normalization was recently added in #1033 and contained code that would do blocking I/O if the scheme was not one of the four listed above. The code has been removed because this library is intended to be safe for usage with asyncio.
Related issues and pull requests on GitHub: #1076.
Improved performance of property caching -- by :user:bdraco.
The reify implementation from aiohttp was adapted to replace the internal cached_property implementation.
Related issues and pull requests on GitHub: #1070.
Reverted RFC 3986 compatible URL.join() honoring empty segments which was introduced in #1039.
Reverted 3986 compatible URL.join() honoring empty segments which was introduced in #1039.
This change introduced a regression handling query string parameters with joined URLs. The change was reverted to maintain compatibility with the previous behavior.
Related issues and pull requests on GitHub: #1067.
Removals and backward incompatible breaking changes
Joining URLs with empty segments has been changed to match 3986.
Previously empty segments would be removed from path, breaking use-cases such as
URL("https://web.archive.org/web/") / "https://github.com/"
Now / operation and URL.joinpath() keep empty segments, but do not introduce new empty segments. e.g.
URL("https://example.org/") / ""
does not introduce an empty segment.
-- by commonism and youtux
Related issues and pull requests on GitHub: #1026.
The default protocol ports of well-known URI schemes are now taken into account during the normalization of the URL string representation in accordance with 3986#section-3.2.3.
Specified ports are removed from the str representation of a ~yarl.URL if the port matches the scheme's default port -- by commonism.
Related issues and pull requests on GitHub: #1033.
URL.join() has been changed to match 3986 and align with / operation and URL.joinpath() when joining URLs with empty segments. Previously urllib.parse.urljoin was used, which has known issues with empty segments (python/cpython#84774).
Due to the semantics of URL.join(), joining an URL with scheme requires making it relative, prefixing with ./.
>>> URL("https://web.archive.org/web/").join(URL("./https://github.com/aio-libs/yarl"))
URL('https://web.archive.org/web/https://github.com/aio-libs/yarl')
Empty segments are honored in the base as well as the joined part.
>>> URL("https://web.archive.org/web/https://").join(URL("github.com/aio-libs/yarl"))
URL('https://web.archive.org/web/https://github.com/aio-libs/yarl')
-- by commonism
Related issues and pull requests on GitHub: #1039.
Stopped decoding %2F (/) in URL.path, as this could lead to code incorrectly treating it as a path separator -- by Dreamsorcerer.
Related issues and pull requests on GitHub: #1057.
On the Contributing docs page, a link to the Towncrier philosophy has been fixed.
Related issues and pull requests on GitHub: #981.
The pre-existing / magic method has been documented in the API reference -- by commonism.
Related issues and pull requests on GitHub: #1026.
A flaw in the logic for copying the project directory into a temporary folder that led to infinite recursion when TMPDIR was set to a project subdirectory path. This was happening in Fedora and its downstream due to the use of pyproject-rpm-macros. It was only reproducible with pip wheel and was not affecting the pyproject-build users.
-- by hroncok and webknjaz
Related issues and pull requests on GitHub: #992, #1014.
Support Python 3.13 and publish non-free-threaded wheels
Related issues and pull requests on GitHub: #1054.
The CI/CD setup has been updated to test arm64 wheels under macOS 14, except for Python 3.7 that is unsupported in that environment -- by webknjaz.
Related issues and pull requests on GitHub: #1015.
Removed unused type ignores and casts -- by hauntsaninja.
Related issues and pull requests on GitHub: #1031.
port, scheme, and raw_host are now cached_property -- by bdraco.
aiohttp accesses these properties quite often, which cause urllib to build the _hostinfo property every time. port, scheme, and raw_host are now cached properties, which will improve performance.
Related issues and pull requests on GitHub: #1044, #1058.
Started raising exc:TypeError when a string value is passed into meth:~yarl.URL.build as the port argument -- by commonism.
Started raising TypeError when a string value is passed into ~yarl.URL.build as the port argument -- by commonism.
Previously the empty string as port would create malformed URLs when rendered as string representations. (#883)
The leading -- has been dropped from the 517 in-tree build backend config setting names. --pure-python is now just pure-python -- by webknjaz.
The usage now looks as follows:
$ python -m build \
--config-setting=pure-python=true \
--config-setting=with-cython-tracing=true
(#963)
A step-by-step Release Guide guide has been added, describing how to release yarl -- by webknjaz.
This is primarily targeting maintainers. (#960)
Coverage collection has been implemented for the Cython modules -- by webknjaz.
It will also be reported to Codecov from any non-release CI jobs.
To measure coverage in a development environment, yarl can be installed in editable mode, which requires an environment variable YARL_CYTHON_TRACING=1 to be set:
$ YARL_CYTHON_TRACING=1 python -Im pip install -e .
Editable install produces C-files required for the Cython coverage plugin to map the measurements back to the PYX-files. (#961)
It is now possible to request line tracing in Cython builds using the with-cython-tracing 517 config setting -- webknjaz.
This can be used in CI and development environment to measure coverage on Cython modules, but is not normally useful to the end-users or downstream packagers.
Here's a usage example:
$ python -Im pip install . --config-settings=with-cython-tracing=true
For editable installs, this setting is on by default. Otherwise, it's off unless requested explicitly. (#962)
Stopped dropping trailing slashes in yarl.URL.joinpath() -- by [@gmacon]. (#862, #866)
yarl.URL.joinpath() -- by @gmacon. (#862, #866)__truediv__() operations (URL / segment) -- by @mjpieters. (#871, #884)URL.missing_port(), URL.__bytes__() and the encoding argument to yarl.URL.joinpath() -- by @mjpieters. (#891)Integrated Cython 3 to enable building yarl under Python 3.12 -- by @mjpieters. (#829, #881)
Added the changelog URL to the dist metadata -- by @scop. (#877)
Declared modern setuptools.build_meta as the :pep:517 build backend in pyproject.toml explicitly -- by @webknjaz. (#886)
Converted most of the packaging setup into a declarative setup.cfg config -- by @webknjaz. (#890)
Replaced the packaging is replaced from an old-fashioned setup.py to an in-tree :pep:517 build backend -- by @webknjaz.
Whenever the end-users or downstream packagers need to build yarl from source (a Git checkout or an sdist), they may pass a config_settings flag --pure-python. If this flag is not set, a C-extension will be built and included into the distribution.
Here is how this can be done with pip:
$ python -m pip install . --config-settings=--pure-python=
This will also work with -e | --editable.
The same can be achieved via pypa/build:
$ python -m build --config-setting=--pure-python=
Adding -w | --wheel can force pypa/build produce a wheel from source directly, as opposed to building an sdist and then building from it. (#893)
Declared Python 3.12 supported officially in the distribution package metadata -- by @edgarrmondragon. (#942)
A regression test for no-host URLs was added per #821 and RFC 3986 -- by @kenballus. (#821, #822)
Started testing yarl against Python 3.12 in CI -- by @mjpieters. (#881)
All Python 3.12 jobs are now marked as required to pass in CI -- by @edgarrmondragon. (#942)
MyST is now integrated in Sphinx -- by @webknjaz.
This allows the contributors to author new documents in Markdown when they have difficulties with going straight RST. (#953)
:mirror: Full Diff: https://github.com/aio-libs/yarl/compare/v1.9.2...v1.9.3
Stopped dropping trailing slashes in ~yarl.URL.joinpath -- by gmacon. (862, 866)
Started accepting string subclasses in ~yarl.URL.__truediv__ operations (URL / segment) -- by mjpieters. (871, 884)
Fixed the human representation of URLs with square brackets in usernames and passwords -- by mjpieters. (876, 882)
Updated type hints to include URL.missing_port(), URL.__bytes__() and the encoding argument to ~yarl.URL.joinpath -- by mjpieters. (891)
Integrated Cython 3 to enable building yarl under Python 3.12 -- by mjpieters. (829, 881)
Declared modern setuptools.build_meta as the 517 build backend in pyproject.toml explicitly -- by webknjaz. (886)
Converted most of the packaging setup into a declarative setup.cfg config -- by webknjaz. (890)
The packaging is replaced from an old-fashioned setup.py to an in-tree 517 build backend -- by webknjaz.
Whenever the end-users or downstream packagers need to build yarl from source (a Git checkout or an sdist), they may pass a config_settings flag --pure-python. If this flag is not set, a C-extension will be built and included into the distribution.
Here is how this can be done with pip:
$ python -m pip install . --config-settings=--pure-python=false
This will also work with -e | --editable.
The same can be achieved via pypa/build:
$ python -m build --config-setting=--pure-python=false
Adding -w | --wheel can force pypa/build produce a wheel from source directly, as opposed to building an sdist and then building from it. (893)
Attention!
v1.9.3 was the only version using the --pure-python setting name. Later versions dropped the -- prefix, making it just pure-python.
Declared Python 3.12 supported officially in the distribution package metadata -- by edgarrmondragon. (942)
A regression test for no-host URLs was added per 821 and 3986 -- by kenballus. (821, 822)
Started testing yarl against Python 3.12 in CI -- by mjpieters. (881)
All Python 3.12 jobs are now marked as required to pass in CI -- by edgarrmondragon. (942)
MyST is now integrated in Sphinx -- by webknjaz.
This allows the contributors to author new documents in Markdown when they have difficulties with going straight RST. (953)
Fix regression with truediv and absolute URLs with empty paths causing the raw path to lack the leading /. ((#854)_)
/. ((#854)_)Fix regression with ~yarl.URL.__truediv__ and absolute URLs with empty paths causing the raw path to lack the leading /. (#854)
…to fail due to missing a security fix for CVE-2021-23336. ((#850)_)
This is the first release that started shipping wheels for Python 3.11.
This is the first release that started shipping wheels for Python 3.11.
(#694)_, (#699)_, (#700)_, (#701)_, (#702)_, (#703)_, (#739)_
Added URL.raw_suffix, URL.suffix, URL.raw_suffixes, URL.suffixes, URL.with_suffix. ((#613)_)
Added URL.raw_suffix, URL.suffix, URL.raw_suffixes, URL.suffixes, URL.with_suffix. ((#613)_)
Fixed broken internal references to ~URL.human_repr. ((#665)_)
Fixed broken external references to multidict:index docs. ((#665)_)
Dropped Python 3.6 support. ((#672)_)
(#646)_, (#699)_, (#701)_
Changed call in with_port() to stop reencoding parts of the URL that were already encoded. ((#623)_)
with_port() to stop reencoding parts of the URL that were already encoded. ((#623)_)Add __bytes__() magic method so that bytes(url) will work and use optimal ASCII encoding. ((#582)_)
__bytes__() magic method so that bytes(url) will work and use optimal ASCII encoding. ((#582)_)musl tag targeting typical Alpine Linux runtimes. ((#622)_)Add __bytes__() magic method so that bytes(url) will work and use optimal ASCII encoding. ((#582)_)
__bytes__() magic method so that bytes(url) will work and use optimal ASCII encoding. ((#582)_)musl tag targeting typical Alpine Linux runtimes. ((#622)_)Nothing published for this version
Nothing published for this version
No longer loose characters when decoding incorrect percent-sequences (like %e2%82%f8). All non-decodable percent-sequences are now preserved. #517 _
%e2%82%f8). All non-decodable percent-sequences are now preserved.
#517 <https://github.com/aio-libs/yarl/issues/517>_#535 <https://github.com/aio-libs/yarl/issues/535>_Provide generated .c files in TarBall distribution. #530 _
.c files in TarBall distribution.
#530 <https://github.com/aio-libs/multidict/issues/530>_Provide wheels for aarch64, i686, ppc64le, s390x architectures on Linux as well as x86_64. #507 _
aarch64, i686, ppc64le, s390x architectures on
Linux as well as x86_64.
#507 <https://github.com/aio-libs/yarl/issues/507>_#526 <https://github.com/aio-libs/yarl/issues/526>_human_repr() now always produces valid representation equivalent to the original URL (if the original URL is valid).
#511 <https://github.com/aio-libs/yarl/issues/511>_#514 <https://github.com/aio-libs/yarl/issues/514>_% which is not followed by two hexadecimal digits.
#516 <https://github.com/aio-libs/yarl/issues/516>_% followed by a space and hexadecimal digit.
#520 <https://github.com/aio-libs/yarl/issues/520>_with_query()/update_query() methods for key=[val1, val2] case.
#528 <https://github.com/aio-libs/yarl/issues/528>_Allow for int and float subclasses in query, while still denying bool. #492 _
#492 <https://github.com/aio-libs/yarl/issues/492>_URL.build(), with_xxx() and in / operator.
#502 <https://github.com/aio-libs/yarl/issues/502>_origin().
#504 <https://github.com/aio-libs/yarl/issues/504>_Fix including relocated internal yarl._quoting_c C-extension into published PyPI dists. #485 _
Convert host to lowercase on URL building. #386 _
Convert host to lowercase on URL building. #386
Allow using mod operator (%) for updating query string (an alias for update_query() method). #435
Allow use of sequences such as list and tuple in the values of a mapping such as dict to represent that a key has many values:
url = URL("http://example.com")
assert url.with_query({"a": [1, 2]}) == URL("http://example.com/?a=1&a=2")
Support URL.build() with scheme and path (creates a relative URL). #464
Cache slow IDNA encode/decode calls. #476
Add @final / Final type hints #477
Support URL authority/raw_authority properties and authority argument of URL.build() method. #478
Hide the library implementation details, make the exposed public list very clean. #483
Fix tests with newer Python (3.7.6, 3.8.1 and 3.9.0+). #409
Fix a bug where query component, passed in a form of mapping or sequence, is unquoted in unexpected way. #426
Hide Query and QueryVariable type aliases in __init__.pyi, now they are prefixed with underscore. #431
Keep IPv6 brackets after updating port/user/password. #451
Your coding agent can read these notes before it upgrades. Set up the MCP server →