update package to 2.24.0
This commit is contained in:
parent
3096b464de
commit
344e5f6b55
@ -1,35 +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
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
@ -1,4 +1,4 @@
|
|||||||
From 524cd22fb77e69db9bb3f017bbb1d9782c37b0cd Mon Sep 17 00:00:00 2001
|
From bb1c91432c5e9a1f402692db5c80c65136656afb Mon Sep 17 00:00:00 2001
|
||||||
From: Jeremy Cline <jeremy@jcline.org>
|
From: Jeremy Cline <jeremy@jcline.org>
|
||||||
Date: Tue, 13 Jun 2017 09:08:09 -0400
|
Date: Tue, 13 Jun 2017 09:08:09 -0400
|
||||||
Subject: [PATCH] Remove tests that use the tarpit
|
Subject: [PATCH] Remove tests that use the tarpit
|
||||||
@ -11,14 +11,10 @@ they are never responded to.
|
|||||||
|
|
||||||
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
|
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
|
||||||
---
|
---
|
||||||
tests/test_requests.py | 25 -------------------------
|
diff -Naur requests-2.24.0/tests/test_requests.py requests-2/tests/test_requests.py
|
||||||
1 file changed, 25 deletions(-)
|
--- requests-2.24.0/tests/test_requests.py 2020-08-04 18:05:14.250000000 +0800
|
||||||
|
+++ requests-2/tests/test_requests.py 2020-08-04 18:13:19.891000000 +0800
|
||||||
diff --git a/tests/test_requests.py b/tests/test_requests.py
|
@@ -2188,30 +2188,6 @@
|
||||||
index b8350cb..46b7e9e 100755
|
|
||||||
--- a/tests/test_requests.py
|
|
||||||
+++ b/tests/test_requests.py
|
|
||||||
@@ -2049,31 +2049,6 @@ class TestTimeout:
|
|
||||||
except ReadTimeout:
|
except ReadTimeout:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@ -46,10 +42,7 @@ index b8350cb..46b7e9e 100755
|
|||||||
- pytest.fail('The connect() request should time out.')
|
- pytest.fail('The connect() request should time out.')
|
||||||
- except ConnectTimeout:
|
- except ConnectTimeout:
|
||||||
- pass
|
- pass
|
||||||
-
|
|
||||||
def test_encoded_methods(self, httpbin):
|
def test_encoded_methods(self, httpbin):
|
||||||
"""See: https://github.com/requests/requests/issues/2316"""
|
"""See: https://github.com/psf/requests/issues/2316"""
|
||||||
r = requests.request(b'GET', httpbin('get'))
|
|
||||||
--
|
|
||||||
2.9.4
|
|
||||||
|
|
||||||
|
|||||||
@ -1,25 +1,35 @@
|
|||||||
diff -uNrp a/requests/certs.py b/requests/certs.py
|
From aad5590d5ea47dc54cfd97da54f2640014f7d39d Mon Sep 17 00:00:00 2001
|
||||||
--- a/requests/certs.py 2019-12-20 15:17:38.304000000 +0800
|
From: Jeremy Cline <jcline@redhat.com>
|
||||||
+++ b/requests/certs.py 2019-12-20 15:25:18.952000000 +0800
|
Date: Thu, 13 Dec 2018 10:55:29 -0500
|
||||||
@@ -11,7 +11,10 @@ If you are packaging Requests, e.g., for
|
Subject: [PATCH] Patch requests/certs.py to use the system CA bundle
|
||||||
|
|
||||||
|
Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
||||||
|
---
|
||||||
|
diff -Naur requests-2.24.0/requests/certs.py requests-1/requests/certs.py
|
||||||
|
--- requests-2.24.0/requests/certs.py 2020-08-04 18:05:14.250000000 +0800
|
||||||
|
+++ requests-1/requests/certs.py 2020-08-04 18:07:20.652000000 +0800
|
||||||
|
@@ -10,8 +10,13 @@
|
||||||
|
If you are packaging Requests, e.g., for a Linux distribution or a managed
|
||||||
environment, you can change the definition of where() to return a separately
|
environment, you can change the definition of where() to return a separately
|
||||||
packaged CA bundle.
|
packaged CA bundle.
|
||||||
|
+
|
||||||
|
+This Fedora-patched package returns "/etc/pki/tls/certs/ca-bundle.crt" provided
|
||||||
|
+by the ca-certificates RPM package.
|
||||||
"""
|
"""
|
||||||
-from certifi import where
|
-from certifi import where
|
||||||
+def where():
|
+def where():
|
||||||
+ """Return the absolute path to the system CA bundle."""
|
+ """Return the absolute path to the system CA bundle."""
|
||||||
+ return '/etc/pki/tls/certs/ca-bundle.crt'
|
+ return '/etc/pki/tls/certs/ca-bundle.crt'
|
||||||
+
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
print(where())
|
print(where())
|
||||||
diff -uNrp a/setup.py b/setup.py
|
diff -Naur requests-2.24.0/setup.py requests-1/setup.py
|
||||||
--- a/setup.py 2019-12-20 15:17:38.304000000 +0800
|
--- requests-2.24.0/setup.py 2020-08-04 18:05:14.250000000 +0800
|
||||||
+++ b/setup.py 2019-12-20 15:14:39.212000000 +0800
|
+++ requests-1/setup.py 2020-08-04 18:07:46.508000000 +0800
|
||||||
@@ -45,7 +45,6 @@ requires = [
|
@@ -45,7 +45,6 @@
|
||||||
'chardet>=3.0.2,<3.1.0',
|
'chardet>=3.0.2,<4',
|
||||||
'idna>=2.5,<2.9',
|
'idna>=2.5,<3',
|
||||||
'urllib3>=1.21.1,<1.25',
|
'urllib3>=1.21.1,<1.26,!=1.25.0,!=1.25.1',
|
||||||
- 'certifi>=2017.4.17'
|
- 'certifi>=2017.4.17'
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,18 +1,17 @@
|
|||||||
%bcond_with tests
|
%bcond_with tests
|
||||||
|
|
||||||
Name: python-requests
|
Name: python-requests
|
||||||
Version: 2.21.0
|
Version: 2.24.0
|
||||||
Release: 5
|
Release: 1
|
||||||
Summary: Python HTTP Library
|
Summary: Python HTTP Library
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: http://python-requests.org/
|
URL: http://python-requests.org/
|
||||||
Source0: https://github.com/requests/requests/archive/v%{version}/requests-v%{version}.tar.gz
|
Source0: https://github.com/psf/requests/archive/v%{version}.tar.gz
|
||||||
|
|
||||||
Patch0: patch-requests-certs.py-to-use-the-system-CA-bundle.patch
|
Patch1: requests-2.12.4-tests_nonet.patch
|
||||||
Patch2: Remove-tests-that-use-the-tarpit.patch
|
Patch2: requests-2.20.0-no-py2-httpbin.patch
|
||||||
Patch3: requests-2.12.4-tests_nonet.patch
|
Patch3: patch-requests-certs.py-to-use-the-system-CA-bundle.patch
|
||||||
Patch4: Don-t-inject-pyopenssl-into-urllib3.patch
|
Patch4: Remove-tests-that-use-the-tarpit.patch
|
||||||
Patch5: requests-2.20.0-no-py2-httpbin.patch
|
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
@ -113,6 +112,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
|
|||||||
%doc HISTORY.md README.md
|
%doc HISTORY.md README.md
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tues Aug 18 2020 jinzhimin <jinzhimin2@huawei.com> - 2.24.0-1
|
||||||
|
- update package to 2.24.0
|
||||||
|
|
||||||
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.21.0-5
|
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 2.21.0-5
|
||||||
- Type:enhancement
|
- Type:enhancement
|
||||||
- ID:NA
|
- ID:NA
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user