diff --git a/backport-fix-test_ssl_object_attributes.patch b/backport-fix-test_ssl_object_attributes.patch new file mode 100644 index 0000000000000000000000000000000000000000..0b0acf5c5ef203ae5409f7335e8329c7a6c5d1d6 --- /dev/null +++ b/backport-fix-test_ssl_object_attributes.patch @@ -0,0 +1,33 @@ +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/python-urllib3.spec b/python-urllib3.spec index 1e9ec0bec49fdce2c57c382c4999d7983ea75a7b..b868ab4afa2b08a4cb1d408cd273a205741f8235 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -3,7 +3,7 @@ Name: python-%{srcname} Version: 1.26.12 -Release: 4 +Release: 5 Summary: Sanity-friendly HTTP client for Python License: MIT URL: https://urllib3.readthedocs.io @@ -17,6 +17,7 @@ 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 @@ -82,6 +83,12 @@ PYTHONPATH=%{buildroot}%{python3_sitelib}:%{python3_sitelib} %{__python3} -m pyt %{python3_sitelib}/urllib3-*.egg-info %changelog +* Tue Jul 25 2023 chengyechun - 1.26.12-5 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix test_ssl_object_attributes + * Tue Mar 21 2023 chenhaixing - 1.26.12-4 - Type:bugfix - CVE:NA