Yet another URL library
Started raising :py:exc:TypeError
when a string value is passed into
:py:meth:~yarl.URL.build
as the port
argument -- by :user:commonism
.
Previously the empty string as port would create malformed URLs when rendered as string representations. (#883)
The leading --
has been dropped from the :pep:517
in-tree build
backend config setting names. --pure-python
is now just pure-python
-- by :user:webknjaz
.
The usage now looks as follows:
.. code-block:: console
$ python -m build \
--config-setting=pure-python=true \
--config-setting=with-cython-tracing=true
(#963)
A step-by-step :doc:Release Guide <contributing/release_guide>
guide has
been added, describing how to release yarl -- by :user:webknjaz
.
This is primarily targeting maintainers. (#960)
Coverage collection has been implemented for the Cython modules
-- by :user: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:
.. code-block:: console
$ 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
:pep:517
config setting
-- :user: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:
.. code-block:: console
$ 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)
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
This is the first release that started shipping wheels for Python 3.11.
URL.raw_suffix
, URL.suffix
, URL.raw_suffixes
, URL.suffixes
, URL.with_suffix
. ((#613)_)~URL.human_repr
. ((#665)_)multidict:index
docs. ((#665)_)__bytes__()
magic method so that bytes(url)
will work and use optimal ASCII encoding. ((#582)_)musl
tag targeting typical Alpine Linux runtimes. ((#622)_)