Update to 2.24.0

Remove no longer needed patches:

  Don-t-inject-pyopenssl-into-urllib3.patch:
    https://github.com/psf/requests/issues/5443

  requests-2.20.0-no-py2-httpbin.patch:
    python2-requests is no more anyway
This commit is contained in:
Miro Hrončok 2020-07-10 23:49:14 +02:00
parent f176dee1d6
commit 72789402b3
5 changed files with 8 additions and 81 deletions

1
.gitignore vendored
View File

@ -43,3 +43,4 @@
/requests-v2.21.0.tar.gz
/requests-v2.22.0.tar.gz
/requests-v2.23.0.tar.gz
/requests-v2.24.0.tar.gz

View File

@ -1,38 +0,0 @@
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 a5b3c9c3..e312d314 100644
--- a/requests/__init__.py
+++ b/requests/__init__.py
@@ -90,17 +90,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()
-
- # Check cryptography version
- from cryptography import __version__ as cryptography_version
- _check_cryptography(cryptography_version)
-except ImportError:
- pass
-
# urllib3's DependencyWarnings should be silenced.
from urllib3.exceptions import DependencyWarning
warnings.simplefilter('ignore', DependencyWarning)
--
2.17.0

View File

@ -9,8 +9,8 @@
Name: python-requests
Version: 2.23.0
Release: 5%{?dist}
Version: 2.24.0
Release: 1%{?dist}
Summary: HTTP library, written in Python, for human beings
License: ASL 2.0
@ -30,12 +30,6 @@ 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
# https://bugzilla.redhat.com/show_bug.cgi?id=1653223
Patch5: requests-2.20.0-no-py2-httpbin.patch
BuildArch: noarch
%description
@ -108,6 +102,10 @@ sed -i 's/ --doctest-modules//' pytest.ini
%changelog
* Fri Jul 10 2020 Miro Hrončok <mhroncok@redhat.com> - 2.24.0-1
- Update to 2.24.0
- Resolves rhbz#1848104
* Fri Jul 10 2020 Miro Hrončok <mhroncok@redhat.com> - 2.23.0-5
- Add requests[security] and requests[socks] subpackages

View File

@ -1,34 +0,0 @@
diff --git a/tests/conftest.py b/tests/conftest.py
index cd64a76..1d5ddbb 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -14,11 +14,23 @@ def prepare_url(value):
return inner
-@pytest.fixture
-def httpbin(httpbin):
- return prepare_url(httpbin)
+import sys
+if sys.version_info[0] < 3:
+ @pytest.fixture
+ def httpbin():
+ pytest.skip('No httpbin for Python 2')
-@pytest.fixture
-def httpbin_secure(httpbin_secure):
- return prepare_url(httpbin_secure)
+ @pytest.fixture
+ def httpbin_secure():
+ pytest.skip('No httpbin for Python 2')
+
+else:
+ @pytest.fixture
+ def httpbin(httpbin):
+ return prepare_url(httpbin)
+
+
+ @pytest.fixture
+ def httpbin_secure(httpbin_secure):
+ return prepare_url(httpbin_secure)

View File

@ -1 +1 @@
SHA512 (requests-v2.23.0.tar.gz) = a8e670d928fce3531629a6d73ee6b47882f3eba47684841bfce44376781b2b9c5c97186e1750ee582b0c11fa67c983f340f95eb2a4f19042f4cbc77ae090a69c
SHA512 (requests-v2.24.0.tar.gz) = a7ce3775f1f38a98cf6ae445637a46cf27f903fc8aa3f535bac5032d628f1661cbfb10cb1e6bc60e703a9216cc46adcb903dfb8b7a2ff8a8f4f1442d9f2229f1