diff --git a/1.26.12.tar.gz b/1.26.12.tar.gz deleted file mode 100644 index 12bc80a15ab952c1fa0540bb03a0a1e09fd993f1..0000000000000000000000000000000000000000 Binary files a/1.26.12.tar.gz and /dev/null differ diff --git a/1.26.16.tar.gz b/1.26.16.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..e909ec1576f053fbb48360d8a7633f8bf4b4dcc2 Binary files /dev/null and b/1.26.16.tar.gz differ diff --git a/backport-Fix-_idna_encode-handling-of-x80.patch b/backport-Fix-_idna_encode-handling-of-x80.patch deleted file mode 100644 index e40e4522d9529823662f0138c7df5a141653a69b..0000000000000000000000000000000000000000 --- a/backport-Fix-_idna_encode-handling-of-x80.patch +++ /dev/null @@ -1,29 +0,0 @@ -From a06c05cd4bba292ee26e3e9116cff902e0440b52 Mon Sep 17 00:00:00 2001 -From: Ben Kallus <49924171+kenballus@users.noreply.github.com> -Date: Wed, 8 Feb 2023 15:19:07 +0000 -Subject: [PATCH] Fix _idna_encode handling of '\x80' - -Co-authored-by: Illia Volochii - -Conflict:1.The content of "@@" is adapted 2.The line number is adapted -Reference:https://github.com/urllib3/urllib3/commit/a06c05cd4bba292ee26e3e9116cff902e0440b52 ---- - src/urllib3/util/url.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/urllib3/util/url.py b/src/urllib3/util/url.py -index 63166e8..8bac93a 100644 ---- a/src/urllib3/util/url.py -+++ b/src/urllib3/util/url.py -@@ -300,7 +300,7 @@ def _normalize_host(host, scheme): - - - def _idna_encode(name): -- if name and any([ord(x) > 128 for x in name]): -+ if name and any(ord(x) >= 128 for x in name): - try: - import idna - except ImportError: --- -2.27.0 - \ No newline at end of file diff --git a/backport-Fix-socket-timeout-value-when-HTTPConnection-is-reused.patch b/backport-Fix-socket-timeout-value-when-HTTPConnection-is-reused.patch deleted file mode 100644 index ea1fadc057d32b5d15d3fe4173815bcf7c9cedaf..0000000000000000000000000000000000000000 --- a/backport-Fix-socket-timeout-value-when-HTTPConnection-is-reused.patch +++ /dev/null @@ -1,75 +0,0 @@ -From a7ce8e0881c94800b14687145ee11940246d2b22 Mon Sep 17 00:00:00 2001 -From: Nick Williams <68963309+nickwilliams-zaxiom@users.noreply.github.com> -Date: Fri, 20 Jan 2023 07:59:33 -0600 -Subject: [PATCH] [1.26] Fix socket timeout value when HTTPConnection is reused - -Co-authored-by: Seth Michael Larson -Co-authored-by: Quentin Pradet - -Conflict:1.The content of "@@" is adapted 2.The line number is adapted 3. no add testcode -Reference:https://github.com/urllib3/urllib3/commit/a7ce8e0881c94800b14687145ee11940246d2b22 ---- - src/urllib3/connection.py | 5 +++++ - src/urllib3/connectionpool.py | 2 +- - src/urllib3/util/timeout.py | 9 ++++++--- - 3 files changed, 12 insertions(+), 4 deletions(-) - -diff --git a/src/urllib3/connection.py b/src/urllib3/connection.py -index f48daea..f121511 100644 ---- a/src/urllib3/connection.py -+++ b/src/urllib3/connection.py -@@ -229,6 +229,11 @@ class HTTPConnection(_HTTPConnection, object): - ) - - def request(self, method, url, body=None, headers=None): -+ # Update the inner socket's timeout value to send the request. -+ # This only triggers if the connection is re-used. -+ if getattr(self, "sock", None) is not None: -+ self.sock.settimeout(self.timeout) -+ - if headers is None: - headers = {} - else: -diff --git a/src/urllib3/connectionpool.py b/src/urllib3/connectionpool.py -index 8dccf4b..e528019 100644 ---- a/src/urllib3/connectionpool.py -+++ b/src/urllib3/connectionpool.py -@@ -375,7 +375,7 @@ class HTTPConnectionPool(ConnectionPool, RequestMethods): - - timeout_obj = self._get_timeout(timeout) - timeout_obj.start_connect() -- conn.timeout = timeout_obj.connect_timeout -+ conn.timeout = Timeout.resolve_default_timeout(timeout_obj.connect_timeout) - - # Trigger any extra validation we need to do. - try: -diff --git a/src/urllib3/util/timeout.py b/src/urllib3/util/timeout.py -index ff69593..78e18a6 100644 ---- a/src/urllib3/util/timeout.py -+++ b/src/urllib3/util/timeout.py -@@ -2,9 +2,8 @@ from __future__ import absolute_import - - import time - --# The default socket timeout, used by httplib to indicate that no timeout was --# specified by the user --from socket import _GLOBAL_DEFAULT_TIMEOUT -+# The default socket timeout, used by httplib to indicate that no timeout was; specified by the user -+from socket import _GLOBAL_DEFAULT_TIMEOUT, getdefaulttimeout - - from ..exceptions import TimeoutStateError - -@@ -116,6 +115,10 @@ class Timeout(object): - # __str__ provided for backwards compatibility - __str__ = __repr__ - -+ @classmethod -+ def resolve_default_timeout(cls, timeout): -+ return getdefaulttimeout() if timeout is cls.DEFAULT_TIMEOUT else timeout -+ - @classmethod - def _validate_timeout(cls, value, name): - """Check that a timeout attribute is valid. --- -2.27.0 - \ No newline at end of file diff --git a/backport-Remove-Exclamation-mark-character-from-the-unreserved-characters.patch b/backport-Remove-Exclamation-mark-character-from-the-unreserved-characters.patch deleted file mode 100644 index 5bd2301e1f50912a462ef5d1721777d1187cd87b..0000000000000000000000000000000000000000 --- a/backport-Remove-Exclamation-mark-character-from-the-unreserved-characters.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 27370204dbcb2ee555a136948afee276a96ddc87 Mon Sep 17 00:00:00 2001 -From: Ben Kallus <49924171+kenballus@users.noreply.github.com> -Date: Fri, 3 Feb 2023 08:38:04 -0500 -Subject: [PATCH] [1.26] Remove "!" character from the "unreserved" characters - in IPv6 Zone ID parsing - -Conflict:The content of "index" and "@@" are adapted -Reference:https://github.com/urllib3/urllib3/commit/27370204dbcb2ee555a136948afee276a96ddc87 ---- - src/urllib3/util/url.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/urllib3/util/url.py b/src/urllib3/util/url.py -index 63166e8..33dfb45 100644 ---- a/src/urllib3/util/url.py -+++ b/src/urllib3/util/url.py -@@ -50,7 +50,7 @@ _variations = [ - "(?:(?:%(hex)s:){0,6}%(hex)s)?::", - ] - --UNRESERVED_PAT = r"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._!\-~" -+UNRESERVED_PAT = r"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._\-~" - IPV6_PAT = "(?:" + "|".join([x % _subs for x in _variations]) + ")" - ZONE_ID_PAT = "(?:%25|%)(?:[" + UNRESERVED_PAT + "]|%[a-fA-F0-9]{2})+" - IPV6_ADDRZ_PAT = r"\[" + IPV6_PAT + r"(?:" + ZONE_ID_PAT + r")?\]" --- -2.27.0 diff --git a/backport-fix-test_ssl_object_attributes.patch b/backport-fix-test_ssl_object_attributes.patch deleted file mode 100644 index 0b0acf5c5ef203ae5409f7335e8329c7a6c5d1d6..0000000000000000000000000000000000000000 --- a/backport-fix-test_ssl_object_attributes.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 25cca389496b86ee809c21e5b641aeaa74809263 Mon Sep 17 00:00:00 2001 -From: Seth Michael Larson -Date: Tue, 25 Apr 2023 02:10:00 AM GMT+0800 -Subject: [PATCH] fix test_ssl_object_attributes - -Conflict:NA -Reference:https://github.com/urllib3/urllib3/commit/25cca389496b86ee809c21e5b641aeaa74809263 - ---- - test/test_ssltransport.py | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/test/test_ssltransport.py b/test/test_ssltransport.py -index e8d779f..809e053 100644 ---- a/test/test_ssltransport.py -+++ b/test/test_ssltransport.py -@@ -205,8 +205,11 @@ class SingleTLSLayerTestCase(SocketDummyServerTestCase): - assert ssock.selected_npn_protocol() is None - - shared_ciphers = ssock.shared_ciphers() -- assert type(shared_ciphers) == list -- assert len(shared_ciphers) > 0 -+ # SSLContext.shared_ciphers() changed behavior completely in a patch version. -+ # See: https://github.com/python/cpython/issues/96931 -+ assert shared_ciphers is None or ( -+ type(shared_ciphers) is list and len(shared_ciphers) > 0 -+ ) - - assert ssock.compression() is None - --- -2.23.0 - diff --git a/backport-fixed-issue-with-port-0-returning-None.patch b/backport-fixed-issue-with-port-0-returning-None.patch deleted file mode 100644 index d96eab9fc4e99f89312779f5f46a9a73f7c4464a..0000000000000000000000000000000000000000 --- a/backport-fixed-issue-with-port-0-returning-None.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 25fbd5fb72ae8790cff9512878d302120e387e64 Mon Sep 17 00:00:00 2001 -From: Anil Khatri -Date: Sat, 31 Dec 2022 01:38:50 +0530 -Subject: [PATCH] Fixed issue with port "0" returning None - -Conflict:adapt: -1.The content of "@@" is adapted -2.The line number is adapted -Reference:https://github.com/urllib3/urllib3/pull/2864 - ---- - src/urllib3/util/url.py | 2 +- - test/test_util.py | 7 +++++++ - 2 files changed, 8 insertions(+), 1 deletion(-) - -diff --git a/src/urllib3/util/url.py b/src/urllib3/util/url.py -index 8964cef..63166e8 100644 ---- a/src/urllib3/util/url.py -+++ b/src/urllib3/util/url.py -@@ -63,7 +63,7 @@ IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT + "$") - BRACELESS_IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT[2:-2] + "$") - ZONE_ID_RE = re.compile("(" + ZONE_ID_PAT + r")\]$") - --_HOST_PORT_PAT = ("^(%s|%s|%s)(?::0*([0-9]{0,5}))?$") % ( -+_HOST_PORT_PAT = ("^(%s|%s|%s)(?::0*?(|0|[1-9][0-9]{0,4}))?$") % ( - REG_NAME_PAT, - IPV4_PAT, - IPV6_ADDRZ_PAT, -diff --git a/test/test_util.py b/test/test_util.py -index f6c8b43..7d512f5 100644 ---- a/test/test_util.py -+++ b/test/test_util.py -@@ -347,6 +347,13 @@ class TestUtil(object): - url = parse_url("https://example.com:0000000000080") - assert url.port == 80 - -+ def test_parse_url_only_zeros(self): -+ url = parse_url("https://example.com:0") -+ assert url.port == 0 -+ -+ url = parse_url("https://example.com:000000000000") -+ assert url.port == 0 -+ - def test_Url_str(self): - U = Url("http", host="google.com") - assert str(U) == U.url --- -2.27.0 diff --git a/backport-strip-leading-zeros-form-ports.patch b/backport-strip-leading-zeros-form-ports.patch deleted file mode 100644 index 1effc913d40c7cb338e1889fde1c4e8be1d0300d..0000000000000000000000000000000000000000 --- a/backport-strip-leading-zeros-form-ports.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 955da4d03eaa6785aef40a34f440a67d736a4793 Mon Sep 17 00:00:00 2001 -From: Seth Michael Larson -Date: Tue, 22 Nov 2022 17:59:57 +0000 -Subject: [PATCH] [1.26] Strip leading zeros from ports - -Co-authored-by: Bastian Venthur -Co-authored-by: Hasan Ramezani - -Conflict:NA -Reference:https://github.com/urllib3/urllib3/commit/955da4d03eaa6785aef40a34f440a67d736a4793 ---- - src/urllib3/util/url.py | 2 +- - test/test_util.py | 4 ++++ - 2 files changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/urllib3/util/url.py b/src/urllib3/util/url.py -index 81a03da..8964cef 100644 ---- a/src/urllib3/util/url.py -+++ b/src/urllib3/util/url.py -@@ -63,7 +63,7 @@ IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT + "$") - BRACELESS_IPV6_ADDRZ_RE = re.compile("^" + IPV6_ADDRZ_PAT[2:-2] + "$") - ZONE_ID_RE = re.compile("(" + ZONE_ID_PAT + r")\]$") - --_HOST_PORT_PAT = ("^(%s|%s|%s)(?::([0-9]{0,5}))?$") % ( -+_HOST_PORT_PAT = ("^(%s|%s|%s)(?::0*([0-9]{0,5}))?$") % ( - REG_NAME_PAT, - IPV4_PAT, - IPV6_ADDRZ_PAT, -diff --git a/test/test_util.py b/test/test_util.py -index 562c106..f6c8b43 100644 ---- a/test/test_util.py -+++ b/test/test_util.py -@@ -343,6 +343,10 @@ class TestUtil(object): - with pytest.raises(LocationParseError): - parse_url("https://www.google.com:-80/") - -+ def test_parse_url_remove_leading_zeros(self): -+ url = parse_url("https://example.com:0000000000080") -+ assert url.port == 80 -+ - def test_Url_str(self): - U = Url("http", host="google.com") - assert str(U) == U.url --- -2.27.0 diff --git a/python-urllib3.spec b/python-urllib3.spec index b868ab4afa2b08a4cb1d408cd273a205741f8235..8eb46fa4bac6b03a28a91d3fdb1880883a25dff2 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -2,8 +2,8 @@ %bcond_without tests Name: python-%{srcname} -Version: 1.26.12 -Release: 5 +Version: 1.26.16 +Release: 1 Summary: Sanity-friendly HTTP client for Python License: MIT URL: https://urllib3.readthedocs.io @@ -12,12 +12,6 @@ Source1: ssl_match_hostname_py3.py Patch0001: remove_mock.patch Patch6000: backport-CVE-2021-28363.patch -Patch6001: backport-strip-leading-zeros-form-ports.patch -Patch6002: backport-fixed-issue-with-port-0-returning-None.patch -Patch6003: backport-Fix-socket-timeout-value-when-HTTPConnection-is-reused.patch -Patch6004: backport-Remove-Exclamation-mark-character-from-the-unreserved-characters.patch -Patch6005: backport-Fix-_idna_encode-handling-of-x80.patch -Patch6006: backport-fix-test_ssl_object_attributes.patch BuildArch: noarch @@ -83,6 +77,12 @@ PYTHONPATH=%{buildroot}%{python3_sitelib}:%{python3_sitelib} %{__python3} -m pyt %{python3_sitelib}/urllib3-*.egg-info %changelog +* Mon Jul 31 2023 chengyechun - 1.26.16-1 +- Type:enhancement +- CVE:NA +- SUG:NA +- DESC:update to 1.26.16 + * Tue Jul 25 2023 chengyechun - 1.26.12-5 - Type:bugfix - CVE:NA