Accepting request 1129244 from devel:languages:python
- 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) * Marked tests that fail on older Python patch releases * Skip a test under Python 3.11. - Update to version 1.8.2 - needs typing-extensions * Enforce building C Accelerated modules when installing from source tarball, use YARL_NO_EXTENSIONS environment variable for falling back to (slower) OBS-URL: https://build.opensuse.org/request/show/1129244 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-yarl?expand=0&rev=26
This commit is contained in:
commit
11d57eeef3
@ -1,125 +0,0 @@
|
|||||||
From 5c977b52a33bf58f016e5968934c3fcb8b49b239 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Martijn Pieters <mj@zopatista.com>
|
|
||||||
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)
|
|
@ -1,3 +1,29 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Nov 27 20:14:14 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
- 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 <mcepl@suse.com>
|
Tue Jul 4 21:47:32 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
@ -15,7 +41,7 @@ Wed Apr 26 07:02:00 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
|
|||||||
Mon Apr 24 09:13:21 UTC 2023 - Adrian Schröter <adrian@suse.de>
|
Mon Apr 24 09:13:21 UTC 2023 - Adrian Schröter <adrian@suse.de>
|
||||||
|
|
||||||
- update to version 1.9.1
|
- 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
|
(< 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)_)
|
a security fix for CVE-2021-23336. ((#850)_)
|
||||||
- Delete support-python-311.patch, not needed anymore
|
- Delete support-python-311.patch, not needed anymore
|
||||||
@ -42,12 +68,12 @@ Thu Mar 2 10:41:59 UTC 2023 - Matej Cepl <mcepl@suse.com>
|
|||||||
Mon Jan 9 04:17:48 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
Mon Jan 9 04:17:48 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
- Add patch support-python-311.patch:
|
- 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 <yarunachalam@suse.com>
|
Wed Dec 7 22:47:59 UTC 2022 - Yogalakshmi Arunachalam <yarunachalam@suse.com>
|
||||||
|
|
||||||
- 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.
|
* This is the first release that started shipping wheels for Python 3.11.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
@ -103,7 +129,7 @@ Sat Dec 19 10:06:48 UTC 2020 - Dirk Müller <dmueller@suse.com>
|
|||||||
- Fix decoding ``%`` followed by a space and hexadecimal digit.
|
- Fix decoding ``%`` followed by a space and hexadecimal digit.
|
||||||
- Fix annotation of ``with_query()``/``update_query()`` methods for
|
- Fix annotation of ``with_query()``/``update_query()`` methods for
|
||||||
``key=[val1, val2]`` case.
|
``key=[val1, val2]`` case.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Sep 28 12:05:26 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
Mon Sep 28 12:05:26 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
||||||
|
|
||||||
@ -119,7 +145,7 @@ Mon Sep 28 12:05:26 UTC 2020 - Dirk Mueller <dmueller@suse.com>
|
|||||||
Tue Jul 28 21:28:25 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
Tue Jul 28 21:28:25 UTC 2020 - Benjamin Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
- remove c source file from package (rpmlint error)
|
- 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 <mimi.vx@gmail.com>
|
Tue Jul 28 19:15:09 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||||
@ -153,8 +179,8 @@ Mon Feb 3 14:38:51 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>
|
|||||||
* Distinguish an empty password in URL from a password not provided at all
|
* Distinguish an empty password in URL from a password not provided at all
|
||||||
* Fixed annotations for optional parameters of URL.build
|
* Fixed annotations for optional parameters of URL.build
|
||||||
* Use None as default value of user parameter of URL.build
|
* Use None as default value of user parameter of URL.build
|
||||||
* Enforce building C Accelerated modules when installing from source tarball,
|
* Enforce building C Accelerated modules when installing from source tarball,
|
||||||
use YARL_NO_EXTENSIONS environment variable for falling back to (slower)
|
use YARL_NO_EXTENSIONS environment variable for falling back to (slower)
|
||||||
Pure Python implementation
|
Pure Python implementation
|
||||||
* Fix quoting of plus in path by pure python version
|
* Fix quoting of plus in path by pure python version
|
||||||
* Don't create a new URL if fragment is unchanged
|
* Don't create a new URL if fragment is unchanged
|
||||||
|
@ -18,17 +18,15 @@
|
|||||||
|
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-yarl
|
Name: python-yarl
|
||||||
Version: 1.9.2
|
Version: 1.9.3
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Yet another URL library
|
Summary: Yet another URL library
|
||||||
License: Apache-2.0
|
License: Apache-2.0
|
||||||
URL: https://github.com/aio-libs/yarl/
|
URL: https://github.com/aio-libs/yarl/
|
||||||
Source: https://files.pythonhosted.org/packages/source/y/yarl/yarl-%{version}.tar.gz
|
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
|
|
||||||
BuildRequires: %{python_module Cython}
|
BuildRequires: %{python_module Cython}
|
||||||
BuildRequires: %{python_module devel >= 3.7}
|
BuildRequires: %{python_module devel >= 3.7}
|
||||||
|
BuildRequires: %{python_module expandvars}
|
||||||
BuildRequires: %{python_module idna >= 2.0}
|
BuildRequires: %{python_module idna >= 2.0}
|
||||||
# test requirements
|
# test requirements
|
||||||
BuildRequires: %{python_module multidict >= 4.0}
|
BuildRequires: %{python_module multidict >= 4.0}
|
||||||
|
BIN
yarl-1.9.2.tar.gz
(Stored with Git LFS)
BIN
yarl-1.9.2.tar.gz
(Stored with Git LFS)
Binary file not shown.
3
yarl-1.9.3.tar.gz
Normal file
3
yarl-1.9.3.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:4a14907b597ec55740f63e52d7fee0e9ee09d5b9d57a4f399a7423268e457b57
|
||||||
|
size 135606
|
Loading…
Reference in New Issue
Block a user