From 768d17111c36ae31b32aa249e7ccc2406cd1917cd6b56748b0ae686c3826cc44 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 10 Jan 2022 22:42:38 +0000 Subject: [PATCH 1/6] - update to 1.26.8: * Added extra message to``urllib3.exceptions.ProxyError`` when urllib3 detects that a proxy is configured to use HTTPS but the proxy itself appears to only use HTTP. * Added a mention of the size of the connection pool when discarding a connection due to the pool being full. * Added explicit support for Python 3.11. * Deprecated the ``Retry.MAX_BACKOFF`` class property in favor of ``Retry.DEFAULT_MAX_BACKOFF`` to better match the rest of the default parameter names. ``Retry.MAX_BACKOFF`` is removed in v2.0. * Changed location of the vendored ``ssl.match_hostname`` function from ``urllib3.packages.ssl_match_hostname`` to ``urllib3.util.ssl_match_hostname`` to ensure Python 3.10+ compatibility after being repackaged by downstream distributors. * Fixed absolute imports, all imports are now relative. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=127 --- python-urllib3.changes | 18 ++++++++++++++++++ python-urllib3.spec | 10 ++-------- ssl_match_hostname_py3.py | 1 - urllib3-1.26.7.tar.gz | 3 --- urllib3-1.26.8.tar.gz | 3 +++ 5 files changed, 23 insertions(+), 12 deletions(-) delete mode 100644 ssl_match_hostname_py3.py delete mode 100644 urllib3-1.26.7.tar.gz create mode 100644 urllib3-1.26.8.tar.gz diff --git a/python-urllib3.changes b/python-urllib3.changes index eca1f3e..7dae588 100644 --- a/python-urllib3.changes +++ b/python-urllib3.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Mon Jan 10 22:41:38 UTC 2022 - Dirk Müller + +- update to 1.26.8: + * Added extra message to``urllib3.exceptions.ProxyError`` when urllib3 detects that + a proxy is configured to use HTTPS but the proxy itself appears to only use HTTP. + * Added a mention of the size of the connection pool when discarding a + connection due to the pool being full. + * Added explicit support for Python 3.11. + * Deprecated the ``Retry.MAX_BACKOFF`` class property in favor of + ``Retry.DEFAULT_MAX_BACKOFF`` to better match the rest of the default parameter names. + ``Retry.MAX_BACKOFF`` is removed in v2.0. + * Changed location of the vendored ``ssl.match_hostname`` function from + ``urllib3.packages.ssl_match_hostname`` to + ``urllib3.util.ssl_match_hostname`` to ensure Python 3.10+ compatibility after + being repackaged by downstream distributors. + * Fixed absolute imports, all imports are now relative. + ------------------------------------------------------------------- Tue Oct 26 21:02:38 UTC 2021 - Dirk Müller diff --git a/python-urllib3.spec b/python-urllib3.spec index 1c78ce2..6f8e194 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -27,15 +27,13 @@ %bcond_with test %endif Name: python-urllib3%{psuffix} -Version: 1.26.7 +Version: 1.26.8 Release: 0 Summary: HTTP library with thread-safe connection pooling, file post, and more License: MIT Group: Development/Languages/Python URL: https://urllib3.readthedocs.org/ Source: https://files.pythonhosted.org/packages/source/u/urllib3/urllib3-%{version}.tar.gz -# Wrapper for ssl to unbundle ssl_match_hostname -Source1: ssl_match_hostname_py3.py # PATCH-FIX-UPSTREAM remove_mock.patch gh#urllib3/urllib3#2108 mcepl@suse.com # remove dependency on the external module mock Patch0: remove_mock.patch @@ -110,10 +108,6 @@ rm -r test/appengine/ # Unbundle the Python 3 build rm %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py -rm -r %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname/ - -# Copy ssl_match_hostname.py before compilation, so we can have a pyc too -cp -a %{SOURCE1} %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname.py %{python_expand \ $python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/urllib3/ diff --git a/ssl_match_hostname_py3.py b/ssl_match_hostname_py3.py deleted file mode 100644 index 963d16e..0000000 --- a/ssl_match_hostname_py3.py +++ /dev/null @@ -1 +0,0 @@ -from ssl import match_hostname, CertificateError diff --git a/urllib3-1.26.7.tar.gz b/urllib3-1.26.7.tar.gz deleted file mode 100644 index 2c737a0..0000000 --- a/urllib3-1.26.7.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4987c65554f7a2dbf30c18fd48778ef124af6fab771a377103da0585e2336ece -size 291350 diff --git a/urllib3-1.26.8.tar.gz b/urllib3-1.26.8.tar.gz new file mode 100644 index 0000000..e8f012a --- /dev/null +++ b/urllib3-1.26.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0e7c33d9a63e7ddfcb86780aac87befc2fbddf46c58dbb487e0855f7ceec283c +size 294280 From d8eb6414575a8d67b1ba5f3c5a654e402b5e4b41efb05f7c9b1b1ee927cdf620 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 10 Jan 2022 23:52:50 +0000 Subject: [PATCH 2/6] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=128 --- python-urllib3.spec | 7 +++++++ ssl_match_hostname_py3.py | 1 + 2 files changed, 8 insertions(+) create mode 100644 ssl_match_hostname_py3.py diff --git a/python-urllib3.spec b/python-urllib3.spec index 6f8e194..cdc112b 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -34,6 +34,8 @@ License: MIT Group: Development/Languages/Python URL: https://urllib3.readthedocs.org/ Source: https://files.pythonhosted.org/packages/source/u/urllib3/urllib3-%{version}.tar.gz +# Wrapper for ssl to unbundle ssl_match_hostname +Source1: ssl_match_hostname_py3.py # PATCH-FIX-UPSTREAM remove_mock.patch gh#urllib3/urllib3#2108 mcepl@suse.com # remove dependency on the external module mock Patch0: remove_mock.patch @@ -109,6 +111,11 @@ rm -r test/appengine/ # Unbundle the Python 3 build rm %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py +rm -r %{buildroot}/%{python3_sitelib}/urllib3/util/ssl_match_hostname.py + +# Copy ssl_match_hostname.py before compilation, so we can have a pyc too +cp -a %{SOURCE1} %{buildroot}/%{python3_sitelib}/urllib3/util/ssl_match_hostname.py + %{python_expand \ $python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/urllib3/ $python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/urllib3/ diff --git a/ssl_match_hostname_py3.py b/ssl_match_hostname_py3.py new file mode 100644 index 0000000..963d16e --- /dev/null +++ b/ssl_match_hostname_py3.py @@ -0,0 +1 @@ +from ssl import match_hostname, CertificateError From c62e35a204add4f69d0a9b1c44a3a4c170eb902f04d41769bfaf6a95b1f8f702 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 10 Jan 2022 23:53:15 +0000 Subject: [PATCH 3/6] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=129 --- python-urllib3.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/python-urllib3.spec b/python-urllib3.spec index cdc112b..b2e22c5 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -110,7 +110,6 @@ rm -r test/appengine/ # Unbundle the Python 3 build rm %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py - rm -r %{buildroot}/%{python3_sitelib}/urllib3/util/ssl_match_hostname.py # Copy ssl_match_hostname.py before compilation, so we can have a pyc too From 51cc811858de2358a2ce8dcc5f8500460bb7a1de1041f1ca4b9238f3dbe449a1 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 29 Mar 2022 11:48:46 +0000 Subject: [PATCH 4/6] - update to 1.26.9: * Changed ``urllib3[brotli]`` extra to favor installing Brotli libraries that are still receiving updates like ``brotli`` and ``brotlicffi`` instead of ``brotlipy``. This change does not impact behavior of urllib3, only which dependencies are installed. * Fixed a socket leaking when ``HTTPSConnection.connect()`` raises an exception. * Fixed ``server_hostname`` being forwarded from ``PoolManager`` to ``HTTPConnectionPool`` when requesting an HTTP URL. Should only be forwarded when requesting an HTTPS URL. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=130 --- python-urllib3.changes | 11 +++++++++++ python-urllib3.spec | 2 +- urllib3-1.26.8.tar.gz | 3 --- urllib3-1.26.9.tar.gz | 3 +++ 4 files changed, 15 insertions(+), 4 deletions(-) delete mode 100644 urllib3-1.26.8.tar.gz create mode 100644 urllib3-1.26.9.tar.gz diff --git a/python-urllib3.changes b/python-urllib3.changes index 7dae588..83b15cd 100644 --- a/python-urllib3.changes +++ b/python-urllib3.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Tue Mar 29 11:48:27 UTC 2022 - Dirk Müller + +- update to 1.26.9: + * Changed ``urllib3[brotli]`` extra to favor installing Brotli libraries that are still + receiving updates like ``brotli`` and ``brotlicffi`` instead of ``brotlipy``. + This change does not impact behavior of urllib3, only which dependencies are installed. + * Fixed a socket leaking when ``HTTPSConnection.connect()`` raises an exception. + * Fixed ``server_hostname`` being forwarded from ``PoolManager`` to ``HTTPConnectionPool`` + when requesting an HTTP URL. Should only be forwarded when requesting an HTTPS URL. + ------------------------------------------------------------------- Mon Jan 10 22:41:38 UTC 2022 - Dirk Müller diff --git a/python-urllib3.spec b/python-urllib3.spec index b2e22c5..804d64d 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -27,7 +27,7 @@ %bcond_with test %endif Name: python-urllib3%{psuffix} -Version: 1.26.8 +Version: 1.26.9 Release: 0 Summary: HTTP library with thread-safe connection pooling, file post, and more License: MIT diff --git a/urllib3-1.26.8.tar.gz b/urllib3-1.26.8.tar.gz deleted file mode 100644 index e8f012a..0000000 --- a/urllib3-1.26.8.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0e7c33d9a63e7ddfcb86780aac87befc2fbddf46c58dbb487e0855f7ceec283c -size 294280 diff --git a/urllib3-1.26.9.tar.gz b/urllib3-1.26.9.tar.gz new file mode 100644 index 0000000..a126f98 --- /dev/null +++ b/urllib3-1.26.9.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aabaf16477806a5e1dd19aa41f8c2b7950dd3c746362d7e3223dbe6de6ac448e +size 295258 From 8b7b942d1760e141ce12810c241f39e302da3bf0191cd50332b964608049e41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Wed, 6 Apr 2022 05:43:40 +0000 Subject: [PATCH 5/6] Accepting request 967156 from home:bnavigator:branches:devel:languages:python - Remove unbundling off ssl.match_hostname. * It was only done for the primary python3 flavor * It is bundled for a reason gh#urllib3/urllib3#2439, gh#urllib3/urllib3#2448 * The tests (and probably urllib3 users) use wildcard patterns not supported by the stdlib - Fix undbundling of six for all flavors - Replace brotlipy recommendation and test with python-Brotli (see release notes below) OBS-URL: https://build.opensuse.org/request/show/967156 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=131 --- python-urllib3.changes | 13 +++++++++++++ python-urllib3.spec | 38 ++++++++++++++------------------------ ssl_match_hostname_py3.py | 1 - 3 files changed, 27 insertions(+), 25 deletions(-) delete mode 100644 ssl_match_hostname_py3.py diff --git a/python-urllib3.changes b/python-urllib3.changes index 83b15cd..99a0741 100644 --- a/python-urllib3.changes +++ b/python-urllib3.changes @@ -1,3 +1,16 @@ +------------------------------------------------------------------- +Tue Apr 5 19:54:39 UTC 2022 - Ben Greiner + +- Remove unbundling off ssl.match_hostname. + * It was only done for the primary python3 flavor + * It is bundled for a reason gh#urllib3/urllib3#2439, + gh#urllib3/urllib3#2448 + * The tests (and probably urllib3 users) use wildcard patterns + not supported by the stdlib +- Fix undbundling of six for all flavors +- Replace brotlipy recommendation and test with python-Brotli + (see release notes below) + ------------------------------------------------------------------- Tue Mar 29 11:48:27 UTC 2022 - Dirk Müller diff --git a/python-urllib3.spec b/python-urllib3.spec index 804d64d..bcae27c 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -16,7 +16,7 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "test" @@ -34,11 +34,10 @@ License: MIT Group: Development/Languages/Python URL: https://urllib3.readthedocs.org/ Source: https://files.pythonhosted.org/packages/source/u/urllib3/urllib3-%{version}.tar.gz -# Wrapper for ssl to unbundle ssl_match_hostname -Source1: ssl_match_hostname_py3.py # PATCH-FIX-UPSTREAM remove_mock.patch gh#urllib3/urllib3#2108 mcepl@suse.com # remove dependency on the external module mock Patch0: remove_mock.patch +BuildRequires: %{python_module base >= 3.7} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} BuildRequires: fdupes @@ -50,12 +49,12 @@ Requires: python-cryptography >= 1.3.4 Requires: python-idna >= 2.0.0 Requires: python-pyOpenSSL >= 0.14 Requires: python-six >= 1.12.0 +Recommends: python-Brotli >= 1.0.9 Recommends: python-PySocks >= 1.5.6 -Recommends: python-brotlipy >= 0.6.0 BuildArch: noarch %if %{with test} +BuildRequires: %{python_module Brotli >= 1.0.9} BuildRequires: %{python_module PySocks >= 1.5.6} -BuildRequires: %{python_module brotlipy >= 0.6.0} BuildRequires: %{python_module certifi} BuildRequires: %{python_module cryptography >= 1.3.4} BuildRequires: %{python_module dateutil} @@ -108,35 +107,26 @@ rm -r test/appengine/ %if !%{with test} %python_install -# Unbundle the Python 3 build -rm %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py -rm -r %{buildroot}/%{python3_sitelib}/urllib3/util/ssl_match_hostname.py +%{python_expand # Unbundle six +rm %{buildroot}/%{$python_sitelib}/urllib3/packages/six.py +rm %{buildroot}/%{$python_sitelib}/urllib3/packages/__pycache__/six*.pyc -# Copy ssl_match_hostname.py before compilation, so we can have a pyc too -cp -a %{SOURCE1} %{buildroot}/%{python3_sitelib}/urllib3/util/ssl_match_hostname.py +ln -s %{$python_sitelib}/six.py %{buildroot}/%{$python_sitelib}/urllib3/packages/six.py +ln -sf %{$python_sitelib}/__pycache__/six.cpython-%{$python_version_nodots}.opt-1.pyc \ + %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/ +ln -sf %{$python_sitelib}/__pycache__/six.cpython-%{$python_version_nodots}.pyc \ + %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/ -%{python_expand \ -$python -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/urllib3/ -$python -O -m compileall -d %{$python_sitelib} %{buildroot}%{$python_sitelib}/urllib3/ +%fdupes %{buildroot}%{$python_sitelib} } - -ln -s %{python3_sitelib}/six.py %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py -ln -sf %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.opt-1.pyc \ - %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/ -ln -sf %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.pyc \ - %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/ - -%python_expand %fdupes %{buildroot}%{$python_sitelib} %endif %if %{with test} %check # gh#urllib3/urllib3#2109 export CI="true" -# still broken with new ssl -skiplist='test_import_urllib3' # skip some randomly failing tests (mostly on i586, but sometimes they fail on other architectures) -skiplist+=" or test_ssl_read_timeout or test_ssl_failed_fingerprint_verification or test_ssl_custom_validation_failure_terminates" +skiplist="test_ssl_read_timeout or test_ssl_failed_fingerprint_verification or test_ssl_custom_validation_failure_terminates" # gh#urllib3/urllib3#1752 and others: upstream's way of checking that the build # system has a correct system time breaks (re-)building the package after too # many months have passed since the last release. diff --git a/ssl_match_hostname_py3.py b/ssl_match_hostname_py3.py deleted file mode 100644 index 963d16e..0000000 --- a/ssl_match_hostname_py3.py +++ /dev/null @@ -1 +0,0 @@ -from ssl import match_hostname, CertificateError From 00a87ea1c478f386e95ce3425b0dc5108336dcc18eba4a7b7f4f7c8db61c3a7f Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Tue, 19 Apr 2022 05:36:05 +0000 Subject: [PATCH 6/6] - Remove unneeded BuildRequires of mock. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=132 --- python-urllib3.changes | 5 +++++ python-urllib3.spec | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/python-urllib3.changes b/python-urllib3.changes index 99a0741..677bbdc 100644 --- a/python-urllib3.changes +++ b/python-urllib3.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Apr 19 05:34:17 UTC 2022 - Steve Kowalik + +- Remove unneeded BuildRequires of mock. + ------------------------------------------------------------------- Tue Apr 5 19:54:39 UTC 2022 - Ben Greiner diff --git a/python-urllib3.spec b/python-urllib3.spec index bcae27c..788eb0c 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -60,7 +60,6 @@ BuildRequires: %{python_module cryptography >= 1.3.4} BuildRequires: %{python_module dateutil} BuildRequires: %{python_module flaky} BuildRequires: %{python_module idna >= 2.0.0} -BuildRequires: %{python_module mock >= 1.3.0} BuildRequires: %{python_module psutil} BuildRequires: %{python_module pytest-freezegun} BuildRequires: %{python_module pytest-timeout}