diff --git a/4855d71.patch b/4855d71.patch new file mode 100644 index 0000000..22945ff --- /dev/null +++ b/4855d71.patch @@ -0,0 +1,28 @@ +From 4855d71ad5535bdff47a0dc5cfe09fb610ff6576 Mon Sep 17 00:00:00 2001 +From: Thomas Grainger +Date: Sat, 15 Apr 2023 20:41:24 +0100 +Subject: [PATCH] Fix test_ssl_object_attributes + +Co-authored-by: Seth Michael Larson +--- + 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 a3b7381639..cace51db96 100644 +--- a/test/test_ssltransport.py ++++ b/test/test_ssltransport.py +@@ -229,8 +229,11 @@ def test_ssl_object_attributes(self) -> None: + 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 + diff --git a/python-urllib3.spec b/python-urllib3.spec index 29da836..2fc5a82 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -5,12 +5,17 @@ Name: python-%{srcname} Version: 1.26.12 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Python HTTP library with thread-safe connection pooling and file post License: MIT URL: https://github.com/urllib3/urllib3 Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz + +# Accomodate the test to the changed behavior of SSLContext.shared_ciphers() in CPython +# See: https://github.com/python/cpython/issues/96931 +Patch: https://github.com/urllib3/urllib3/commit/4855d71.patch + BuildArch: noarch %description @@ -113,6 +118,10 @@ ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.pyc \ %changelog +* Tue May 16 2023 Tomáš Hrnčiar - 1.26.12-3 +- Accomodate the test to the changed behavior of SSLContext.shared_ciphers() in CPython +- Fixes: rhbz#2203773 + * Fri Jan 20 2023 Fedora Release Engineering - 1.26.12-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild