Don't inject pyopenssl into urllib3 (rhbz 1567862)

Signed-off-by: Jeremy Cline <jeremy@jcline.org>
This commit is contained in:
Jeremy Cline 2018-04-16 10:40:45 -04:00
parent 87c6858d16
commit 26f526b44e
No known key found for this signature in database
GPG Key ID: 9223308FA9B246DB
2 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,34 @@
From 86b1fa39fdebdb7bc57131c1a198d4d18e104f95 Mon Sep 17 00:00:00 2001
From: Jeremy Cline <jeremy@jcline.org>
Date: Mon, 16 Apr 2018 10:35:35 -0400
Subject: [PATCH] Don't inject pyopenssl into urllib3
Fedora ships sufficiently new versions of Python 2 and 3 to make this
unnecessary (rhbz 1567862)
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
---
requests/__init__.py | 7 -------
1 file changed, 7 deletions(-)
diff --git a/requests/__init__.py b/requests/__init__.py
index 268e7dcc..45b2c679 100644
--- a/requests/__init__.py
+++ b/requests/__init__.py
@@ -79,13 +79,6 @@ except (AssertionError, ValueError):
"version!".format(urllib3.__version__, chardet.__version__),
RequestsDependencyWarning)
-# Attempt to enable urllib3's SNI support, if possible
-try:
- from urllib3.contrib import pyopenssl
- pyopenssl.inject_into_urllib3()
-except ImportError:
- pass
-
# urllib3's DependencyWarnings should be silenced.
from urllib3.exceptions import DependencyWarning
warnings.simplefilter('ignore', DependencyWarning)
--
2.17.0

View File

@ -9,7 +9,7 @@
Name: python-requests
Version: 2.18.4
Release: 3%{?dist}
Release: 4%{?dist}
Summary: HTTP library, written in Python, for human beings
License: ASL 2.0
@ -37,6 +37,9 @@ Patch2: Remove-tests-that-use-the-tarpit.patch
# a pretty odd one so this is a niche requirement.
Patch3: requests-2.12.4-tests_nonet.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=1567862
Patch4: Don-t-inject-pyopenssl-into-urllib3.patch
BuildArch: noarch
%description
@ -166,6 +169,9 @@ popd
%endif
%changelog
* Mon Apr 16 2018 Jeremy Cline <jeremy@jcline.org> - 2.18.4-4
- Stop injecting PyOpenSSL (rhbz 1567862)
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.18.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild