Skip to content

Commit c01f448

Browse files
committed
Accomodate the test to the changed behavior of SSLContext.shared_ciphers() in CPython
See: python/cpython#96931 Fixes: rhbz#2203773
1 parent 2c7ece9 commit c01f448

2 files changed

Lines changed: 38 additions & 1 deletion

File tree

‎4855d71.patch‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From 4855d71ad5535bdff47a0dc5cfe09fb610ff6576 Mon Sep 17 00:00:00 2001
2+
From: Thomas Grainger <tagrain@gmail.com>
3+
Date: Sat, 15 Apr 2023 20:41:24 +0100
4+
Subject: [PATCH] Fix test_ssl_object_attributes
5+
6+
Co-authored-by: Seth Michael Larson <sethmichaellarson@gmail.com>
7+
---
8+
test/test_ssltransport.py | 7 +++++--
9+
1 file changed, 5 insertions(+), 2 deletions(-)
10+
11+
diff --git a/test/test_ssltransport.py b/test/test_ssltransport.py
12+
index a3b7381639..cace51db96 100644
13+
--- a/test/test_ssltransport.py
14+
+++ b/test/test_ssltransport.py
15+
@@ -229,8 +229,11 @@ def test_ssl_object_attributes(self) -> None:
16+
assert ssock.selected_npn_protocol() is None
17+
18+
shared_ciphers = ssock.shared_ciphers()
19+
- assert type(shared_ciphers) == list
20+
- assert len(shared_ciphers) > 0
21+
+ # SSLContext.shared_ciphers() changed behavior completely in a patch version.
22+
+ # See: https://github.com/python/cpython/issues/96931
23+
+ assert shared_ciphers is None or (
24+
+ type(shared_ciphers) is list and len(shared_ciphers) > 0
25+
+ )
26+
27+
assert ssock.compression() is None
28+

‎python-urllib3.spec‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@
55

66
Name: python-%{srcname}
77
Version: 1.26.12
8-
Release: 2%{?dist}
8+
Release: 3%{?dist}
99
Summary: Python HTTP library with thread-safe connection pooling and file post
1010

1111
License: MIT
1212
URL: https://github.com/urllib3/urllib3
1313
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
14+
15+
# Accomodate the test to the changed behavior of SSLContext.shared_ciphers() in CPython
16+
# See: https://github.com/python/cpython/issues/96931
17+
Patch: https://github.com/urllib3/urllib3/commit/4855d71.patch
18+
1419
BuildArch: noarch
1520

1621
%description
@@ -113,6 +118,10 @@ ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.pyc \
113118

114119

115120
%changelog
121+
* Tue May 16 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 1.26.12-3
122+
- Accomodate the test to the changed behavior of SSLContext.shared_ciphers() in CPython
123+
- Fixes: rhbz#2203773
124+
116125
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.26.12-2
117126
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
118127

0 commit comments

Comments
 (0)