Skip to content

Commit

Permalink
Release 1.9.10
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Sep 4, 2024
1 parent af585b2 commit bfef130
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 32 deletions.
55 changes: 55 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,61 @@ Changelog

.. towncrier release notes start
1.9.10
======

*(2024-09-04)*


Bug fixes
---------

- :meth:`URL.join() <yarl.URL.join>` has been changed to match
:rfc:`3986` and align with
:meth:`/ operation <yarl.URL.__truediv__>` and :meth:`URL.joinpath() <yarl.URL.joinpath>`
when joining URLs with empty segments.
Previously :py:func:`urllib.parse.urljoin` was used,
which has known issues with empty segments
(`python/cpython#84774 <https://github.com/python/cpython/issues/84774>`_).

Due to the semantics of :meth:`URL.join() <yarl.URL.join>`, joining an
URL with scheme requires making it relative, prefixing with ``./``.

.. code-block:: pycon
>>> 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.

.. code-block:: pycon
>>> 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 :user:`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:*
:issue:`1039`, :issue:`1082`.


Features
--------

- Added :attr:`~yarl.URL.absolute` which is now preferred over ``URL.is_absolute()`` -- by :user:`bdraco`.

*Related issues and pull requests on GitHub:*
:issue:`1100`.


----


1.9.9
=====

Expand Down
1 change: 0 additions & 1 deletion CHANGES/1039.bugfix.rst

This file was deleted.

29 changes: 0 additions & 29 deletions CHANGES/1082.bugfix.rst

This file was deleted.

1 change: 0 additions & 1 deletion CHANGES/1100.feature.rst

This file was deleted.

2 changes: 1 addition & 1 deletion yarl/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from ._url import URL, cache_clear, cache_configure, cache_info

__version__ = "1.9.10.dev0"
__version__ = "1.9.10"

__all__ = ("URL", "cache_clear", "cache_configure", "cache_info")

0 comments on commit bfef130

Please sign in to comment.