diff --git a/882-sq_bracket_in_URL_netloc.patch b/882-sq_bracket_in_URL_netloc.patch deleted file mode 100644 index f93251a..0000000 --- a/882-sq_bracket_in_URL_netloc.patch +++ /dev/null @@ -1,125 +0,0 @@ -From 5c977b52a33bf58f016e5968934c3fcb8b49b239 Mon Sep 17 00:00:00 2001 -From: Martijn Pieters -Date: Tue, 6 Jun 2023 17:38:47 +0100 -Subject: [PATCH] Correct square bracket handling in URL netloc - -- The human representation of usernames and passwords should percent- - encode square brackets. -- Clean up the test suite to remove tests that use invalid hostnames - (square brackets in a host name must only be used for IPv6 addresses). -- Rename the remaining test using IPvFuture address syntax to make this - explicit. -- Drop a test for IPv6 addresses with a zone id; zone id support is - controversial and expilictly excluded from the WHATWG URL standard. - Zone ids *without percent characters in their name* continue to work - as long as urllib.parse.urlsplit() accepts them but this is not - something that yarl.URL() needs to support explicitly. ---- - CHANGES/876.bugfix.rst | 1 + - tests/test_url.py | 10 ++-------- - tests/test_url_parsing.py | 28 ++-------------------------- - yarl/_url.py | 4 ++-- - 4 files changed, 7 insertions(+), 36 deletions(-) - create mode 100644 CHANGES/876.bugfix.rst - ---- /dev/null -+++ b/CHANGES/876.bugfix.rst -@@ -0,0 +1 @@ -+Fixed the human representation of URLs with square brackets in usernames and passwords. ---- a/tests/test_url.py -+++ b/tests/test_url.py -@@ -235,12 +235,6 @@ def test_compressed_ipv6(): - assert url.host == url.raw_host - - --def test_ipv6_zone(): -- url = URL("http://[fe80::822a:a8ff:fe49:470c%тест%42]:123") -- assert url.raw_host == "fe80::822a:a8ff:fe49:470c%тест%42" -- assert url.host == url.raw_host -- -- - def test_ipv4_zone(): - # I'm unsure if it is correct. - url = URL("http://1.2.3.4%тест%42:123") -@@ -1629,8 +1623,8 @@ def test_human_repr_delimiters(): - s = url.human_repr() - assert URL(s) == url - assert ( -- s == "http:// !\"%23$%25&'()*+,-.%2F%3A;<=>%3F%40[\\]^_`{|}~" -- ": !\"%23$%25&'()*+,-.%2F%3A;<=>%3F%40[\\]^_`{|}~" -+ s == "http:// !\"%23$%25&'()*+,-.%2F%3A;<=>%3F%40%5B\\%5D^_`{|}~" -+ ": !\"%23$%25&'()*+,-.%2F%3A;<=>%3F%40%5B\\%5D^_`{|}~" - "@хост.домен:8080" - "/ !\"%23$%25&'()*+,-./:;<=>%3F@[\\]^_`{|}~" - "? !\"%23$%25%26'()*%2B,-./:%3B<%3D>?@[\\]^_`{|}~" ---- a/tests/test_url_parsing.py -+++ b/tests/test_url_parsing.py -@@ -178,14 +178,6 @@ class TestHost: - assert u.query_string == "" - assert u.fragment == "" - -- def test_masked_ipv4(self): -- u = URL("//[127.0.0.1]/") -- assert u.scheme == "" -- assert u.host == "127.0.0.1" -- assert u.path == "/" -- assert u.query_string == "" -- assert u.fragment == "" -- - def test_ipv6(self): - u = URL("//[::1]/") - assert u.scheme == "" -@@ -194,15 +186,7 @@ class TestHost: - assert u.query_string == "" - assert u.fragment == "" - -- def test_strange_ip(self): -- u = URL("//[-1]/") -- assert u.scheme == "" -- assert u.host == "-1" -- assert u.path == "/" -- assert u.query_string == "" -- assert u.fragment == "" -- -- def test_strange_ip_2(self): -+ def test_ipvfuture_address(self): - u = URL("//[v1.-1]/") - assert u.scheme == "" - assert u.host == "v1.-1" -@@ -210,14 +194,6 @@ class TestHost: - assert u.query_string == "" - assert u.fragment == "" - -- def test_strange_ip_3(self): -- u = URL("//v1.[::1]/") -- assert u.scheme == "" -- assert u.host == "::1" -- assert u.path == "/" -- assert u.query_string == "" -- assert u.fragment == "" -- - - class TestPort: - def test_canonical(self): -@@ -320,7 +296,7 @@ class TestUserInfo: - assert u.fragment == "" - - def test_weird_user3(self): -- u = URL("//[some]@host") -+ u = URL("//%5Bsome%5D@host") - assert u.scheme == "" - assert u.user == "[some]" - assert u.password is None ---- a/yarl/_url.py -+++ b/yarl/_url.py -@@ -1117,8 +1117,8 @@ class URL: - - def human_repr(self): - """Return decoded human readable string for URL representation.""" -- user = _human_quote(self.user, "#/:?@") -- password = _human_quote(self.password, "#/:?@") -+ user = _human_quote(self.user, "#/:?@[]") -+ password = _human_quote(self.password, "#/:?@[]") - host = self.host - if host: - host = self._encode_host(self.host, human=True) diff --git a/python-yarl.changes b/python-yarl.changes index ba0f3b9..eecce7d 100644 --- a/python-yarl.changes +++ b/python-yarl.changes @@ -1,3 +1,124 @@ +------------------------------------------------------------------- +Wed Oct 9 07:39:46 UTC 2024 - John Paul Adrian Glaubitz + +- Update to 1.14.0 + * Switched to using the :mod:`propcache ` + package for property caching + * Started testing with Hypothesis + * Improved performance of :py:meth:`~yarl.URL.is_default_port` + when no explicit port is set + * Improved performance of converting :class:`~yarl.URL` to + a string when no explicit port is set + * Improved performance of the :py:meth:`~yarl.URL.origin` method + * Improved performance of encoding hosts +- from version 1.13.1 + * Improved performance of calling :py:meth:`~yarl.URL.build` + with ``authority`` +- from version 1.13.0 + * 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 + * Fixed IPv6 addresses missing brackets when the :class:`~yarl.URL` + was converted to a string + * Added :attr:`~yarl.URL.host_subcomponent` which returns + the :rfc:`3986#section-3.2.2` host subcomponent +- Update BuildRequires from requirements/test.txt + +------------------------------------------------------------------- +Wed Sep 25 11:36:24 UTC 2024 - Nico Krapp + +- update to 1.12.1 +- update to 1.12.0 + * Added attr `~yarl.URL.path_safe` to be able to fetch the + path without %2F and %25 decoded + * Restore decoding %2F (/) in URL.path + * Improved performance of processing paths + +------------------------------------------------------------------- +Tue Sep 3 06:46:22 UTC 2024 - Adrian Schröter + +- updaze to 1.9.7: + * Removed support :rfc:3986#section-3.2.3 port normalization + when the scheme is not one of http, https, wss, or ws + * Joining URLs with empty segments has been changed + to match :rfc:3986 + +------------------------------------------------------------------- +Tue Mar 12 10:35:11 UTC 2024 - Bernhard Wiedemann + +- restore correct reproducible.patch + +------------------------------------------------------------------- +Tue Jan 16 22:10:35 UTC 2024 - Dirk Müller + +- restore reproducible.patch to not add a random tmp path + (boo#1062303) + +------------------------------------------------------------------- +Sun Jan 14 15:08:48 UTC 2024 - Dirk Müller + +- update to 1.9.4: + * 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. + * Started raising :py:exc:`TypeError` when a string value is + passed into :py:meth:`~yarl.URL.build` as the port argument + * Previously the empty string as port would create malformed + URLs when rendered as string representations. (:issue:`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: $ python -m build \ --config-setting=pure- + python=true \ --config-setting=with-cython-tracing=true + (:issue:`963`) + * 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`. + * 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: $ 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. (:issue:`962`) +- drop reproducible.patch (upstream) + +------------------------------------------------------------------- +Tue Dec 12 03:44:58 UTC 2023 - Bernhard Wiedemann + +- Add reproducible.patch to not add a random tmp path + into the package (boo#1062303) + +------------------------------------------------------------------- +Mon Nov 27 20:14:14 UTC 2023 - Dirk Müller + +- update to 1.9.3: + * Stopped dropping trailing slashes in + :py:meth:`~yarl.URL.joinpath` + * Started accepting string subclasses in ``__truediv__()`` + operations (``URL / segment``) + * Fixed the human representation of URLs with square brackets + in usernames and passwords + * Updated type hints to include ``URL.missing_port()``, + ``URL.__bytes__()`` and the ``encoding`` argument to + :py:meth:`~yarl.URL.joinpath` + * Integrated Cython 3 to enable building *yarl* under Python + 3.12 + * Declared modern ``setuptools.build_meta`` as the :pep:`517` + build backend in :file:`pyproject.toml` explicitly + * Converted most of the packaging setup into a declarative + :file:`setup.cfg` + * Declared Python 3.12 supported officially in the distribution + package metadata + * A regression test for no-host URLs was added per :issue:`821` + * and :rfc:`3986` + * MyST is now integrated in Sphinx +- drop 882-sq_bracket_in_URL_netloc.patch (upstream) + ------------------------------------------------------------------- Tue Jul 4 21:47:32 UTC 2023 - Matej Cepl @@ -15,7 +136,7 @@ Wed Apr 26 07:02:00 UTC 2023 - Daniel Garcia Mon Apr 24 09:13:21 UTC 2023 - Adrian Schröter - update to version 1.9.1 - * Marked tests that fail on older Python patch releases + * Marked tests that fail on older Python patch releases (< 3.7.10, < 3.8.8 and < 3.9.2) as expected to fail due to missing a security fix for CVE-2021-23336. ((#850)_) - Delete support-python-311.patch, not needed anymore @@ -42,12 +163,12 @@ Thu Mar 2 10:41:59 UTC 2023 - Matej Cepl Mon Jan 9 04:17:48 UTC 2023 - Steve Kowalik - Add patch support-python-311.patch: - * Skip a test under Python 3.11. + * Skip a test under Python 3.11. ------------------------------------------------------------------- Wed Dec 7 22:47:59 UTC 2022 - Yogalakshmi Arunachalam -- Update to version 1.8.2 +- Update to version 1.8.2 * This is the first release that started shipping wheels for Python 3.11. ------------------------------------------------------------------- @@ -103,7 +224,7 @@ Sat Dec 19 10:06:48 UTC 2020 - Dirk Müller - Fix decoding ``%`` followed by a space and hexadecimal digit. - Fix annotation of ``with_query()``/``update_query()`` methods for ``key=[val1, val2]`` case. - + ------------------------------------------------------------------- Mon Sep 28 12:05:26 UTC 2020 - Dirk Mueller @@ -119,7 +240,7 @@ Mon Sep 28 12:05:26 UTC 2020 - Dirk Mueller Tue Jul 28 21:28:25 UTC 2020 - Benjamin Greiner - remove c source file from package (rpmlint error) -- needs typing-extensions +- needs typing-extensions ------------------------------------------------------------------- Tue Jul 28 19:15:09 UTC 2020 - Ondřej Súkup @@ -153,8 +274,8 @@ Mon Feb 3 14:38:51 UTC 2020 - Marketa Calabkova * Distinguish an empty password in URL from a password not provided at all * Fixed annotations for optional parameters of URL.build * Use None as default value of user parameter of URL.build - * Enforce building C Accelerated modules when installing from source tarball, - use YARL_NO_EXTENSIONS environment variable for falling back to (slower) + * Enforce building C Accelerated modules when installing from source tarball, + use YARL_NO_EXTENSIONS environment variable for falling back to (slower) Pure Python implementation * Fix quoting of plus in path by pure python version * Don't create a new URL if fragment is unchanged diff --git a/python-yarl.spec b/python-yarl.spec index 2e6552d..46f98eb 100644 --- a/python-yarl.spec +++ b/python-yarl.spec @@ -1,7 +1,7 @@ # # spec file for package python-yarl # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,27 +18,32 @@ %{?sle15_python_module_pythons} Name: python-yarl -Version: 1.9.2 +Version: 1.14.0 Release: 0 Summary: Yet another URL library License: Apache-2.0 URL: https://github.com/aio-libs/yarl/ Source: https://files.pythonhosted.org/packages/source/y/yarl/yarl-%{version}.tar.gz -# PATCH-FIX-UPSTREAM 882-sq_bracket_in_URL_netloc.patch gh#aio-libs/yarl#876 mcepl@suse.com -# Correct square bracket handling in URL netloc -Patch0: 882-sq_bracket_in_URL_netloc.patch +Patch1: reproducible.patch BuildRequires: %{python_module Cython} BuildRequires: %{python_module devel >= 3.7} +BuildRequires: %{python_module expandvars} BuildRequires: %{python_module idna >= 2.0} # test requirements BuildRequires: %{python_module multidict >= 4.0} +BuildRequires: %{python_module covdefaults} +BuildRequires: %{python_module hypothesis >= 6.0} BuildRequires: %{python_module pip} +BuildRequires: %{python_module propcache >= 0.2.0} +BuildRequires: %{python_module pytest-cov} +BuildRequires: %{python_module pytest-xdist} BuildRequires: %{python_module pytest} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros Requires: python-idna >= 2.0 Requires: python-multidict >= 4.0 +Requires: python-propcache >= 0.2.0 %python_subpackages %description @@ -63,6 +68,6 @@ export CFLAGS="%{optflags} -Wno-return-type" %license LICENSE %doc CHANGES.rst README.rst %{python_sitearch}/yarl -%{python_sitearch}/yarl-%{version}*-info +%{python_sitearch}/yarl-%{version}.dist-info %changelog diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..585b487 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,22 @@ +Date: 2023-12-12 +Author: Bernhard M. Wiedemann + +Make package build reproducible + +For this we avoid the use of a random tmp path +that gets embedded into +/usr/lib64/python3.10/site-packages/yarl/_quoting_c.cpython-310-x86_64-linux-gnu.so + +diff --git a/packaging/pep517_backend/_backend.py b/packaging/pep517_backend/_backend.py +index 9a28ace..3e7db07 100644 +--- a/packaging/pep517_backend/_backend.py ++++ b/packaging/pep517_backend/_backend.py +@@ -286,7 +286,7 @@ def build_wheel( + """ + with maybe_prebuild_c_extensions( + line_trace_cython_when_unset=False, +- build_inplace=False, ++ build_inplace=True, + config_settings=config_settings, + ): + return _setuptools_build_wheel( diff --git a/yarl-1.14.0.tar.gz b/yarl-1.14.0.tar.gz new file mode 100644 index 0000000..c29767f --- /dev/null +++ b/yarl-1.14.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:88c7d9d58aab0724b979ab5617330acb1c7030b79379c8138c1c8c94e121d1b3 +size 166127 diff --git a/yarl-1.9.2.tar.gz b/yarl-1.9.2.tar.gz deleted file mode 100644 index e4e03f1..0000000 --- a/yarl-1.9.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:04ab9d4b9f587c06d801c2abfe9317b77cdf996c65a90d5e84ecc45010823571 -size 184673