Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-urllib3 for openSUSE:Factory checked in at 2022-12-29 13:08:36 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-urllib3 (Old) and /work/SRC/openSUSE:Factory/.python-urllib3.new.1563 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-urllib3" Thu Dec 29 13:08:36 2022 rev:53 rq:1039604 version:1.26.13 Changes: -------- --- /work/SRC/openSUSE:Factory/python-urllib3/python-urllib3.changes 2022-10-25 11:18:30.897938172 +0200 +++ /work/SRC/openSUSE:Factory/.python-urllib3.new.1563/python-urllib3.changes 2022-12-29 13:08:38.904769599 +0100 @@ -1,0 +2,10 @@ +Fri Dec 2 13:02:46 UTC 2022 - John Paul Adrian Glaubitz <adrian.glaub...@suse.com> + +- update to 1.26.13 + * Deprecated the ``HTTPResponse.getheaders()`` and ``HTTPResponse.getheader()`` methods. + * Fixed an issue where parsing a URL with leading zeroes in the port would be rejected + even when the port number after removing the zeroes was valid. + * Fixed a deprecation warning when using cryptography v39.0.0. + * Removed the ``<4`` in the ``Requires-Python`` packaging metadata field. + +------------------------------------------------------------------- Old: ---- urllib3-1.26.12.tar.gz New: ---- urllib3-1.26.13.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-urllib3.spec ++++++ --- /var/tmp/diff_new_pack.TGk9IH/_old 2022-12-29 13:08:40.056776607 +0100 +++ /var/tmp/diff_new_pack.TGk9IH/_new 2022-12-29 13:08:40.064776656 +0100 @@ -25,7 +25,7 @@ %bcond_with test %endif Name: python-urllib3%{psuffix} -Version: 1.26.12 +Version: 1.26.13 Release: 0 Summary: HTTP library with thread-safe connection pooling, file post, and more License: MIT ++++++ urllib3-1.26.12.tar.gz -> urllib3-1.26.13.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.12/CHANGES.rst new/urllib3-1.26.13/CHANGES.rst --- old/urllib3-1.26.12/CHANGES.rst 2022-08-22 15:18:37.000000000 +0200 +++ new/urllib3-1.26.13/CHANGES.rst 2022-11-23 23:22:44.000000000 +0100 @@ -1,6 +1,16 @@ Changes ======= +1.26.13 (2022-11-23) +-------------------- + +* Deprecated the ``HTTPResponse.getheaders()`` and ``HTTPResponse.getheader()`` methods. +* Fixed an issue where parsing a URL with leading zeroes in the port would be rejected + even when the port number after removing the zeroes was valid. +* Fixed a deprecation warning when using cryptography v39.0.0. +* Removed the ``<4`` in the ``Requires-Python`` packaging metadata field. + + 1.26.12 (2022-08-22) -------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.12/PKG-INFO new/urllib3-1.26.13/PKG-INFO --- old/urllib3-1.26.12/PKG-INFO 2022-08-22 15:18:46.373898700 +0200 +++ new/urllib3-1.26.13/PKG-INFO 2022-11-23 23:22:58.712564000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: urllib3 -Version: 1.26.12 +Version: 1.26.13 Summary: HTTP library with thread-safe connection pooling, file post, and more. Home-page: https://urllib3.readthedocs.io/ Author: Andrey Petrov @@ -28,7 +28,7 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Internet :: WWW/HTTP Classifier: Topic :: Software Development :: Libraries -Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4 +Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.* Description-Content-Type: text/x-rst Provides-Extra: brotli Provides-Extra: secure @@ -144,6 +144,16 @@ Changes ======= +1.26.13 (2022-11-23) +-------------------- + +* Deprecated the ``HTTPResponse.getheaders()`` and ``HTTPResponse.getheader()`` methods. +* Fixed an issue where parsing a URL with leading zeroes in the port would be rejected + even when the port number after removing the zeroes was valid. +* Fixed a deprecation warning when using cryptography v39.0.0. +* Removed the ``<4`` in the ``Requires-Python`` packaging metadata field. + + 1.26.12 (2022-08-22) -------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.12/README.rst new/urllib3-1.26.13/README.rst --- old/urllib3-1.26.12/README.rst 2022-08-22 15:18:37.000000000 +0200 +++ new/urllib3-1.26.13/README.rst 2022-11-23 23:22:44.000000000 +0100 @@ -2,7 +2,7 @@ <p align="center"> <a href="https://github.com/urllib3/urllib3"> - <img src="./docs/images/banner.svg" width="60%" alt="urllib3" /> + <img src="./docs/_static/banner.svg" width="60%" alt="urllib3" /> </a> </p> <p align="center"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.12/dev-requirements.txt new/urllib3-1.26.13/dev-requirements.txt --- old/urllib3-1.26.12/dev-requirements.txt 2022-08-22 15:18:37.000000000 +0200 +++ new/urllib3-1.26.13/dev-requirements.txt 2022-11-23 23:22:44.000000000 +0100 @@ -12,7 +12,7 @@ flaky==3.7.0 trustme==0.7.0 cryptography==3.2.1;python_version<"3.6" -cryptography==3.4.7;python_version>="3.6" +cryptography==38.0.3;python_version>="3.6" python-dateutil==2.8.1 # https://github.com/GrahamDumpleton/wrapt/issues/189 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.12/setup.py new/urllib3-1.26.13/setup.py --- old/urllib3-1.26.12/setup.py 2022-08-22 15:18:37.000000000 +0200 +++ new/urllib3-1.26.13/setup.py 2022-11-23 23:22:44.000000000 +0100 @@ -82,7 +82,7 @@ ], package_dir={"": "src"}, requires=[], - python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4", + python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*", extras_require={ "brotli": [ "brotli>=1.0.9; (os_name != 'nt' or python_version >= '3') and platform_python_implementation == 'CPython'", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.12/src/urllib3/_version.py new/urllib3-1.26.13/src/urllib3/_version.py --- old/urllib3-1.26.12/src/urllib3/_version.py 2022-08-22 15:18:37.000000000 +0200 +++ new/urllib3-1.26.13/src/urllib3/_version.py 2022-11-23 23:22:44.000000000 +0100 @@ -1,2 +1,2 @@ # This file is protected via CODEOWNERS -__version__ = "1.26.12" +__version__ = "1.26.13" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.12/src/urllib3/connectionpool.py new/urllib3-1.26.13/src/urllib3/connectionpool.py --- old/urllib3-1.26.12/src/urllib3/connectionpool.py 2022-08-22 15:18:37.000000000 +0200 +++ new/urllib3-1.26.13/src/urllib3/connectionpool.py 2022-11-23 23:22:44.000000000 +0100 @@ -862,7 +862,7 @@ ) # Check if we should retry the HTTP response. - has_retry_after = bool(response.getheader("Retry-After")) + has_retry_after = bool(response.headers.get("Retry-After")) if retries.is_retry(method, response.status, has_retry_after): try: retries = retries.increment(method, url, response=response, _pool=self) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.12/src/urllib3/contrib/pyopenssl.py new/urllib3-1.26.13/src/urllib3/contrib/pyopenssl.py --- old/urllib3-1.26.12/src/urllib3/contrib/pyopenssl.py 2022-08-22 15:18:37.000000000 +0200 +++ new/urllib3-1.26.13/src/urllib3/contrib/pyopenssl.py 2022-11-23 23:22:44.000000000 +0100 @@ -47,10 +47,10 @@ """ from __future__ import absolute_import +import OpenSSL.crypto import OpenSSL.SSL from cryptography import x509 from cryptography.hazmat.backends.openssl import backend as openssl_backend -from cryptography.hazmat.backends.openssl.x509 import _Certificate try: from cryptography.x509 import UnsupportedExtension @@ -228,9 +228,8 @@ if hasattr(peer_cert, "to_cryptography"): cert = peer_cert.to_cryptography() else: - # This is technically using private APIs, but should work across all - # relevant versions before PyOpenSSL got a proper API for this. - cert = _Certificate(openssl_backend, peer_cert._x509) + der = OpenSSL.crypto.dump_certificate(OpenSSL.crypto.FILETYPE_ASN1, peer_cert) + cert = x509.load_der_x509_certificate(der, openssl_backend) # We want to find the SAN extension. Ask Cryptography to locate it (it's # faster than looping in Python) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.12/src/urllib3/response.py new/urllib3-1.26.13/src/urllib3/response.py --- old/urllib3-1.26.12/src/urllib3/response.py 2022-08-22 15:18:37.000000000 +0200 +++ new/urllib3-1.26.13/src/urllib3/response.py 2022-11-23 23:22:44.000000000 +0100 @@ -3,6 +3,7 @@ import io import logging import sys +import warnings import zlib from contextlib import contextmanager from socket import error as SocketError @@ -663,9 +664,21 @@ # Backwards-compatibility methods for http.client.HTTPResponse def getheaders(self): + warnings.warn( + "HTTPResponse.getheaders() is deprecated and will be removed " + "in urllib3 v2.1.0. Instead access HTTResponse.headers directly.", + category=DeprecationWarning, + stacklevel=2, + ) return self.headers def getheader(self, name, default=None): + warnings.warn( + "HTTPResponse.getheader() is deprecated and will be removed " + "in urllib3 v2.1.0. Instead use HTTResponse.headers.get(name, default).", + category=DeprecationWarning, + stacklevel=2, + ) return self.headers.get(name, default) # Backwards compatibility for http.cookiejar diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.12/src/urllib3/util/retry.py new/urllib3-1.26.13/src/urllib3/util/retry.py --- old/urllib3-1.26.12/src/urllib3/util/retry.py 2022-08-22 15:18:37.000000000 +0200 +++ new/urllib3-1.26.13/src/urllib3/util/retry.py 2022-11-23 23:22:44.000000000 +0100 @@ -394,7 +394,7 @@ def get_retry_after(self, response): """Get the value of Retry-After in seconds.""" - retry_after = response.getheader("Retry-After") + retry_after = response.headers.get("Retry-After") if retry_after is None: return None diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.12/src/urllib3/util/url.py new/urllib3-1.26.13/src/urllib3/util/url.py --- old/urllib3-1.26.12/src/urllib3/util/url.py 2022-08-22 15:18:37.000000000 +0200 +++ new/urllib3-1.26.13/src/urllib3/util/url.py 2022-11-23 23:22:44.000000000 +0100 @@ -63,7 +63,7 @@ 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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.12/src/urllib3.egg-info/PKG-INFO new/urllib3-1.26.13/src/urllib3.egg-info/PKG-INFO --- old/urllib3-1.26.12/src/urllib3.egg-info/PKG-INFO 2022-08-22 15:18:46.000000000 +0200 +++ new/urllib3-1.26.13/src/urllib3.egg-info/PKG-INFO 2022-11-23 23:22:58.000000000 +0100 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: urllib3 -Version: 1.26.12 +Version: 1.26.13 Summary: HTTP library with thread-safe connection pooling, file post, and more. Home-page: https://urllib3.readthedocs.io/ Author: Andrey Petrov @@ -28,7 +28,7 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Internet :: WWW/HTTP Classifier: Topic :: Software Development :: Libraries -Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4 +Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.* Description-Content-Type: text/x-rst Provides-Extra: brotli Provides-Extra: secure @@ -144,6 +144,16 @@ Changes ======= +1.26.13 (2022-11-23) +-------------------- + +* Deprecated the ``HTTPResponse.getheaders()`` and ``HTTPResponse.getheader()`` methods. +* Fixed an issue where parsing a URL with leading zeroes in the port would be rejected + even when the port number after removing the zeroes was valid. +* Fixed a deprecation warning when using cryptography v39.0.0. +* Removed the ``<4`` in the ``Requires-Python`` packaging metadata field. + + 1.26.12 (2022-08-22) -------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.12/test/test_response.py new/urllib3-1.26.13/test/test_response.py --- old/urllib3-1.26.12/test/test_response.py 2022-08-22 15:18:37.000000000 +0200 +++ new/urllib3-1.26.13/test/test_response.py 2022-11-23 23:22:44.000000000 +0100 @@ -13,6 +13,7 @@ import pytest import six +from urllib3._collections import HTTPHeaderDict from urllib3.exceptions import ( DecodeError, IncompleteRead, @@ -57,12 +58,20 @@ def test_getheaders(self): headers = {"host": "example.com"} r = HTTPResponse(headers=headers) - assert r.getheaders() == headers + with pytest.warns( + DeprecationWarning, + match=r"HTTPResponse.getheaders\(\) is deprecated", + ): + assert r.getheaders() == HTTPHeaderDict(headers) def test_getheader(self): headers = {"host": "example.com"} r = HTTPResponse(headers=headers) - assert r.getheader("host") == "example.com" + with pytest.warns( + DeprecationWarning, + match=r"HTTPResponse.getheader\(\) is deprecated", + ): + assert r.getheader("host") == "example.com" class TestResponse(object): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/urllib3-1.26.12/test/test_util.py new/urllib3-1.26.13/test/test_util.py --- old/urllib3-1.26.12/test/test_util.py 2022-08-22 15:18:37.000000000 +0200 +++ new/urllib3-1.26.13/test/test_util.py 2022-11-23 23:22:44.000000000 +0100 @@ -347,6 +347,10 @@ 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