From 23ccadd3fdbc5dfd98d82fa46fc4d9035b361e74 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 19 Jul 2024 16:50:41 +0000 Subject: [PATCH 01/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 52671c660b7a4b04969fa0db68871131f4bd0a5b Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 18 May 2023 10:35:20 -0400 Subject: [PATCH 02/29] Update to 2.0.7 - Add metapackage for new zstd extra - Upstream no longer vendors six, so we no longer need to bundle it - Assert that there is a license file in the .dist-info directory - Greatly reduce the number of skipped tests - Stop explicitly bounding versions of build dependencies for testing --- .gitignore | 1 + python-urllib3.spec | 108 ++++++++++++++++++++++++-------------------- sources | 2 +- 3 files changed, 61 insertions(+), 50 deletions(-) diff --git a/.gitignore b/.gitignore index c53326a..315bf3c 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ /urllib3-1.26.17.tar.gz /urllib3-1.26.18.tar.gz /urllib3-1.26.19.tar.gz +/urllib3-2.0.7.tar.gz diff --git a/python-urllib3.spec b/python-urllib3.spec index 7acc053..54c5ec8 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -9,7 +9,7 @@ %endif Name: python-urllib3 -Version: 1.26.19 +Version: 2.0.7 Release: %autorelease Summary: HTTP library with thread-safe connection pooling, file post, and more @@ -26,27 +26,25 @@ BuildRequires: python3-devel # Test dependencies are listed only in dev-requirements.txt. Because there are # linters and coverage tools mixed in, and exact versions are pinned, we resort # to manual listing. -# mock==3.0.5: patched out in %%prep -# coverage~=6.0;python_version>="3.6": omitted linter/coverage tool -# tornado==6.1.0;python_version>="3.6" -BuildRequires: %{py3_dist tornado} >= 6.1 +# coverage==7.3.2: omitted linter/coverage tool +# tornado==6.3.3 +BuildRequires: %{py3_dist tornado} # PySocks==1.7.1 -BuildRequires: %{py3_dist PySocks} >= 1.7.1 -# win-inet-pton==1.1.0: Windows-only workaround -# pytest==6.2.4; python_version>="3.10" -BuildRequires: %{py3_dist pytest} >= 6.2.4 -# pytest-timeout==1.4.2 -BuildRequires: %{py3_dist pytest-timeout} >= 1.4.2 -# pytest-freezegun==0.4.2 -BuildRequires: %{py3_dist pytest-freezegun} >= 0.4.2 -# flaky==3.7.0: not really required -# trustme==0.7.0 -BuildRequires: %{py3_dist trustme} >= 0.7 -# cryptography==38.0.3;python_version>="3.6": associated with the deprecated -# “secure” extra -# python-dateutil==2.8.1 -BuildRequires: %{py3_dist python-dateutil} >= 2.8.1 -# gcp-devrel-py-tools==0.0.16: not used in offline testing +BuildRequires: %{py3_dist PySocks} +# pytest==7.4.2 +BuildRequires: %{py3_dist pytest} +# pytest-timeout==2.1.0 +BuildRequires: %{py3_dist pytest-timeout} +# pyOpenSSL==23.2.0 +BuildRequires: %{py3_dist pyOpenSSL} +# trustme==1.1.0 +BuildRequires: %{py3_dist trustme} +# cryptography==41.0.4 +BuildRequires: %{py3_dist cryptography} +# backports.zoneinfo==0.2.1;python_version<"3.9" +# towncrier==23.6.0: used for generating a changelog +# pytest-memray==1.5.0;python_version>="3.8" and implementation_name=="cpython": +# not packaged, unwanted profiler %endif %global _description %{expand: @@ -75,9 +73,6 @@ Requires: ca-certificates BuildRequires: %{py3_dist idna} Requires: %{py3_dist idna} -# grep __version__ src/urllib3/packages/six.py -Provides: bundled(python3dist(six)) = 1.16.0 - %if %{with extras} # There has historically been a manual hard dependency on python3-pysocks; # since bringing it in is the sole function of python3-urllib3+socks, @@ -89,10 +84,7 @@ Recommends: python3-urllib3+socks %if %{with extras} -# We do NOT package the “secure” extra because it is deprecated; see: -# “Deprecate the pyOpenSSL TLS implementation and [secure] extra” -# https://github.com/urllib3/urllib3/issues/2680 -%pyproject_extras_subpkg -n python3-urllib3 brotli socks +%pyproject_extras_subpkg -n python3-urllib3 brotli zstd socks %endif @@ -116,16 +108,11 @@ Recommends: python3-urllib3+socks recent_date=$(date --date "7 month ago" +"%Y, %_m, %_d") sed -i "s/^RECENT_DATE = datetime.date(.*)/RECENT_DATE = datetime.date($recent_date)/" src/urllib3/connection.py -# Use the standard library instead of a backport -sed -i -e 's/^import mock/from unittest import mock/' \ - -e 's/^from mock import /from unittest.mock import /' \ - test/*.py docs/conf.py - %generate_buildrequires # Generate BR’s from packaged extras even when tests are disabled, to ensure # the extras metapackages are installable if the build succeeds. -%pyproject_buildrequires %{?with_extras:-x brotli,socks} +%pyproject_buildrequires %{?with_extras:-x brotli,zstd,socks} %build @@ -135,36 +122,59 @@ sed -i -e 's/^import mock/from unittest import mock/' \ %install %pyproject_install -%pyproject_save_files urllib3 +%pyproject_save_files -l urllib3 %check # urllib3.contrib.socks requires urllib3[socks] # urllib3.contrib.ntlmpool is deprecated and requires ntlm # urllib3.contrib.securetransport is macOS only -# urllib3.contrib.pyopenssl requires urllib3[secure] +# urllib3.contrib.pyopenssl requires pyOpenSSL %{pyproject_check_import %{!?with_extras:-e urllib3.contrib.socks} -e urllib3.contrib.ntlmpool -e urllib3.contrib.securetransport -e urllib3.contrib.pyopenssl} + +# Increase the “long timeout” for slower environments; as of this writing, it +# is increased from 0.1 to 0.5 second. +export CI=1 + %if %{with tests} -# Drop the dummyserver tests in koji. They fail there in real builds, but not -# in scratch builds (weird). -ignore="${ignore-} --ignore=test/with_dummyserver/" -# Don't run the Google App Engine tests -ignore="${ignore-} --ignore=test/appengine/" -# Lots of these tests started failing, even for old versions, so it has something -# to do with Fedora in particular. They don't fail in upstream build infrastructure -ignore="${ignore-} --ignore=test/contrib/" -# Tests for Python built without SSL, but Fedora builds with SSL. These tests -# fail when combined with the unbundling of backports-ssl_match_hostname -ignore="${ignore-} --ignore=test/test_no_ssl.py" -%pytest -v ${ignore-} +# These tests *may* time out; https://github.com/urllib3/urllib3/pull/3206 +# purports to fix some of them, but there is still a lot of flakiness here. +ignore="${ignore-} --ignore=test/with_dummyserver/test_socketlevel.py" +# This test still times out sometimes, especially on certain architectures, +# even when we export the CI environment variable to increase timeouts. +k="${k-}${k+ and }not (TestHTTPProxyManager and test_tunneling_proxy_request_timeout[https-https])" +%if 0%{?__isa_bits} == 32 +# These fail on i686 and presumably on other 32-bit architectures. Note that +# since the base package is noarch and the package may be assigned to a builder +# of any architecture, there is no guarantee that these tests run at all in a +# particular build. See discussion in +# https://src.fedoraproject.org/rpms/python-urllib3/pull-request/33. +k="${k-}${k+ and }not (TestSSL and test_requesting_large_resources_via_ssl)" +k="${k-}${k+ and }not (TestSocketSSL and test_requesting_large_resources_via_ssl)" +%endif +# These require network access: +k="${k-}${k+ and }not (TestPoolManager and test_deprecated_no_scheme)" +# The error message does not quite match what upstream expects; this is fixed +# in later urllib3 releases. +# > with pytest.raises( +# SSLError, match=r"(wrong version number|record overflow)" +# ): +# E AssertionError: Regex pattern did not match. +# E Regex: '(wrong version number|record overflow)' +# E Input: '("read error: Error([(\'SSL routines\', \'\', +# \'packet length too long\'), (\'SSL routines\', \'\', +# \'record layer failure\')])",)' +k="${k-}${k+ and }not (TestSocketSSL and test_ssl_failure_midway_through_conn)" + +%pytest -v -rs ${ignore-} -k "${k-}" %endif %files -n python3-urllib3 -f %{pyproject_files} -%doc CHANGES.rst README.rst +%doc CHANGES.rst README.md %changelog diff --git a/sources b/sources index 010dd3d..84e7405 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (urllib3-1.26.19.tar.gz) = 6b72012dbd85434b2441229cbdea2a94583693f904dde349780e1290d581c8a5e10fe00a287a032ed1276349d0078b530f16a133e0f164dcea18105fa3dec79a +SHA512 (urllib3-2.0.7.tar.gz) = 3819d87a0b37859b7b6615170016fe2885ed818e289fc56ecd180b97eef4d1ad0c587b0250cc0d2eb73a3c21223febda95a5b6a5b4c27f88038da89d3e889eeb From 3e635b369724a701f175fad07ada87f64335df7d Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 18 May 2023 10:35:20 -0400 Subject: [PATCH 03/29] Update to 2.1.0 --- .gitignore | 1 + python-urllib3.spec | 4 +--- sources | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 315bf3c..74e9ffd 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,4 @@ /urllib3-1.26.18.tar.gz /urllib3-1.26.19.tar.gz /urllib3-2.0.7.tar.gz +/urllib3-2.1.0.tar.gz diff --git a/python-urllib3.spec b/python-urllib3.spec index 54c5ec8..8e75be0 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -9,7 +9,7 @@ %endif Name: python-urllib3 -Version: 2.0.7 +Version: 2.1.0 Release: %autorelease Summary: HTTP library with thread-safe connection pooling, file post, and more @@ -155,8 +155,6 @@ k="${k-}${k+ and }not (TestHTTPProxyManager and test_tunneling_proxy_request_tim k="${k-}${k+ and }not (TestSSL and test_requesting_large_resources_via_ssl)" k="${k-}${k+ and }not (TestSocketSSL and test_requesting_large_resources_via_ssl)" %endif -# These require network access: -k="${k-}${k+ and }not (TestPoolManager and test_deprecated_no_scheme)" # The error message does not quite match what upstream expects; this is fixed # in later urllib3 releases. # > with pytest.raises( diff --git a/sources b/sources index 84e7405..8326d49 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (urllib3-2.0.7.tar.gz) = 3819d87a0b37859b7b6615170016fe2885ed818e289fc56ecd180b97eef4d1ad0c587b0250cc0d2eb73a3c21223febda95a5b6a5b4c27f88038da89d3e889eeb +SHA512 (urllib3-2.1.0.tar.gz) = 3568803cbfa8d6cb57cb20e91c1bf2eb84e6d40e81c77adf93934220f3c61c371a1107448fa50ab909d942787497e8a9c77536016c93a13dae7e0c9e7563d3a9 From 5dd099fde6015b0d27b68caa239a4879079c429c Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 30 Jan 2024 15:43:19 -0500 Subject: [PATCH 04/29] Update to 2.2.0 --- .gitignore | 2 ++ python-urllib3.spec | 59 ++++++++++++++++++++++++++++++++++++--------- sources | 3 ++- 3 files changed, 52 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 74e9ffd..7eb9f60 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,5 @@ /urllib3-1.26.19.tar.gz /urllib3-2.0.7.tar.gz /urllib3-2.1.0.tar.gz +/urllib3-2.2.0.tar.gz +/hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz diff --git a/python-urllib3.spec b/python-urllib3.spec index 8e75be0..04c5259 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -9,14 +9,30 @@ %endif Name: python-urllib3 -Version: 2.1.0 +Version: 2.2.0 Release: %autorelease Summary: HTTP library with thread-safe connection pooling, file post, and more # SPDX License: MIT URL: https://github.com/urllib3/urllib3 -Source: %{url}/archive/%{version}/urllib3-%{version}.tar.gz +Source0: %{url}/archive/%{version}/urllib3-%{version}.tar.gz +# A special forked copy of Hypercorn is required for testing. We asked about +# the possiblility of using a released version in the future in: +# Path toward testing with a released version of hypercorn? +# https://github.com/urllib3/urllib3/3334 +# Upstream would like to get the necessary changes merged into Hypercorn, but +# explained clearly why the forked copy is needed for now. +# +# Note that dev-requirements.txt references the urllib3-changes branch of +# https://github.com/urllib3/hypercorn/, and we should use the latest commit +# from that branch, but we package using a commit hash for reproducibility. +# +# We do not need to treat this as a bundled dependency because it is not +# installed in the buildroot or otherwise included in any of the binary RPMs. +%global hypercorn_url https://github.com/urllib3/hypercorn +%global hypercorn_commit d1719f8c1570cbd8e6a3719ffdb14a4d72880abb +Source1: %{hypercorn_url}/archive/%{hypercorn_commit}/hypercorn-%{hypercorn_commit}.tar.gz BuildArch: noarch @@ -26,9 +42,9 @@ BuildRequires: python3-devel # Test dependencies are listed only in dev-requirements.txt. Because there are # linters and coverage tools mixed in, and exact versions are pinned, we resort # to manual listing. -# coverage==7.3.2: omitted linter/coverage tool -# tornado==6.3.3 -BuildRequires: %{py3_dist tornado} +# h2==4.1.0: also in the h2 extra +BuildRequires: %{py3_dist h2} +# coverage==7.4.1: omitted linter/coverage tool # PySocks==1.7.1 BuildRequires: %{py3_dist PySocks} # pytest==7.4.2 @@ -37,14 +53,29 @@ BuildRequires: %{py3_dist pytest} BuildRequires: %{py3_dist pytest-timeout} # pyOpenSSL==23.2.0 BuildRequires: %{py3_dist pyOpenSSL} +# idna==3.4 +BuildRequires: %{py3_dist idna} # trustme==1.1.0 BuildRequires: %{py3_dist trustme} -# cryptography==41.0.4 +# cryptography==41.0.6 BuildRequires: %{py3_dist cryptography} # backports.zoneinfo==0.2.1;python_version<"3.9" # towncrier==23.6.0: used for generating a changelog # pytest-memray==1.5.0;python_version>="3.8" and implementation_name=="cpython": # not packaged, unwanted profiler +# trio==0.23.1 +BuildRequires: %{py3_dist trio} +# Quart==0.19.4 +BuildRequires: %{py3_dist Quart} +# quart-trio==0.11.1 +BuildRequires: %{py3_dist quart-trio} +# # https://github.com/pgjones/hypercorn/issues/62 +# # https://github.com/pgjones/hypercorn/issues/168 +# # https://github.com/pgjones/hypercorn/issues/169 +# hypercorn @ git+https://github.com/urllib3/hypercorn@urllib3-changes +# hypercorn is packaged, but we need the forked/bundled version +# httpx==0.25.2 +BuildRequires: %{py3_dist httpx} %endif %global _description %{expand: @@ -84,12 +115,14 @@ Recommends: python3-urllib3+socks %if %{with extras} -%pyproject_extras_subpkg -n python3-urllib3 brotli zstd socks +%pyproject_extras_subpkg -n python3-urllib3 brotli zstd socks h2 %endif %prep %autosetup -n urllib3-%{version} +%setup -q -n urllib3-%{version} -T -D -b 1 + # Make sure that the RECENT_DATE value doesn't get too far behind what the current date is. # RECENT_DATE must not be older that 2 years from the build time, or else test_recent_date # (from test/test_connection.py) would fail. However, it shouldn't be to close to the build time either, @@ -112,7 +145,7 @@ sed -i "s/^RECENT_DATE = datetime.date(.*)/RECENT_DATE = datetime.date($recent_d %generate_buildrequires # Generate BR’s from packaged extras even when tests are disabled, to ensure # the extras metapackages are installable if the build succeeds. -%pyproject_buildrequires %{?with_extras:-x brotli,zstd,socks} +%pyproject_buildrequires %{?with_extras:-x brotli,zstd,socks,h2} %build @@ -127,10 +160,13 @@ sed -i "s/^RECENT_DATE = datetime.date(.*)/RECENT_DATE = datetime.date($recent_d %check # urllib3.contrib.socks requires urllib3[socks] +# +# urllib3.contrib.emscripten is “special” (import js will fail) # urllib3.contrib.ntlmpool is deprecated and requires ntlm # urllib3.contrib.securetransport is macOS only # urllib3.contrib.pyopenssl requires pyOpenSSL %{pyproject_check_import %{!?with_extras:-e urllib3.contrib.socks} + -e urllib3.contrib.emscripten* -e urllib3.contrib.ntlmpool -e urllib3.contrib.securetransport -e urllib3.contrib.pyopenssl} @@ -138,11 +174,11 @@ sed -i "s/^RECENT_DATE = datetime.date(.*)/RECENT_DATE = datetime.date($recent_d # Increase the “long timeout” for slower environments; as of this writing, it # is increased from 0.1 to 0.5 second. export CI=1 +# Interpose the special forked copy of Hypercorn. +hypercorndir="${PWD}/../hypercorn-%{hypercorn_commit}/src" +export PYTHONPATH="${hypercorndir}:%{buildroot}%{python3_sitelib}" %if %{with tests} -# These tests *may* time out; https://github.com/urllib3/urllib3/pull/3206 -# purports to fix some of them, but there is still a lot of flakiness here. -ignore="${ignore-} --ignore=test/with_dummyserver/test_socketlevel.py" # This test still times out sometimes, especially on certain architectures, # even when we export the CI environment variable to increase timeouts. k="${k-}${k+ and }not (TestHTTPProxyManager and test_tunneling_proxy_request_timeout[https-https])" @@ -168,6 +204,7 @@ k="${k-}${k+ and }not (TestSocketSSL and test_requesting_large_resources_via_ssl k="${k-}${k+ and }not (TestSocketSSL and test_ssl_failure_midway_through_conn)" %pytest -v -rs ${ignore-} -k "${k-}" +%pytest -v -rs ${ignore-} -k "${k-}" --integration %endif diff --git a/sources b/sources index 8326d49..06db068 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (urllib3-2.1.0.tar.gz) = 3568803cbfa8d6cb57cb20e91c1bf2eb84e6d40e81c77adf93934220f3c61c371a1107448fa50ab909d942787497e8a9c77536016c93a13dae7e0c9e7563d3a9 +SHA512 (urllib3-2.2.0.tar.gz) = 3914442c92980c9b803e7726228b147e326f71bf4ae7507b64474de6cb6df86e3e90026fd2f41e4f83e8bc6735b0f816cfc9945839a7cc5d0a86d31a5a8d6438 +SHA512 (hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz) = 62d6787d88a2e716f0ac04fc49f6cdc586e473a660ee754ff66961922ae78bcc75d1f78b091e78557dd60f006e8e480114738c7b4ff71beac804e4fc9603240b From f66d25224ca06c85bec2b16c74351c782326fd8f Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 18 Feb 2024 17:00:57 -0500 Subject: [PATCH 05/29] Update to 2.2.1 --- .gitignore | 1 + python-urllib3.spec | 22 +++++++++++++++------- sources | 2 +- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 7eb9f60..7a727fb 100644 --- a/.gitignore +++ b/.gitignore @@ -45,3 +45,4 @@ /urllib3-2.1.0.tar.gz /urllib3-2.2.0.tar.gz /hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz +/urllib3-2.2.1.tar.gz diff --git a/python-urllib3.spec b/python-urllib3.spec index 04c5259..d5d4c92 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -9,7 +9,7 @@ %endif Name: python-urllib3 -Version: 2.2.0 +Version: 2.2.1 Release: %autorelease Summary: HTTP library with thread-safe connection pooling, file post, and more @@ -47,23 +47,26 @@ BuildRequires: %{py3_dist h2} # coverage==7.4.1: omitted linter/coverage tool # PySocks==1.7.1 BuildRequires: %{py3_dist PySocks} -# pytest==7.4.2 +# pytest==7.4.4 BuildRequires: %{py3_dist pytest} # pytest-timeout==2.1.0 BuildRequires: %{py3_dist pytest-timeout} -# pyOpenSSL==23.2.0 +# pyOpenSSL==24.0.0 BuildRequires: %{py3_dist pyOpenSSL} # idna==3.4 BuildRequires: %{py3_dist idna} # trustme==1.1.0 BuildRequires: %{py3_dist trustme} -# cryptography==41.0.6 +# cryptography==42.0.2 BuildRequires: %{py3_dist cryptography} # backports.zoneinfo==0.2.1;python_version<"3.9" # towncrier==23.6.0: used for generating a changelog -# pytest-memray==1.5.0;python_version>="3.8" and implementation_name=="cpython": -# not packaged, unwanted profiler -# trio==0.23.1 +# pytest-memray==1.5.0;python_version<"3.13" and sys_platform!="win32" and +# implementation_name=="cpython": not packaged, unwanted profiler +# trio==0.23.1;python_version<"3.13" +# # We need a release of Trio newer than 0.24.0 to support CPython 3.13. +# # https://github.com/python-trio/trio/issues/2903 +# trio @ git+https://github.com/python-trio/trio@e4c8eb2d7ef59eeea1441656e392fe1b0870a374; python_version == "3.13" BuildRequires: %{py3_dist trio} # Quart==0.19.4 BuildRequires: %{py3_dist Quart} @@ -76,6 +79,11 @@ BuildRequires: %{py3_dist quart-trio} # hypercorn is packaged, but we need the forked/bundled version # httpx==0.25.2 BuildRequires: %{py3_dist httpx} +# pytest-socket==0.7.0: not packaged, not strictly required +# # CFFI is not going to support CPython 3.13 in an actual release until +# # there is a release candidate for 3.13. +# # https://github.com/python-cffi/cffi/issues/23#issuecomment-1845861410 +# cffi @ git+https://github.com/python-cffi/cffi@14723b0bbd127790c450945099db31018d80fa83; python_version == "3.13" %endif %global _description %{expand: diff --git a/sources b/sources index 06db068..0f1cec6 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (urllib3-2.2.0.tar.gz) = 3914442c92980c9b803e7726228b147e326f71bf4ae7507b64474de6cb6df86e3e90026fd2f41e4f83e8bc6735b0f816cfc9945839a7cc5d0a86d31a5a8d6438 +SHA512 (urllib3-2.2.1.tar.gz) = 86713f54fe2a4c6c6ecfddfa939611526f81282162851d44e00d4b7ed21c3265b11a3ff506d685ddb88c0998f392809b7ffd08775608e309dd290fc30ab5d741 SHA512 (hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz) = 62d6787d88a2e716f0ac04fc49f6cdc586e473a660ee754ff66961922ae78bcc75d1f78b091e78557dd60f006e8e480114738c7b4ff71beac804e4fc9603240b From 50a7af007fa2609f717ea90eefcb14e59f0b8528 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 5 Aug 2024 13:07:12 -0400 Subject: [PATCH 06/29] Add an rpmlintrc file [skip changelog] --- python-urllib3.rpmlintrc | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 python-urllib3.rpmlintrc diff --git a/python-urllib3.rpmlintrc b/python-urllib3.rpmlintrc new file mode 100644 index 0000000..0b83833 --- /dev/null +++ b/python-urllib3.rpmlintrc @@ -0,0 +1,6 @@ +# It is normal that extras metapackages should not have documentation, or any +# files at all. +addFilter(r"\+\w+\.\w+: W: no-documentation") +# Not real spelling errors +addFilter(r"spelling-error \('([Mm]etapackage)s?',") +addFilter(r"spelling-error \('(gzip|brotli|zstd)',") From 1e83993ed022c6025af14d26a9a88169fa6f5203 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 5 Aug 2024 11:38:01 -0400 Subject: [PATCH 07/29] Update to 2.2.2 (close RHBZ#2143021) --- .gitignore | 1 + python-urllib3.spec | 28 +++++++++++++--------------- sources | 2 +- 3 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.gitignore b/.gitignore index 7a727fb..de750c9 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,4 @@ /urllib3-2.2.0.tar.gz /hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz /urllib3-2.2.1.tar.gz +/urllib3-2.2.2.tar.gz diff --git a/python-urllib3.spec b/python-urllib3.spec index d5d4c92..e4b0f66 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -1,5 +1,5 @@ # When bootstrapping Python, we cannot test this yet -# RHEL does not include the test dependencies and the dependencies for extras +# RHEL does not include the test dependencies and the dependencies for extras %if 0%{?rhel} %bcond_with tests %bcond_with extras @@ -9,7 +9,7 @@ %endif Name: python-urllib3 -Version: 2.2.1 +Version: 2.2.2 Release: %autorelease Summary: HTTP library with thread-safe connection pooling, file post, and more @@ -47,26 +47,26 @@ BuildRequires: %{py3_dist h2} # coverage==7.4.1: omitted linter/coverage tool # PySocks==1.7.1 BuildRequires: %{py3_dist PySocks} -# pytest==7.4.4 +# pytest==8.0.2 BuildRequires: %{py3_dist pytest} # pytest-timeout==2.1.0 BuildRequires: %{py3_dist pytest-timeout} # pyOpenSSL==24.0.0 BuildRequires: %{py3_dist pyOpenSSL} -# idna==3.4 +# idna==3.7 BuildRequires: %{py3_dist idna} -# trustme==1.1.0 +# # As of v1.1.0, child CA certificates generated by trustme fail +# # verification by CPython 3.13. +# # https://github.com/python-trio/trustme/pull/642 +# trustme @ git+https://github.com/python-trio/trustme@b3a767f336e20600f30c9ff78385a58352ff6ee3 BuildRequires: %{py3_dist trustme} -# cryptography==42.0.2 +# cryptography==42.0.4 BuildRequires: %{py3_dist cryptography} # backports.zoneinfo==0.2.1;python_version<"3.9" # towncrier==23.6.0: used for generating a changelog # pytest-memray==1.5.0;python_version<"3.13" and sys_platform!="win32" and # implementation_name=="cpython": not packaged, unwanted profiler -# trio==0.23.1;python_version<"3.13" -# # We need a release of Trio newer than 0.24.0 to support CPython 3.13. -# # https://github.com/python-trio/trio/issues/2903 -# trio @ git+https://github.com/python-trio/trio@e4c8eb2d7ef59eeea1441656e392fe1b0870a374; python_version == "3.13" +# trio==0.25.0 BuildRequires: %{py3_dist trio} # Quart==0.19.4 BuildRequires: %{py3_dist Quart} @@ -80,10 +80,8 @@ BuildRequires: %{py3_dist quart-trio} # httpx==0.25.2 BuildRequires: %{py3_dist httpx} # pytest-socket==0.7.0: not packaged, not strictly required -# # CFFI is not going to support CPython 3.13 in an actual release until -# # there is a release candidate for 3.13. -# # https://github.com/python-cffi/cffi/issues/23#issuecomment-1845861410 -# cffi @ git+https://github.com/python-cffi/cffi@14723b0bbd127790c450945099db31018d80fa83; python_version == "3.13" +# cffi==1.17.0rc1 +BuildRequires: %{py3_dist cffi} %endif %global _description %{expand: @@ -173,7 +171,7 @@ sed -i "s/^RECENT_DATE = datetime.date(.*)/RECENT_DATE = datetime.date($recent_d # urllib3.contrib.ntlmpool is deprecated and requires ntlm # urllib3.contrib.securetransport is macOS only # urllib3.contrib.pyopenssl requires pyOpenSSL -%{pyproject_check_import %{!?with_extras:-e urllib3.contrib.socks} +%{pyproject_check_import %{!?with_extras:-e urllib3.contrib.socks -e urllib3.http2} -e urllib3.contrib.emscripten* -e urllib3.contrib.ntlmpool -e urllib3.contrib.securetransport diff --git a/sources b/sources index 0f1cec6..8f4906c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (urllib3-2.2.1.tar.gz) = 86713f54fe2a4c6c6ecfddfa939611526f81282162851d44e00d4b7ed21c3265b11a3ff506d685ddb88c0998f392809b7ffd08775608e309dd290fc30ab5d741 +SHA512 (urllib3-2.2.2.tar.gz) = 4a7bb41c78e8061b4ba54034d3e8087bb6acd350d4765dbdacc30068f147f6bd58f0b28f23fdc8d477e625c7f3ab7a419a8f326c7988e858241b52a3ac76f5ec SHA512 (hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz) = 62d6787d88a2e716f0ac04fc49f6cdc586e473a660ee754ff66961922ae78bcc75d1f78b091e78557dd60f006e8e480114738c7b4ff71beac804e4fc9603240b From 907972b0074eff58ead35f9dca537ca86e877be2 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 12 Sep 2024 09:29:07 -0400 Subject: [PATCH 08/29] Update to 2.2.3 (close RHBZ#2311902) --- .gitignore | 1 + python-urllib3.spec | 6 ++++-- sources | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index de750c9..ce4092a 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,4 @@ /hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz /urllib3-2.2.1.tar.gz /urllib3-2.2.2.tar.gz +/urllib3-2.2.3.tar.gz diff --git a/python-urllib3.spec b/python-urllib3.spec index e4b0f66..7a9f81c 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -9,7 +9,7 @@ %endif Name: python-urllib3 -Version: 2.2.2 +Version: 2.2.3 Release: %autorelease Summary: HTTP library with thread-safe connection pooling, file post, and more @@ -149,12 +149,14 @@ sed -i "s/^RECENT_DATE = datetime.date(.*)/RECENT_DATE = datetime.date($recent_d %generate_buildrequires +export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}' # Generate BR’s from packaged extras even when tests are disabled, to ensure # the extras metapackages are installable if the build succeeds. %pyproject_buildrequires %{?with_extras:-x brotli,zstd,socks,h2} %build +export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}' %pyproject_wheel @@ -171,7 +173,7 @@ sed -i "s/^RECENT_DATE = datetime.date(.*)/RECENT_DATE = datetime.date($recent_d # urllib3.contrib.ntlmpool is deprecated and requires ntlm # urllib3.contrib.securetransport is macOS only # urllib3.contrib.pyopenssl requires pyOpenSSL -%{pyproject_check_import %{!?with_extras:-e urllib3.contrib.socks -e urllib3.http2} +%{pyproject_check_import %{!?with_extras:-e urllib3.contrib.socks -e urllib3.http2*} -e urllib3.contrib.emscripten* -e urllib3.contrib.ntlmpool -e urllib3.contrib.securetransport diff --git a/sources b/sources index 8f4906c..3d19dd9 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (urllib3-2.2.2.tar.gz) = 4a7bb41c78e8061b4ba54034d3e8087bb6acd350d4765dbdacc30068f147f6bd58f0b28f23fdc8d477e625c7f3ab7a419a8f326c7988e858241b52a3ac76f5ec +SHA512 (urllib3-2.2.3.tar.gz) = 5082c87d9692864ff0b30817f846c5d4ff298d2007085bc619431551183d6c0c6c25464be1777763890257c2f55801698b83378fbf956c663f495e96f6d1e837 SHA512 (hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz) = 62d6787d88a2e716f0ac04fc49f6cdc586e473a660ee754ff66961922ae78bcc75d1f78b091e78557dd60f006e8e480114738c7b4ff71beac804e4fc9603240b From 812b9bc5aaf42816e485a8f72fb1c299c49b6f1d Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 12 Sep 2024 11:01:50 -0400 Subject: [PATCH 09/29] Stop skipping one test that now passes --- python-urllib3.spec | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/python-urllib3.spec b/python-urllib3.spec index 7a9f81c..98d62cb 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -199,17 +199,6 @@ k="${k-}${k+ and }not (TestHTTPProxyManager and test_tunneling_proxy_request_tim k="${k-}${k+ and }not (TestSSL and test_requesting_large_resources_via_ssl)" k="${k-}${k+ and }not (TestSocketSSL and test_requesting_large_resources_via_ssl)" %endif -# The error message does not quite match what upstream expects; this is fixed -# in later urllib3 releases. -# > with pytest.raises( -# SSLError, match=r"(wrong version number|record overflow)" -# ): -# E AssertionError: Regex pattern did not match. -# E Regex: '(wrong version number|record overflow)' -# E Input: '("read error: Error([(\'SSL routines\', \'\', -# \'packet length too long\'), (\'SSL routines\', \'\', -# \'record layer failure\')])",)' -k="${k-}${k+ and }not (TestSocketSSL and test_ssl_failure_midway_through_conn)" %pytest -v -rs ${ignore-} -k "${k-}" %pytest -v -rs ${ignore-} -k "${k-}" --integration From 9ef9d7a5d6026d044f6cdd30e7826e3abcf1a7bb Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 12 Sep 2024 11:02:18 -0400 Subject: [PATCH 10/29] Remove a 32-bit workaround (since noarch packages no longer build on i686) --- python-urllib3.spec | 9 --------- 1 file changed, 9 deletions(-) diff --git a/python-urllib3.spec b/python-urllib3.spec index 98d62cb..2da657e 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -190,15 +190,6 @@ export PYTHONPATH="${hypercorndir}:%{buildroot}%{python3_sitelib}" # This test still times out sometimes, especially on certain architectures, # even when we export the CI environment variable to increase timeouts. k="${k-}${k+ and }not (TestHTTPProxyManager and test_tunneling_proxy_request_timeout[https-https])" -%if 0%{?__isa_bits} == 32 -# These fail on i686 and presumably on other 32-bit architectures. Note that -# since the base package is noarch and the package may be assigned to a builder -# of any architecture, there is no guarantee that these tests run at all in a -# particular build. See discussion in -# https://src.fedoraproject.org/rpms/python-urllib3/pull-request/33. -k="${k-}${k+ and }not (TestSSL and test_requesting_large_resources_via_ssl)" -k="${k-}${k+ and }not (TestSocketSSL and test_requesting_large_resources_via_ssl)" -%endif %pytest -v -rs ${ignore-} -k "${k-}" %pytest -v -rs ${ignore-} -k "${k-}" --integration From 14554654df9cbea8dfb1e11e1d2f0809b48bc370 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Thu, 12 Sep 2024 09:42:29 -0400 Subject: [PATCH 11/29] Update to 1.26.20 --- .gitignore | 1 + python-urllib3.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index c53326a..5738ed4 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,4 @@ /urllib3-1.26.17.tar.gz /urllib3-1.26.18.tar.gz /urllib3-1.26.19.tar.gz +/urllib3-1.26.20.tar.gz diff --git a/python-urllib3.spec b/python-urllib3.spec index 7acc053..985f31e 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -9,7 +9,7 @@ %endif Name: python-urllib3 -Version: 1.26.19 +Version: 1.26.20 Release: %autorelease Summary: HTTP library with thread-safe connection pooling, file post, and more diff --git a/sources b/sources index 010dd3d..76d15c4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (urllib3-1.26.19.tar.gz) = 6b72012dbd85434b2441229cbdea2a94583693f904dde349780e1290d581c8a5e10fe00a287a032ed1276349d0078b530f16a133e0f164dcea18105fa3dec79a +SHA512 (urllib3-1.26.20.tar.gz) = 63c4263c5e61adf28344e79b6c864c70e555b715a93e735aca5b6e169f041f3e4518961993c86c83dd13bcb149f7dd77b6e90140cf4aa2310c14fcaa0a52179b From a7b762063216e49c0741bced8d74ecd5f60e600d Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 10 Sep 2024 13:29:43 +0200 Subject: [PATCH 12/29] Add a smoke test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstreamed from rhel's Sanity/smoke Commit hash: a3e2fcfaef1fe4ffa257bdc21d535c9cdc35cafd Only the test file was kept. Co-Authored-By: Braňo Náter --- .fmf/version | 1 + plans.fmf | 4 ++++ tests/smoke/smoke.fmf | 5 +++++ tests/smoke/test.py | 9 +++++++++ 4 files changed, 19 insertions(+) create mode 100644 .fmf/version create mode 100644 plans.fmf create mode 100644 tests/smoke/smoke.fmf create mode 100644 tests/smoke/test.py diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/plans.fmf b/plans.fmf new file mode 100644 index 0000000..2bb6f53 --- /dev/null +++ b/plans.fmf @@ -0,0 +1,4 @@ +discover: + how: fmf +execute: + how: tmt \ No newline at end of file diff --git a/tests/smoke/smoke.fmf b/tests/smoke/smoke.fmf new file mode 100644 index 0000000..69c01da --- /dev/null +++ b/tests/smoke/smoke.fmf @@ -0,0 +1,5 @@ +test: python3 test.py +framework: shell +require: +- python3 +- python3-urllib3 diff --git a/tests/smoke/test.py b/tests/smoke/test.py new file mode 100644 index 0000000..d622ddd --- /dev/null +++ b/tests/smoke/test.py @@ -0,0 +1,9 @@ +import urllib3 + +http = urllib3.PoolManager() +r = http.request('GET', 'http://example.com/') +print('status = {0}'.format(r.status)) +print("headers['server'] = {0}".format(r.headers['server'])) +print(r.data) +if r.status != 200 or not r.data: + raise SystemExit(1) From a2a67038ae31113ded79a3c90bf97f78bc5586d9 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Sun, 11 Aug 2024 16:40:16 -0400 Subject: [PATCH 13/29] Add extras to ELN builds RHEL 10 only ships the core module with no extras, but the extras are needed for other things in EPEL (e.g. python-django). ELN covers both without adding the extras build dependencies so as to not add them to the future RHEL buildroot. These changes allow a single ELN build to serve both ELN and ELN Extras without polluting the ELN buildroot. --- python-urllib3.spec | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/python-urllib3.spec b/python-urllib3.spec index 2da657e..1f3b207 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -1,12 +1,8 @@ # When bootstrapping Python, we cannot test this yet # RHEL does not include the test dependencies and the dependencies for extras -%if 0%{?rhel} -%bcond_with tests -%bcond_with extras -%else -%bcond_without tests -%bcond_without extras -%endif +%bcond tests %{undefined rhel} +%bcond extras %[%{undefined rhel} || %{defined eln}] +%bcond extradeps %{undefined rhel} Name: python-urllib3 Version: 2.2.3 @@ -110,7 +106,7 @@ Requires: ca-certificates BuildRequires: %{py3_dist idna} Requires: %{py3_dist idna} -%if %{with extras} +%if %{with extradeps} # There has historically been a manual hard dependency on python3-pysocks; # since bringing it in is the sole function of python3-urllib3+socks, # we recommend it, so it is installed by default. @@ -152,7 +148,7 @@ sed -i "s/^RECENT_DATE = datetime.date(.*)/RECENT_DATE = datetime.date($recent_d export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}' # Generate BR’s from packaged extras even when tests are disabled, to ensure # the extras metapackages are installable if the build succeeds. -%pyproject_buildrequires %{?with_extras:-x brotli,zstd,socks,h2} +%pyproject_buildrequires %{?with_extradeps:-x brotli,zstd,socks,h2} %build @@ -173,7 +169,7 @@ export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}' # urllib3.contrib.ntlmpool is deprecated and requires ntlm # urllib3.contrib.securetransport is macOS only # urllib3.contrib.pyopenssl requires pyOpenSSL -%{pyproject_check_import %{!?with_extras:-e urllib3.contrib.socks -e urllib3.http2*} +%{pyproject_check_import %{!?with_extradeps:-e urllib3.contrib.socks -e urllib3.http2*} -e urllib3.contrib.emscripten* -e urllib3.contrib.ntlmpool -e urllib3.contrib.securetransport From 38b04c1b212008b13905df9b27de3431f880cbff Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 22 Dec 2024 10:57:48 -0500 Subject: [PATCH 14/29] Update to 2.3.0 (close RHBZ#2333724) --- .gitignore | 1 + python-urllib3.spec | 23 +++++++++-------------- sources | 2 +- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index ce4092a..08d4b37 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,4 @@ /urllib3-2.2.1.tar.gz /urllib3-2.2.2.tar.gz /urllib3-2.2.3.tar.gz +/urllib3-2.3.0.tar.gz diff --git a/python-urllib3.spec b/python-urllib3.spec index 1f3b207..999385c 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -5,7 +5,7 @@ %bcond extradeps %{undefined rhel} Name: python-urllib3 -Version: 2.2.3 +Version: 2.3.0 Release: %autorelease Summary: HTTP library with thread-safe connection pooling, file post, and more @@ -40,31 +40,28 @@ BuildRequires: python3-devel # to manual listing. # h2==4.1.0: also in the h2 extra BuildRequires: %{py3_dist h2} -# coverage==7.4.1: omitted linter/coverage tool +# coverage==7.6.4: omitted linter/coverage tool # PySocks==1.7.1 BuildRequires: %{py3_dist PySocks} # pytest==8.0.2 BuildRequires: %{py3_dist pytest} # pytest-timeout==2.1.0 BuildRequires: %{py3_dist pytest-timeout} -# pyOpenSSL==24.0.0 +# pyOpenSSL==24.2.1 BuildRequires: %{py3_dist pyOpenSSL} # idna==3.7 BuildRequires: %{py3_dist idna} -# # As of v1.1.0, child CA certificates generated by trustme fail -# # verification by CPython 3.13. -# # https://github.com/python-trio/trustme/pull/642 -# trustme @ git+https://github.com/python-trio/trustme@b3a767f336e20600f30c9ff78385a58352ff6ee3 +# trustme==1.2.0 BuildRequires: %{py3_dist trustme} -# cryptography==42.0.4 +# cryptography==43.0.1 BuildRequires: %{py3_dist cryptography} -# backports.zoneinfo==0.2.1;python_version<"3.9" # towncrier==23.6.0: used for generating a changelog -# pytest-memray==1.5.0;python_version<"3.13" and sys_platform!="win32" and +# pytest-memray==1.5.0;python_version<"3.14" and sys_platform!="win32" and # implementation_name=="cpython": not packaged, unwanted profiler -# trio==0.25.0 +# trio==0.26.2 BuildRequires: %{py3_dist trio} -# Quart==0.19.4 +# # https://github.com/pallets/quart/pull/369 +# Quart @ git+https://github.com/pallets/quart@67110bf383d8973bce1619e957b4b6ea088ad9f2 BuildRequires: %{py3_dist Quart} # quart-trio==0.11.1 BuildRequires: %{py3_dist quart-trio} @@ -76,8 +73,6 @@ BuildRequires: %{py3_dist quart-trio} # httpx==0.25.2 BuildRequires: %{py3_dist httpx} # pytest-socket==0.7.0: not packaged, not strictly required -# cffi==1.17.0rc1 -BuildRequires: %{py3_dist cffi} %endif %global _description %{expand: diff --git a/sources b/sources index 3d19dd9..6c51285 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (urllib3-2.2.3.tar.gz) = 5082c87d9692864ff0b30817f846c5d4ff298d2007085bc619431551183d6c0c6c25464be1777763890257c2f55801698b83378fbf956c663f495e96f6d1e837 +SHA512 (urllib3-2.3.0.tar.gz) = 7b4b8732f4a4cddb8a6f6854d21febcbecba0762bff65d2291d95d1f54a972c3168f8d7ca1786edfb5c0a0c955cf3812ff6fe1b7925973d3fe31077fbfbdc39c SHA512 (hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz) = 62d6787d88a2e716f0ac04fc49f6cdc586e473a660ee754ff66961922ae78bcc75d1f78b091e78557dd60f006e8e480114738c7b4ff71beac804e4fc9603240b From 461062088404da5eb767af673d53e8a4964f658c Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 18 Jan 2025 20:28:39 +0000 Subject: [PATCH 15/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From b8b7567aeecca104ae526e92800fa1de0fee1758 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 15 Apr 2025 07:50:41 -0400 Subject: [PATCH 16/29] =?UTF-8?q?In=20the=20CI=20smoke=20test,=20do=20not?= =?UTF-8?q?=20check=20for=20a=20=E2=80=98server=E2=80=99=20header?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It no longer seems to be present, and this particular header was not the point of the test. --- tests/smoke/test.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/smoke/test.py b/tests/smoke/test.py index d622ddd..9ac5805 100644 --- a/tests/smoke/test.py +++ b/tests/smoke/test.py @@ -3,7 +3,6 @@ import urllib3 http = urllib3.PoolManager() r = http.request('GET', 'http://example.com/') print('status = {0}'.format(r.status)) -print("headers['server'] = {0}".format(r.headers['server'])) print(r.data) if r.status != 200 or not r.data: raise SystemExit(1) From 85033d9c3d0b4fdaedf1b6351868fe5f92416fc4 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sat, 12 Apr 2025 07:35:04 -0400 Subject: [PATCH 17/29] Update to 2.4.0 (close RHBZ#2358892) --- .gitignore | 1 + python-urllib3.spec | 81 +++++++++++++++++++++------------------------ sources | 2 +- 3 files changed, 39 insertions(+), 45 deletions(-) diff --git a/.gitignore b/.gitignore index 08d4b37..f08b3a1 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,4 @@ /urllib3-2.2.2.tar.gz /urllib3-2.2.3.tar.gz /urllib3-2.3.0.tar.gz +/urllib3-2.4.0.tar.gz diff --git a/python-urllib3.spec b/python-urllib3.spec index 999385c..d0dba77 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -5,7 +5,7 @@ %bcond extradeps %{undefined rhel} Name: python-urllib3 -Version: 2.3.0 +Version: 2.4.0 Release: %autorelease Summary: HTTP library with thread-safe connection pooling, file post, and more @@ -20,9 +20,10 @@ Source0: %{url}/archive/%{version}/urllib3-%{version}.tar.gz # Upstream would like to get the necessary changes merged into Hypercorn, but # explained clearly why the forked copy is needed for now. # -# Note that dev-requirements.txt references the urllib3-changes branch of -# https://github.com/urllib3/hypercorn/, and we should use the latest commit -# from that branch, but we package using a commit hash for reproducibility. +# Note that tool.uv.sources.hypercorn in pyproject.toml references the +# urllib3-changes branch of https://github.com/urllib3/hypercorn/, and we +# should use the latest commit from that branch, but we package using a commit +# hash for reproducibility. # # We do not need to treat this as a bundled dependency because it is not # installed in the buildroot or otherwise included in any of the binary RPMs. @@ -33,46 +34,10 @@ Source1: %{hypercorn_url}/archive/%{hypercorn_commit}/hypercorn-%{hyperco BuildArch: noarch BuildRequires: python3-devel - +# The conditional is important: we benefit from tomcli for editing dependency +# groups, but we do not want it when bootstrapping or in RHEL. %if %{with tests} -# Test dependencies are listed only in dev-requirements.txt. Because there are -# linters and coverage tools mixed in, and exact versions are pinned, we resort -# to manual listing. -# h2==4.1.0: also in the h2 extra -BuildRequires: %{py3_dist h2} -# coverage==7.6.4: omitted linter/coverage tool -# PySocks==1.7.1 -BuildRequires: %{py3_dist PySocks} -# pytest==8.0.2 -BuildRequires: %{py3_dist pytest} -# pytest-timeout==2.1.0 -BuildRequires: %{py3_dist pytest-timeout} -# pyOpenSSL==24.2.1 -BuildRequires: %{py3_dist pyOpenSSL} -# idna==3.7 -BuildRequires: %{py3_dist idna} -# trustme==1.2.0 -BuildRequires: %{py3_dist trustme} -# cryptography==43.0.1 -BuildRequires: %{py3_dist cryptography} -# towncrier==23.6.0: used for generating a changelog -# pytest-memray==1.5.0;python_version<"3.14" and sys_platform!="win32" and -# implementation_name=="cpython": not packaged, unwanted profiler -# trio==0.26.2 -BuildRequires: %{py3_dist trio} -# # https://github.com/pallets/quart/pull/369 -# Quart @ git+https://github.com/pallets/quart@67110bf383d8973bce1619e957b4b6ea088ad9f2 -BuildRequires: %{py3_dist Quart} -# quart-trio==0.11.1 -BuildRequires: %{py3_dist quart-trio} -# # https://github.com/pgjones/hypercorn/issues/62 -# # https://github.com/pgjones/hypercorn/issues/168 -# # https://github.com/pgjones/hypercorn/issues/169 -# hypercorn @ git+https://github.com/urllib3/hypercorn@urllib3-changes -# hypercorn is packaged, but we need the forked/bundled version -# httpx==0.25.2 -BuildRequires: %{py3_dist httpx} -# pytest-socket==0.7.0: not packaged, not strictly required +BuildRequires: tomcli %endif %global _description %{expand: @@ -138,12 +103,40 @@ Recommends: python3-urllib3+socks recent_date=$(date --date "7 month ago" +"%Y, %_m, %_d") sed -i "s/^RECENT_DATE = datetime.date(.*)/RECENT_DATE = datetime.date($recent_date)/" src/urllib3/connection.py +%if %{with tests} +# Possible improvements to dependency groups +# https://github.com/urllib3/urllib3/issues/3594 +# Adjust the contents of the "dev" dependency group by removing: +remove_from_dev() { + tomcli set pyproject.toml lists delitem 'dependency-groups.dev' "($1)\b.*" +} +# - Linters, coverage tools, profilers, etc.: +# https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters +remove_from_dev 'coverage|pytest-memray' +# - Dependencies for maintainer tasks +remove_from_dev 'build|towncrier' +# - Dependencies that are not packaged and not strictly required +remove_from_dev 'pytest-socket' +# - Hypercorn, because we have a special forked version we must use for +# testing instead, so we do not want to generate a dependency on the system +# copy. Note that the system copy is still an indirect dependency via quart +# and quart-trio. +remove_from_dev 'hypercorn' + +# Remove all version bounds for test dependencies. We must attempt to make do +# with what we have. (This also removes any python version or platform +# constraints, which is currently fine, but could theoretically cause trouble +# in the future. We’ll cross that bridge if we ever arrive at it.) +tomcli set pyproject.toml lists replace --type regex_search \ + 'dependency-groups.dev' '[>=]=.*' '' +%endif + %generate_buildrequires export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}' # Generate BR’s from packaged extras even when tests are disabled, to ensure # the extras metapackages are installable if the build succeeds. -%pyproject_buildrequires %{?with_extradeps:-x brotli,zstd,socks,h2} +%pyproject_buildrequires %{?with_extradeps:-x brotli,zstd,socks,h2} %{?with_tests:-g dev} %build diff --git a/sources b/sources index 6c51285..2812134 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (urllib3-2.3.0.tar.gz) = 7b4b8732f4a4cddb8a6f6854d21febcbecba0762bff65d2291d95d1f54a972c3168f8d7ca1786edfb5c0a0c955cf3812ff6fe1b7925973d3fe31077fbfbdc39c +SHA512 (urllib3-2.4.0.tar.gz) = 78afd6daea5594381783cae2cc3efbfcc89455da7f86994a17bd86c3c840d2e304fd3b744e8c0789cbbe6704502ef03a1bbaaadd2b1713b084adb250cfdffb9f SHA512 (hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz) = 62d6787d88a2e716f0ac04fc49f6cdc586e473a660ee754ff66961922ae78bcc75d1f78b091e78557dd60f006e8e480114738c7b4ff71beac804e4fc9603240b From e2a4d0479834d85eaeceb7ecc263f3369b9ed2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Thu, 29 May 2025 11:46:29 +0200 Subject: [PATCH 18/29] Unpin hatch-vcs version --- python-urllib3.spec | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python-urllib3.spec b/python-urllib3.spec index d0dba77..1f8532b 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -85,6 +85,10 @@ Recommends: python3-urllib3+socks %autosetup -n urllib3-%{version} %setup -q -n urllib3-%{version} -T -D -b 1 +# Unpin hatch-vcs version +# See https://github.com/urllib3/urllib3/issues/3612 +sed -i 's/hatch-vcs==/hatch-vcs>=/' pyproject.toml + # Make sure that the RECENT_DATE value doesn't get too far behind what the current date is. # RECENT_DATE must not be older that 2 years from the build time, or else test_recent_date # (from test/test_connection.py) would fail. However, it shouldn't be to close to the build time either, From da087985d09435caf96c61f2f9a26a7845159e9e Mon Sep 17 00:00:00 2001 From: Python Maint Date: Tue, 3 Jun 2025 09:58:05 +0200 Subject: [PATCH 19/29] Bootstrap for Python 3.14 --- python-urllib3.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-urllib3.spec b/python-urllib3.spec index 1f8532b..a65a8af 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -1,3 +1,5 @@ +%global _without_extradeps 1 +%global _without_tests 1 # When bootstrapping Python, we cannot test this yet # RHEL does not include the test dependencies and the dependencies for extras %bcond tests %{undefined rhel} From 50a131c01cecedd5ad415b51ad64183293236c7f Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 13 Jun 2025 08:13:47 -0400 Subject: [PATCH 20/29] Non-bootstrap build for Python 3.14 --- python-urllib3.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/python-urllib3.spec b/python-urllib3.spec index a65a8af..1f8532b 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -1,5 +1,3 @@ -%global _without_extradeps 1 -%global _without_tests 1 # When bootstrapping Python, we cannot test this yet # RHEL does not include the test dependencies and the dependencies for extras %bcond tests %{undefined rhel} From 30af009037c3510c9f30a7b0c78061aba3e6480b Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 25 Jul 2025 10:59:26 +0000 Subject: [PATCH 21/29] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild From e5f7f4eaa8f27aecfebf26af53bb5500cb7755bf Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Thu, 7 Aug 2025 16:09:56 +0200 Subject: [PATCH 22/29] Update to 2.5.0 (rhbz#2375401) --- .gitignore | 1 + python-urllib3.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index f08b3a1..cbe6feb 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ /urllib3-2.2.3.tar.gz /urllib3-2.3.0.tar.gz /urllib3-2.4.0.tar.gz +/urllib3-2.5.0.tar.gz diff --git a/python-urllib3.spec b/python-urllib3.spec index 1f8532b..d56aabc 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -5,7 +5,7 @@ %bcond extradeps %{undefined rhel} Name: python-urllib3 -Version: 2.4.0 +Version: 2.5.0 Release: %autorelease Summary: HTTP library with thread-safe connection pooling, file post, and more diff --git a/sources b/sources index 2812134..c289b5f 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (urllib3-2.4.0.tar.gz) = 78afd6daea5594381783cae2cc3efbfcc89455da7f86994a17bd86c3c840d2e304fd3b744e8c0789cbbe6704502ef03a1bbaaadd2b1713b084adb250cfdffb9f +SHA512 (urllib3-2.5.0.tar.gz) = 492ebb3e0481ee5433f45bef184ddb01714dedcbe2eb61665c781f3dcd0d9a226204052d64215c02e8972155560bc146395022723f79c076cb59abe1c0ef51ff SHA512 (hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz) = 62d6787d88a2e716f0ac04fc49f6cdc586e473a660ee754ff66961922ae78bcc75d1f78b091e78557dd60f006e8e480114738c7b4ff71beac804e4fc9603240b From 53699eb0701d033a32eddf1643c63303c13942b1 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 15 Aug 2025 15:06:11 +0200 Subject: [PATCH 23/29] Rebuilt for Python 3.14.0rc2 bytecode From b97cc1ac48029944152d8227cd8a0476a5014fc0 Mon Sep 17 00:00:00 2001 From: Python Maint Date: Fri, 19 Sep 2025 14:42:14 +0200 Subject: [PATCH 24/29] Rebuilt for Python 3.14.0rc3 bytecode From 9b878192d61ca16c137dc73e869f255df013da44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Mon, 8 Dec 2025 12:37:59 +0100 Subject: [PATCH 25/29] Allow building with setuptools_scm 9 --- python-urllib3.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-urllib3.spec b/python-urllib3.spec index d56aabc..7d4d9ba 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -88,6 +88,8 @@ Recommends: python3-urllib3+socks # Unpin hatch-vcs version # See https://github.com/urllib3/urllib3/issues/3612 sed -i 's/hatch-vcs==/hatch-vcs>=/' pyproject.toml +# Allow setuptools_scm 9, https://github.com/urllib3/urllib3/commit/1ce1b59ec6 +sed -i 's/setuptools-scm>=8,<9/setuptools-scm>=8,<10/' pyproject.toml # Make sure that the RECENT_DATE value doesn't get too far behind what the current date is. # RECENT_DATE must not be older that 2 years from the build time, or else test_recent_date From 5baec5bbecb9d967237ff5c28d36298997feeb8a Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Mon, 8 Dec 2025 11:12:58 +0000 Subject: [PATCH 26/29] Update to 2.6.1 (close RHBZ#2419408) - Fixes CVE-2025-66471 / GHSA-2xpw-w6gg-jr37 - Fixes CVE-2025-66418 / GHSA-gm62-xv2j-4w53 --- .gitignore | 2 ++ python-urllib3.spec | 8 +------- sources | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index cbe6feb..12cf6b3 100644 --- a/.gitignore +++ b/.gitignore @@ -51,3 +51,5 @@ /urllib3-2.3.0.tar.gz /urllib3-2.4.0.tar.gz /urllib3-2.5.0.tar.gz +/urllib3-2.6.0.tar.gz +/urllib3-2.6.1.tar.gz diff --git a/python-urllib3.spec b/python-urllib3.spec index 7d4d9ba..17659fd 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -5,7 +5,7 @@ %bcond extradeps %{undefined rhel} Name: python-urllib3 -Version: 2.5.0 +Version: 2.6.1 Release: %autorelease Summary: HTTP library with thread-safe connection pooling, file post, and more @@ -85,12 +85,6 @@ Recommends: python3-urllib3+socks %autosetup -n urllib3-%{version} %setup -q -n urllib3-%{version} -T -D -b 1 -# Unpin hatch-vcs version -# See https://github.com/urllib3/urllib3/issues/3612 -sed -i 's/hatch-vcs==/hatch-vcs>=/' pyproject.toml -# Allow setuptools_scm 9, https://github.com/urllib3/urllib3/commit/1ce1b59ec6 -sed -i 's/setuptools-scm>=8,<9/setuptools-scm>=8,<10/' pyproject.toml - # Make sure that the RECENT_DATE value doesn't get too far behind what the current date is. # RECENT_DATE must not be older that 2 years from the build time, or else test_recent_date # (from test/test_connection.py) would fail. However, it shouldn't be to close to the build time either, diff --git a/sources b/sources index c289b5f..ecf4691 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (urllib3-2.5.0.tar.gz) = 492ebb3e0481ee5433f45bef184ddb01714dedcbe2eb61665c781f3dcd0d9a226204052d64215c02e8972155560bc146395022723f79c076cb59abe1c0ef51ff +SHA512 (urllib3-2.6.1.tar.gz) = a5935e42cfa843688f68e2c71de3eff4c505907bd155f41a6f3406000cfaa060db0184a18448e269192c3f69861f5630a112fe207874da45bf475bebbdeb2b83 SHA512 (hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz) = 62d6787d88a2e716f0ac04fc49f6cdc586e473a660ee754ff66961922ae78bcc75d1f78b091e78557dd60f006e8e480114738c7b4ff71beac804e4fc9603240b From 994f0a13b1a5689dd47975ada30224d3cecdea3d Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Fri, 12 Dec 2025 06:59:19 +0000 Subject: [PATCH 27/29] Update to 2.6.2 (close RHBZ#2421420) --- .gitignore | 1 + python-urllib3.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 12cf6b3..bd674b9 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ /urllib3-2.5.0.tar.gz /urllib3-2.6.0.tar.gz /urllib3-2.6.1.tar.gz +/urllib3-2.6.2.tar.gz diff --git a/python-urllib3.spec b/python-urllib3.spec index 17659fd..7b2af84 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -5,7 +5,7 @@ %bcond extradeps %{undefined rhel} Name: python-urllib3 -Version: 2.6.1 +Version: 2.6.2 Release: %autorelease Summary: HTTP library with thread-safe connection pooling, file post, and more diff --git a/sources b/sources index ecf4691..a84bd3c 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (urllib3-2.6.1.tar.gz) = a5935e42cfa843688f68e2c71de3eff4c505907bd155f41a6f3406000cfaa060db0184a18448e269192c3f69861f5630a112fe207874da45bf475bebbdeb2b83 +SHA512 (urllib3-2.6.2.tar.gz) = 7d2167924922f27cd618bb3f8b56a3c4c6a49254ec5ee7ee48aba6d39cd924e40c58db9b759b0a41ac676f7273b56fe8978d6e20b798ff9b8c8c745c74cf9a15 SHA512 (hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz) = 62d6787d88a2e716f0ac04fc49f6cdc586e473a660ee754ff66961922ae78bcc75d1f78b091e78557dd60f006e8e480114738c7b4ff71beac804e4fc9603240b From 78aa0cc35e74f25a92ba0538c60af2eef0c771db Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 7 Jan 2026 23:24:55 +0000 Subject: [PATCH 28/29] Update .rpmlintrc file [skip changelog] --- python-urllib3.rpmlintrc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/python-urllib3.rpmlintrc b/python-urllib3.rpmlintrc index 0b83833..e9bd352 100644 --- a/python-urllib3.rpmlintrc +++ b/python-urllib3.rpmlintrc @@ -1,6 +1 @@ -# It is normal that extras metapackages should not have documentation, or any -# files at all. -addFilter(r"\+\w+\.\w+: W: no-documentation") -# Not real spelling errors -addFilter(r"spelling-error \('([Mm]etapackage)s?',") addFilter(r"spelling-error \('(gzip|brotli|zstd)',") From cd3e490d533b1b4c3aaea5cddbc7aec5e0e82fb0 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 7 Jan 2026 23:19:39 +0000 Subject: [PATCH 29/29] Update to 2.6.3 (close RHBZ#2427603) --- .gitignore | 1 + python-urllib3.spec | 2 +- sources | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index bd674b9..e3fee0e 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,4 @@ /urllib3-2.6.0.tar.gz /urllib3-2.6.1.tar.gz /urllib3-2.6.2.tar.gz +/urllib3-2.6.3.tar.gz diff --git a/python-urllib3.spec b/python-urllib3.spec index 7b2af84..5b863bf 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -5,7 +5,7 @@ %bcond extradeps %{undefined rhel} Name: python-urllib3 -Version: 2.6.2 +Version: 2.6.3 Release: %autorelease Summary: HTTP library with thread-safe connection pooling, file post, and more diff --git a/sources b/sources index a84bd3c..d7b27ef 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (urllib3-2.6.2.tar.gz) = 7d2167924922f27cd618bb3f8b56a3c4c6a49254ec5ee7ee48aba6d39cd924e40c58db9b759b0a41ac676f7273b56fe8978d6e20b798ff9b8c8c745c74cf9a15 +SHA512 (urllib3-2.6.3.tar.gz) = 554cedfd97d411fffa9a8ba46f592eab9e58c5fa8822ecd5a73ab45d6adfc188a6b9c4e238d02a4fbd3a1067a25a1de841a33d398d0641e22a32ea414876b615 SHA512 (hypercorn-d1719f8c1570cbd8e6a3719ffdb14a4d72880abb.tar.gz) = 62d6787d88a2e716f0ac04fc49f6cdc586e473a660ee754ff66961922ae78bcc75d1f78b091e78557dd60f006e8e480114738c7b4ff71beac804e4fc9603240b