Compare commits
80 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5482485d62 | ||
|
|
0f0415395c | ||
|
|
13de5714ce | ||
|
|
15b4c097f2 | ||
|
|
9d9296cdb3 | ||
|
|
8607c2fb65 | ||
|
|
e4b73fd858 | ||
|
|
96f8226c90 | ||
|
|
d78a94dfe4 | ||
|
|
ddd9aacc23 | ||
|
|
97f1d23628 | ||
|
|
003986f6c0 | ||
|
|
72017f21b4 | ||
|
|
c5fddd1793 | ||
|
|
8cc6ff9857 | ||
|
|
4b98833b9f | ||
|
|
37d17a50d9 | ||
|
|
15fe6d3df8 | ||
|
|
5c20e1e89b | ||
|
|
bb3f7150b7 | ||
|
|
89e46163b4 | ||
|
|
2e1de3d0e8 | ||
|
|
4916dd3371 | ||
|
|
a4e6c6d8c0 | ||
|
|
576af2d63f | ||
|
|
4d1f850e1f | ||
|
|
37f4fc1429 | ||
|
|
2c49b3aa63 | ||
|
|
46169880a4 | ||
|
|
ab88e0da15 | ||
|
|
a5e331ad3f | ||
|
|
85302c38d7 | ||
|
|
92130db632 | ||
|
|
b3699e5810 | ||
|
|
6b89252703 | ||
|
|
767bf29958 | ||
|
|
375e858999 | ||
|
|
f5181bf610 | ||
|
|
d9c9c5dd57 | ||
|
|
8d03190e25 | ||
|
|
040845c23c | ||
|
|
e2cec88d94 | ||
|
|
40791ac9da | ||
|
|
d0eb4d58af | ||
|
|
6522c375f6 | ||
|
|
bafd1c7a92 | ||
|
|
e262d9d35e | ||
|
|
10c79236cc | ||
|
|
67a4b380d0 | ||
|
|
ae5874a830 | ||
|
|
0f46c23ea6 | ||
|
|
dd738e1d80 | ||
|
|
7a45a67128 | ||
|
|
04117f977c | ||
|
|
3927751e55 | ||
|
|
6821c08a3d | ||
|
|
fb53bbb808 | ||
|
|
b653ecf800 | ||
|
|
21922e1494 | ||
|
|
7b94c2e14b | ||
|
|
a2f6bde0d7 | ||
|
|
72b7ad559c | ||
|
|
5977032a51 | ||
|
|
c7ebbfef39 | ||
|
|
72789402b3 | ||
|
|
f176dee1d6 | ||
|
|
cf89145232 | ||
|
|
11e90b9f64 | ||
|
|
3d4961eadf | ||
|
|
f0721ebf64 | ||
|
|
f9d62a3fa1 | ||
|
|
2669cc1211 | ||
|
|
6f87fd36b0 | ||
|
|
ed6a939199 | ||
|
|
993846bbca | ||
|
|
ee89d35aca | ||
|
|
31013885f4 | ||
|
|
255ca6064a | ||
|
|
ad843d5615 | ||
|
|
85a268d1e6 |
21 changed files with 1150 additions and 581 deletions
1
.fmf/version
Normal file
1
.fmf/version
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
1
|
||||||
14
.gitignore
vendored
14
.gitignore
vendored
|
|
@ -41,3 +41,17 @@
|
||||||
/requests-v2.19.1.tar.gz
|
/requests-v2.19.1.tar.gz
|
||||||
/requests-v2.20.0.tar.gz
|
/requests-v2.20.0.tar.gz
|
||||||
/requests-v2.21.0.tar.gz
|
/requests-v2.21.0.tar.gz
|
||||||
|
/requests-v2.22.0.tar.gz
|
||||||
|
/requests-v2.23.0.tar.gz
|
||||||
|
/requests-v2.24.0.tar.gz
|
||||||
|
/requests-v2.25.0.tar.gz
|
||||||
|
/requests-v2.25.1.tar.gz
|
||||||
|
/requests-v2.26.0.tar.gz
|
||||||
|
/requests-v2.27.0.tar.gz
|
||||||
|
/requests-v2.27.1.tar.gz
|
||||||
|
/requests-v2.28.1.tar.gz
|
||||||
|
/requests-v2.28.2.tar.gz
|
||||||
|
/requests-v2.31.0.tar.gz
|
||||||
|
/requests-v2.32.3.tar.gz
|
||||||
|
/requests-v2.32.4.tar.gz
|
||||||
|
/requests-v2.32.5.tar.gz
|
||||||
|
|
|
||||||
|
|
@ -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
|
|
||||||
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
From 524cd22fb77e69db9bb3f017bbb1d9782c37b0cd Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jeremy Cline <jeremy@jcline.org>
|
|
||||||
Date: Tue, 13 Jun 2017 09:08:09 -0400
|
|
||||||
Subject: [PATCH] Remove tests that use the tarpit
|
|
||||||
|
|
||||||
The latest version of Mock has started using systemd containers. The
|
|
||||||
systemd-nspawn command is being run with --private-network, which
|
|
||||||
immediately kills connections to something other than localhost. These
|
|
||||||
tests depend on the connection not being killed immediately and that
|
|
||||||
they are never responded to.
|
|
||||||
|
|
||||||
Signed-off-by: Jeremy Cline <jeremy@jcline.org>
|
|
||||||
---
|
|
||||||
tests/test_requests.py | 25 -------------------------
|
|
||||||
1 file changed, 25 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/tests/test_requests.py b/tests/test_requests.py
|
|
||||||
index b8350cb..46b7e9e 100755
|
|
||||||
--- a/tests/test_requests.py
|
|
||||||
+++ b/tests/test_requests.py
|
|
||||||
@@ -2049,31 +2049,6 @@ class TestTimeout:
|
|
||||||
except ReadTimeout:
|
|
||||||
pass
|
|
||||||
|
|
||||||
- @pytest.mark.parametrize(
|
|
||||||
- 'timeout', (
|
|
||||||
- (0.1, None),
|
|
||||||
- Urllib3Timeout(connect=0.1, read=None)
|
|
||||||
- ))
|
|
||||||
- def test_connect_timeout(self, timeout):
|
|
||||||
- try:
|
|
||||||
- requests.get(TARPIT, timeout=timeout)
|
|
||||||
- pytest.fail('The connect() request should time out.')
|
|
||||||
- except ConnectTimeout as e:
|
|
||||||
- assert isinstance(e, ConnectionError)
|
|
||||||
- assert isinstance(e, Timeout)
|
|
||||||
-
|
|
||||||
- @pytest.mark.parametrize(
|
|
||||||
- 'timeout', (
|
|
||||||
- (0.1, 0.1),
|
|
||||||
- Urllib3Timeout(connect=0.1, read=0.1)
|
|
||||||
- ))
|
|
||||||
- def test_total_timeout_connect(self, timeout):
|
|
||||||
- try:
|
|
||||||
- requests.get(TARPIT, timeout=timeout)
|
|
||||||
- pytest.fail('The connect() request should time out.')
|
|
||||||
- except ConnectTimeout:
|
|
||||||
- pass
|
|
||||||
-
|
|
||||||
def test_encoded_methods(self, httpbin):
|
|
||||||
"""See: https://github.com/requests/requests/issues/2316"""
|
|
||||||
r = requests.request(b'GET', httpbin('get'))
|
|
||||||
--
|
|
||||||
2.9.4
|
|
||||||
|
|
||||||
469
changelog
Normal file
469
changelog
Normal file
|
|
@ -0,0 +1,469 @@
|
||||||
|
* Tue Apr 15 2025 Benjamin A. Beasley <code@musicinmybrain.net> - 2.32.3-5
|
||||||
|
- Backport test-cert. fixes for urllib3 2.4.0 compatibility
|
||||||
|
|
||||||
|
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 2.32.3-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Aug 01 2024 Adam Williamson <awilliam@redhat.com> - 2.32.3-3
|
||||||
|
- Backport PR #6781 to fix crash on import if CA cert bundle is missing (#2297632)
|
||||||
|
|
||||||
|
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.32.3-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Jun 19 2024 Lumír Balhar <lbalhar@redhat.com> - 2.32.3-1
|
||||||
|
- Update to 2.32.3 (rhbz#2281881)
|
||||||
|
- Fix for CVE-2024-35195 (rhbz#2282205)
|
||||||
|
|
||||||
|
* Sun Jun 09 2024 Python Maint <python-maint@redhat.com> - 2.31.0-7
|
||||||
|
- Rebuilt for Python 3.13
|
||||||
|
|
||||||
|
* Fri Jun 07 2024 Python Maint <python-maint@redhat.com> - 2.31.0-6
|
||||||
|
- Bootstrap for Python 3.13
|
||||||
|
|
||||||
|
* Tue May 14 2024 Lumír Balhar <lbalhar@redhat.com> - 2.31.0-5
|
||||||
|
- Add support for IPv6 CIDR in no_proxy setting
|
||||||
|
- Fix FTBFS
|
||||||
|
|
||||||
|
* Thu Apr 11 2024 Lumír Balhar <lbalhar@redhat.com> - 2.31.0-4
|
||||||
|
- Fix compatibility with pytest 8
|
||||||
|
|
||||||
|
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.31.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.31.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Oct 16 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 2.31.0-1
|
||||||
|
- Update to 2.31.0
|
||||||
|
- Fixes: rhbz#2189970
|
||||||
|
|
||||||
|
* Tue Oct 10 2023 Miro Hrončok <mhroncok@redhat.com> - 2.28.2-7
|
||||||
|
- Do not package requests[security] and requests[socks] on RHEL
|
||||||
|
- Make the package build even when urllib3 won't pull in pysocks
|
||||||
|
|
||||||
|
* Tue Aug 08 2023 Karolina Surma <ksurma@redhat.com> - 2.28.2-6
|
||||||
|
- Declare the license as an SPDX expression
|
||||||
|
|
||||||
|
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.28.2-5
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jul 01 2023 Python Maint <python-maint@redhat.com> - 2.28.2-4
|
||||||
|
- Rebuilt for Python 3.12
|
||||||
|
|
||||||
|
* Tue Jun 13 2023 Python Maint <python-maint@redhat.com> - 2.28.2-3
|
||||||
|
- Bootstrap for Python 3.12
|
||||||
|
|
||||||
|
* Tue May 23 2023 Miro Hrončok <mhroncok@redhat.com> - 2.28.2-2
|
||||||
|
- Security fix for CVE-2023-32681
|
||||||
|
- https://github.com/psf/requests/security/advisories/GHSA-j8r2-6x86-q33q
|
||||||
|
|
||||||
|
* Wed Feb 01 2023 Lumír Balhar <lbalhar@redhat.com> - 2.28.2-1
|
||||||
|
- Update to 2.28.2 (rhbz#2160527)
|
||||||
|
|
||||||
|
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.28.1-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Sep 13 2022 Kevin Fenzi <kevin@scrye.com> - 2.28.1-3
|
||||||
|
- Enable all tests and drop no longer needed test patch.
|
||||||
|
|
||||||
|
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.28.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jul 12 2022 Adam Williamson <awilliam@redhat.com> - 2.28.1-1
|
||||||
|
- Update to 2.28.1, rediff patches
|
||||||
|
|
||||||
|
* Mon Jun 20 2022 Lumír Balhar <lbalhar@redhat.com> - 2.27.1-5
|
||||||
|
- Allow charset_normalizer 2.1.0 and newer up to 3.0.0
|
||||||
|
|
||||||
|
* Tue Jun 14 2022 Python Maint <python-maint@redhat.com> - 2.27.1-4
|
||||||
|
- Rebuilt for Python 3.11
|
||||||
|
|
||||||
|
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 2.27.1-3
|
||||||
|
- Bootstrap for Python 3.11
|
||||||
|
|
||||||
|
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.27.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sat Jan 08 2022 Kevin Fenzi <kevin@scrye.com> - 2.27.1-1
|
||||||
|
- Update to 2.27.1. Fixes rhbz#2037431
|
||||||
|
|
||||||
|
* Tue Jan 04 2022 Adam Williamson <awilliam@redhat.com> - 2.27.0-1
|
||||||
|
- Update to 2.27.0
|
||||||
|
- Re-enable test_https_warnings as it works with pytest-httpbin 1.0.0 now
|
||||||
|
- Re-enable test_pyopenssl_redirect, it seems to work too
|
||||||
|
|
||||||
|
* Sun Jul 25 2021 Lumír Balhar <lbalhar@redhat.com> - 2.26.0-1
|
||||||
|
- Update to 2.26.0
|
||||||
|
Resolves: rhbz#1981856
|
||||||
|
|
||||||
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.25.1-4
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.25.1-3
|
||||||
|
- Rebuilt for Python 3.10
|
||||||
|
|
||||||
|
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 2.25.1-2
|
||||||
|
- Bootstrap for Python 3.10
|
||||||
|
|
||||||
|
* Tue Feb 02 2021 Kevin Fenzi <kevin@scrye.com> - 2.25.1-1
|
||||||
|
- Update 2.25.1. Fix is rhbz#1908487
|
||||||
|
|
||||||
|
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.25.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||||
|
|
||||||
|
* Wed Nov 25 2020 Petr Viktorin <pviktori@redhat.com> - 2.25.0-1
|
||||||
|
- Update to 2.25.0
|
||||||
|
|
||||||
|
* Fri Nov 13 2020 Miro Hrončok <mhroncok@redhat.com> - 2.24.0-5
|
||||||
|
- Don't BR pytest-cov
|
||||||
|
|
||||||
|
* Fri Sep 18 2020 Petr Viktorin <pviktori@redhat.com> - 2.24.0-4
|
||||||
|
- Port to pyproject macros
|
||||||
|
|
||||||
|
* Fri Sep 18 2020 Miro Hrončok <mhroncok@redhat.com> - 2.24.0-3
|
||||||
|
- Build with pytest 6, older version is no longer required
|
||||||
|
|
||||||
|
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.24.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
|
* Sat May 30 2020 Miro Hrončok <mhroncok@redhat.com> - 2.23.0-4
|
||||||
|
- Test with pytest 4, drop manual requires
|
||||||
|
|
||||||
|
* Mon May 25 2020 Miro Hrončok <mhroncok@redhat.com> - 2.23.0-3
|
||||||
|
- Rebuilt for Python 3.9
|
||||||
|
|
||||||
|
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 2.23.0-2
|
||||||
|
- Bootstrap for Python 3.9
|
||||||
|
|
||||||
|
* Fri Feb 21 2020 Randy Barlow <bowlofeggs@fedoraproject.org> - 2.23.0-1
|
||||||
|
- Update to 2.23.0 (#1804863).
|
||||||
|
- https://requests.readthedocs.io/en/latest/community/updates/
|
||||||
|
|
||||||
|
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.22.0-8
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Oct 22 2019 Charalampos Stratakis <cstratak@redhat.com> - 2.22.0-7
|
||||||
|
- Remove the python2 subpackage (rhbz#1761787)
|
||||||
|
|
||||||
|
* Wed Sep 18 2019 Petr Viktorin <pviktori@redhat.com> - 2.22.0-6
|
||||||
|
- Python 2: Remove tests and test dependencies
|
||||||
|
|
||||||
|
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.22.0-5
|
||||||
|
- Rebuilt for Python 3.8
|
||||||
|
|
||||||
|
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.22.0-4
|
||||||
|
- Bootstrap for Python 3.8
|
||||||
|
|
||||||
|
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.22.0-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||||
|
|
||||||
|
* Tue Jun 11 2019 Yatin Karel <ykarel@redhat.com> - 2.22.0-2
|
||||||
|
- Add minimum requirement for chardet and urllib3
|
||||||
|
|
||||||
|
* Thu May 23 2019 Jeremy Cline <jcline@redhat.com> - 2.22.0-1
|
||||||
|
- Update to v2.22.0
|
||||||
|
|
||||||
|
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.21.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu Dec 13 2018 Jeremy Cline <jeremy@jcline.org> - 2.21.0-1
|
||||||
|
- Update to v2.21.0
|
||||||
|
- Don't rely on certifi being patched properly to use the system CA bundle
|
||||||
|
|
||||||
|
* Mon Nov 26 2018 Miro Hrončok <mhroncok@redhat.com> - 2.20.0-2
|
||||||
|
- No pytest-httpbin for Python 2
|
||||||
|
|
||||||
|
* Mon Oct 29 2018 Jeremy Cline <jeremy@jcline.org> - 2.20.0-1
|
||||||
|
- Update to v2.20.0
|
||||||
|
|
||||||
|
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.19.1-3
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 2.19.1-2
|
||||||
|
- Rebuilt for Python 3.7
|
||||||
|
|
||||||
|
* Thu Jun 14 2018 Jeremy Cline <jeremy@jcline.org> - 2.19.1-1
|
||||||
|
- Update to v2.19.1 (rhbz 1591531)
|
||||||
|
|
||||||
|
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 2.19.0-2
|
||||||
|
- Bootstrap for Python 3.7
|
||||||
|
|
||||||
|
* Tue Jun 12 2018 Jeremy Cline <jeremy@jcline.org> - 2.19.0-1
|
||||||
|
- Update to v2.19.0 (rhbz 1590508)
|
||||||
|
|
||||||
|
* Fri Jun 08 2018 Jeremy Cline <jeremy@jcline.org> - 2.18.4-6
|
||||||
|
- Don't print runtime warning about urllib3 v1.23 (rhbz 1589306)
|
||||||
|
|
||||||
|
* Tue Jun 05 2018 Jeremy Cline <jeremy@jcline.org> - 2.18.4-5
|
||||||
|
- Allow urllib3 v1.23 (rhbz 1586311)
|
||||||
|
|
||||||
|
* 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
|
||||||
|
|
||||||
|
* Mon Dec 11 2017 Iryna Shcherbina <ishcherb@redhat.com> - 2.18.4-2
|
||||||
|
- Fix ambiguous Python 2 dependency declarations
|
||||||
|
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
||||||
|
|
||||||
|
* Fri Aug 18 2017 Jeremy Cline <jeremy@jcline.org> - 2.18.4-1
|
||||||
|
- Update to 2.18.4
|
||||||
|
|
||||||
|
* Wed Jul 26 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.18.2-1
|
||||||
|
- Update to 2.18.2
|
||||||
|
|
||||||
|
* Tue Jun 20 2017 Jeremy Cline <jeremy@jcline.org> - 2.18.1-2
|
||||||
|
- Drop the dependency on certifi in setup.py
|
||||||
|
|
||||||
|
* Mon Jun 19 2017 Jeremy Cline <jeremy@jcline.org> - 2.18.1-1
|
||||||
|
- Update to 2.18.1 (#1449432)
|
||||||
|
- Remove tests that require non-local network (#1450608)
|
||||||
|
|
||||||
|
* Wed May 17 2017 Jeremy Cline <jeremy@jcline.org> - 2.14.2-1
|
||||||
|
- Update to 2.14.2 (#1449432)
|
||||||
|
- Switch to autosetup to apply patches
|
||||||
|
|
||||||
|
* Sun May 14 2017 Stephen Gallagher <sgallagh@redhat.com> - 2.13.0-2
|
||||||
|
- Don't run tests when building as a module
|
||||||
|
|
||||||
|
* Thu Feb 09 2017 Jeremy Cline <jeremy@jcline.org> - 2.13.0-1
|
||||||
|
- Update to 2.13.0 (#1418138)
|
||||||
|
|
||||||
|
* Fri Dec 30 2016 Adam Williamson <awilliam@redhat.com> - 2.12.4-3
|
||||||
|
- Include and enable tests (now python-pytest-httpbin is packaged)
|
||||||
|
|
||||||
|
* Wed Dec 21 2016 Kevin Fenzi <kevin@scrye.com> - 2.12.4-2
|
||||||
|
- Rebuild for Python 3.6 again.
|
||||||
|
|
||||||
|
* Tue Dec 20 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.4-1
|
||||||
|
- Update to 2.12.4. Fixes #1404680
|
||||||
|
|
||||||
|
* Tue Dec 13 2016 Stratakis Charalampos <cstratak@redhat.com> - 2.12.3-2
|
||||||
|
- Rebuild for Python 3.6
|
||||||
|
|
||||||
|
* Thu Dec 01 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.3-1
|
||||||
|
- Update to 2.12.3. Fixes #1400601
|
||||||
|
|
||||||
|
* Wed Nov 30 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.2-1
|
||||||
|
- Update to 2.12.2
|
||||||
|
|
||||||
|
* Wed Nov 23 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.1-2
|
||||||
|
- Backport #3713. Fixes #1397149
|
||||||
|
|
||||||
|
* Thu Nov 17 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.1-1
|
||||||
|
- Update to 2.12.1. Fixes #1395469
|
||||||
|
- Unbundle idna, a new upstream dependency
|
||||||
|
|
||||||
|
* Sat Aug 27 2016 Kevin Fenzi <kevin@scrye.com> - 2.11.1-1
|
||||||
|
- Update to 2.11.1. Fixes #1370814
|
||||||
|
|
||||||
|
* Wed Aug 10 2016 Kevin Fenzi <kevin@scrye.com> - 2.11.0-1
|
||||||
|
- Update to 2.11.0. Fixes #1365332
|
||||||
|
|
||||||
|
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.10.0-4
|
||||||
|
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
||||||
|
|
||||||
|
* Fri Jul 15 2016 Ralph Bean <rbean@redhat.com> - 2.10.0-3
|
||||||
|
- Update python2 packaging.
|
||||||
|
|
||||||
|
* Thu Jun 02 2016 Ralph Bean <rbean@redhat.com> - 2.10.0-2
|
||||||
|
- Fix python2 subpackage to comply with guidelines.
|
||||||
|
|
||||||
|
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Dec 21 2015 Ralph Bean <rbean@redhat.com> - 2.9.1-1
|
||||||
|
- new version
|
||||||
|
|
||||||
|
* Fri Dec 18 2015 Ralph Bean <rbean@redhat.com> - 2.9.0-1
|
||||||
|
- new version
|
||||||
|
|
||||||
|
* Mon Dec 14 2015 Ralph Bean <rbean@redhat.com> - 2.8.1-1
|
||||||
|
- Latest upstream.
|
||||||
|
- Bump hard dep on urllib3 to 1.12.
|
||||||
|
|
||||||
|
* Mon Nov 02 2015 Robert Kuska <rkuska@redhat.com> - 2.7.0-8
|
||||||
|
- Rebuilt for Python3.5 rebuild
|
||||||
|
|
||||||
|
* Sat Oct 10 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-7
|
||||||
|
- Tell setuptools about what version of urllib3 we're unbundling
|
||||||
|
for https://github.com/kennethreitz/requests/issues/2816
|
||||||
|
|
||||||
|
* Thu Sep 17 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-6
|
||||||
|
- Replace the provides macro with a plain provides field for now until we can
|
||||||
|
re-organize this package into two different subpackages.
|
||||||
|
|
||||||
|
* Thu Sep 17 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-5
|
||||||
|
- Remove 'provides: python2-requests' from the python3 subpackage, obviously.
|
||||||
|
|
||||||
|
* Tue Sep 15 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-4
|
||||||
|
- Employ %%python_provides macro to provide python2-requests.
|
||||||
|
|
||||||
|
* Fri Sep 04 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-3
|
||||||
|
- Lock down the python-urllib3 version to the specific version we unbundled.
|
||||||
|
https://bugzilla.redhat.com/show_bug.cgi?id=1253823
|
||||||
|
|
||||||
|
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon May 04 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-1
|
||||||
|
- new version
|
||||||
|
|
||||||
|
* Wed Apr 29 2015 Ralph Bean <rbean@redhat.com> - 2.6.2-1
|
||||||
|
- new version
|
||||||
|
|
||||||
|
* Thu Apr 23 2015 Ralph Bean <rbean@redhat.com> - 2.6.1-1
|
||||||
|
- new version
|
||||||
|
|
||||||
|
* Wed Apr 22 2015 Ralph Bean <rbean@redhat.com> - 2.6.0-1
|
||||||
|
- new version
|
||||||
|
- Remove patch for CVE-2015-2296, now included in the upstream release.
|
||||||
|
|
||||||
|
* Mon Mar 16 2015 Ralph Bean <rbean@redhat.com> - 2.5.3-2
|
||||||
|
- Backport fix for CVE-2015-2296.
|
||||||
|
|
||||||
|
* Thu Feb 26 2015 Ralph Bean <rbean@redhat.com> - 2.5.3-1
|
||||||
|
- new version
|
||||||
|
|
||||||
|
* Wed Feb 18 2015 Ralph Bean <rbean@redhat.com> - 2.5.1-1
|
||||||
|
- new version
|
||||||
|
|
||||||
|
* Tue Dec 16 2014 Ralph Bean <rbean@redhat.com> - 2.5.0-3
|
||||||
|
- Pin python-urllib3 requirement at 1.10.
|
||||||
|
- Fix requirement pinning syntax.
|
||||||
|
|
||||||
|
* Thu Dec 11 2014 Ralph Bean <rbean@redhat.com> - 2.5.0-2
|
||||||
|
- Do the most basic of tests in the check section.
|
||||||
|
|
||||||
|
* Thu Dec 11 2014 Ralph Bean <rbean@redhat.com> - 2.5.0-1
|
||||||
|
- Latest upstream, 2.5.0 for #1171068
|
||||||
|
|
||||||
|
* Wed Nov 05 2014 Ralph Bean <rbean@redhat.com> - 2.4.3-1
|
||||||
|
- Latest upstream, 2.4.3 for #1136283
|
||||||
|
|
||||||
|
* Wed Nov 05 2014 Ralph Bean <rbean@redhat.com> - 2.3.0-4
|
||||||
|
- Re-do unbundling by symlinking system libs into the requests/packages/ dir.
|
||||||
|
|
||||||
|
* Sun Aug 3 2014 Tom Callaway <spot@fedoraproject.org> - 2.3.0-3
|
||||||
|
- fix license handling
|
||||||
|
|
||||||
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
||||||
|
|
||||||
|
* Thu May 29 2014 Arun S A G <sagarun@gmail.com> - 2.3.0-1
|
||||||
|
- Latest upstream
|
||||||
|
|
||||||
|
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.0.0-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
|
||||||
|
|
||||||
|
* Wed Sep 25 2013 Ralph Bean <rbean@redhat.com> - 2.0.0-1
|
||||||
|
- Latest upstream.
|
||||||
|
- Add doc macro to the python3 files section.
|
||||||
|
- Require python-urllib3 greater than or at 1.7.1.
|
||||||
|
|
||||||
|
* Mon Aug 26 2013 Rex Dieter <rdieter@fedoraproject.org> 1.2.3-5
|
||||||
|
- fix versioned dep on python-urllib3
|
||||||
|
|
||||||
|
* Mon Aug 26 2013 Ralph Bean <rbean@redhat.com> - 1.2.3-4
|
||||||
|
- Explicitly versioned the requirements on python-urllib3.
|
||||||
|
|
||||||
|
* Thu Aug 22 2013 Ralph Bean <rbean@redhat.com> - 1.2.3-3
|
||||||
|
- Release bump for a coupled update with python-urllib3.
|
||||||
|
|
||||||
|
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||||
|
|
||||||
|
* Mon Jul 01 2013 Ralph Bean <rbean@redhat.com> - 1.2.3-1
|
||||||
|
- Latest upstream.
|
||||||
|
- Fixed bogus date in changelog.
|
||||||
|
|
||||||
|
* Tue Jun 11 2013 Ralph Bean <rbean@redhat.com> - 1.1.0-4
|
||||||
|
- Correct a rhel conditional on python-ordereddict
|
||||||
|
|
||||||
|
* Thu Feb 28 2013 Ralph Bean <rbean@redhat.com> - 1.1.0-3
|
||||||
|
- Unbundled python-urllib3. Using system python-urllib3 now.
|
||||||
|
- Conditionally include python-ordereddict for el6.
|
||||||
|
|
||||||
|
* Wed Feb 27 2013 Ralph Bean <rbean@redhat.com> - 1.1.0-2
|
||||||
|
- Unbundled python-charade/chardet. Using system python-chardet now.
|
||||||
|
- Removed deprecated comments and actions against oauthlib unbundling.
|
||||||
|
Those are no longer necessary in 1.1.0.
|
||||||
|
- Added links to bz tickets over Patch declarations.
|
||||||
|
|
||||||
|
* Tue Feb 26 2013 Ralph Bean <rbean@redhat.com> - 1.1.0-1
|
||||||
|
- Latest upstream.
|
||||||
|
- Relicense to ASL 2.0 with upstream.
|
||||||
|
- Removed cookie handling patch (fixed in upstream tarball).
|
||||||
|
- Updated cert unbundling patch to match upstream.
|
||||||
|
- Added check section, but left it commented out for koji.
|
||||||
|
|
||||||
|
* Fri Feb 8 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 0.14.1-4
|
||||||
|
- Let brp_python_bytecompile run again, take care of the non-python{2,3} modules
|
||||||
|
by removing them from the python{,3}-requests package that they did not belong
|
||||||
|
in.
|
||||||
|
- Use the certificates in the ca-certificates package instead of the bundled one
|
||||||
|
+ https://bugzilla.redhat.com/show_bug.cgi?id=904614
|
||||||
|
- Fix a problem with cookie handling
|
||||||
|
+ https://bugzilla.redhat.com/show_bug.cgi?id=906924
|
||||||
|
|
||||||
|
* Mon Oct 22 2012 Arun S A G <sagarun@gmail.com> 0.14.1-1
|
||||||
|
- Updated to latest upstream release
|
||||||
|
|
||||||
|
* Sun Jun 10 2012 Arun S A G <sagarun@gmail.com> 0.13.1-1
|
||||||
|
- Updated to latest upstream release 0.13.1
|
||||||
|
- Use system provided ca-certificates
|
||||||
|
- No more async requests use grrequests https://github.com/kennethreitz/grequests
|
||||||
|
- Remove gevent as it is no longer required by requests
|
||||||
|
|
||||||
|
* Sun Apr 01 2012 Arun S A G <sagarun@gmail.com> 0.11.1-1
|
||||||
|
- Updated to upstream release 0.11.1
|
||||||
|
|
||||||
|
* Thu Mar 29 2012 Arun S A G <sagarun@gmail.com> 0.10.6-3
|
||||||
|
- Support building package for EL6
|
||||||
|
|
||||||
|
* Tue Mar 27 2012 Rex Dieter <rdieter@fedoraproject.org> 0.10.6-2
|
||||||
|
- +python3-requests pkg
|
||||||
|
|
||||||
|
* Sat Mar 3 2012 Arun SAG <sagarun@gmail.com> - 0.10.6-1
|
||||||
|
- Updated to new upstream version
|
||||||
|
|
||||||
|
* Sat Jan 21 2012 Arun SAG <sagarun@gmail.com> - 0.9.3-1
|
||||||
|
- Updated to new upstream version 0.9.3
|
||||||
|
- Include python-gevent as a dependency for requests.async
|
||||||
|
- Clean up shebangs in requests/setup.py,test_requests.py and test_requests_ext.py
|
||||||
|
|
||||||
|
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.2-2
|
||||||
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||||
|
|
||||||
|
* Sun Nov 27 2011 Arun SAG <sagarun@gmail.com> - 0.8.2-1
|
||||||
|
- New upstream version
|
||||||
|
- keep alive support
|
||||||
|
- complete removal of cookiejar and urllib2
|
||||||
|
|
||||||
|
* Thu Nov 10 2011 Arun SAG <sagarun@gmail.com> - 0.7.6-1
|
||||||
|
- Updated to new upstream release 0.7.6
|
||||||
|
|
||||||
|
* Thu Oct 20 2011 Arun SAG <sagarun@gmail.com> - 0.6.6-1
|
||||||
|
- Updated to version 0.6.6
|
||||||
|
|
||||||
|
* Fri Aug 26 2011 Arun SAG <sagarun@gmail.com> - 0.6.1-1
|
||||||
|
- Updated to version 0.6.1
|
||||||
|
|
||||||
|
* Sat Aug 20 2011 Arun SAG <sagarun@gmail.com> - 0.6.0-1
|
||||||
|
- Updated to latest version 0.6.0
|
||||||
|
|
||||||
|
* Mon Aug 15 2011 Arun SAG <sagarun@gmail.com> - 0.5.1-2
|
||||||
|
- Remove OPT_FLAGS from build section since it is a noarch package
|
||||||
|
- Fix use of mixed tabs and space
|
||||||
|
- Remove extra space around the word cumbersome in description
|
||||||
|
|
||||||
|
* Sun Aug 14 2011 Arun SAG <sagarun@gmail.com> - 0.5.1-1
|
||||||
|
- Initial package
|
||||||
|
|
@ -1,46 +0,0 @@
|
||||||
From d5a4f2908fab5ca16eb59db8b18eda7a94a37b04 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jeremy Cline <jcline@redhat.com>
|
|
||||||
Date: Thu, 13 Dec 2018 10:55:29 -0500
|
|
||||||
Subject: [PATCH] Patch requests/certs.py to use the system CA bundle
|
|
||||||
|
|
||||||
Signed-off-by: Jeremy Cline <jcline@redhat.com>
|
|
||||||
---
|
|
||||||
requests/certs.py | 8 +++++++-
|
|
||||||
setup.py | 1 -
|
|
||||||
2 files changed, 7 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/requests/certs.py b/requests/certs.py
|
|
||||||
index d1a378d7..5eb2f1a9 100644
|
|
||||||
--- a/requests/certs.py
|
|
||||||
+++ b/requests/certs.py
|
|
||||||
@@ -11,8 +11,14 @@ only one — the one from the certifi package.
|
|
||||||
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
|
|
||||||
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
|
|
||||||
+def where():
|
|
||||||
+ """Return the absolute path to the system CA bundle."""
|
|
||||||
+ return '/etc/pki/tls/certs/ca-bundle.crt'
|
|
||||||
+
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
print(where())
|
|
||||||
diff --git a/setup.py b/setup.py
|
|
||||||
index 10ce2c62..1f3b2bde 100755
|
|
||||||
--- a/setup.py
|
|
||||||
+++ b/setup.py
|
|
||||||
@@ -45,7 +45,6 @@ requires = [
|
|
||||||
'chardet>=3.0.2,<3.1.0',
|
|
||||||
'idna>=2.5,<2.9',
|
|
||||||
'urllib3>=1.21.1,<1.25',
|
|
||||||
- 'certifi>=2017.4.17'
|
|
||||||
|
|
||||||
]
|
|
||||||
test_requirements = [
|
|
||||||
--
|
|
||||||
2.19.2
|
|
||||||
|
|
||||||
5
plan.fmf
Normal file
5
plan.fmf
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
execute:
|
||||||
|
how: tmt
|
||||||
|
discover:
|
||||||
|
how: fmf
|
||||||
|
|
||||||
|
|
@ -1,42 +1,38 @@
|
||||||
%if 0%{?_module_build}
|
|
||||||
# Don't run tests on module-build for now
|
|
||||||
# See: https://bugzilla.redhat.com/show_bug.cgi?id=1450608
|
|
||||||
%bcond_with tests
|
|
||||||
%else
|
|
||||||
# When bootstrapping Python, we cannot test this yet
|
# When bootstrapping Python, we cannot test this yet
|
||||||
%bcond_without tests
|
# RHEL does not include the test dependencies
|
||||||
%endif
|
%bcond tests %{undefined rhel}
|
||||||
|
# The extras are disabled on RHEL to avoid pysocks and deprecated requests[security]
|
||||||
|
%bcond extras %[%{undefined rhel} || %{defined eln}]
|
||||||
|
%bcond extradeps %{undefined rhel}
|
||||||
|
|
||||||
Name: python-requests
|
Name: python-requests
|
||||||
Version: 2.21.0
|
Version: 2.32.5
|
||||||
Release: 2%{?dist}
|
Release: %autorelease
|
||||||
Summary: HTTP library, written in Python, for human beings
|
Summary: HTTP library, written in Python, for human beings
|
||||||
|
|
||||||
License: ASL 2.0
|
License: Apache-2.0
|
||||||
URL: https://pypi.io/project/requests
|
URL: https://pypi.io/project/requests
|
||||||
Source0: https://github.com/requests/requests/archive/v%{version}/requests-v%{version}.tar.gz
|
Source: https://github.com/requests/requests/archive/v%{version}/requests-v%{version}.tar.gz
|
||||||
|
|
||||||
# Explicitly use the system certificates in ca-certificates.
|
# Explicitly use the system certificates in ca-certificates.
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=904614
|
# https://bugzilla.redhat.com/show_bug.cgi?id=904614
|
||||||
Patch0: patch-requests-certs.py-to-use-the-system-CA-bundle.patch
|
Patch: system-certs.patch
|
||||||
|
|
||||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1450608
|
# Add support for IPv6 CIDR in no_proxy setting
|
||||||
Patch2: Remove-tests-that-use-the-tarpit.patch
|
# This functionality is needed in Openshift and it has been
|
||||||
|
# proposed for upstream in 2021 but the PR unfortunately stalled.
|
||||||
# Use 127.0.0.1 not localhost for socket.bind() in the Server test
|
# Upstream PR: https://github.com/psf/requests/pull/5953
|
||||||
# class, to fix tests in Koji's no-network environment
|
# This change is backported also into RHEL 9.4 (via CS)
|
||||||
# This probably isn't really upstreamable, because I guess localhost
|
Patch: support_IPv6_CIDR_in_no_proxy.patch
|
||||||
# could technically be IPv6 or something, and our no-network env is
|
|
||||||
# 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
|
BuildArch: noarch
|
||||||
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
|
%if %{with tests}
|
||||||
|
BuildRequires: python3dist(pytest)
|
||||||
|
BuildRequires: python3dist(pytest-httpbin)
|
||||||
|
BuildRequires: python3dist(pytest-mock)
|
||||||
|
BuildRequires: python3dist(trustme)
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Most existing Python modules for sending HTTP requests are extremely verbose and
|
Most existing Python modules for sending HTTP requests are extremely verbose and
|
||||||
|
|
@ -44,56 +40,9 @@ cumbersome. Python’s built-in urllib2 module provides most of the HTTP
|
||||||
capabilities you should need, but the API is thoroughly broken. This library is
|
capabilities you should need, but the API is thoroughly broken. This library is
|
||||||
designed to make HTTP requests easy for developers.
|
designed to make HTTP requests easy for developers.
|
||||||
|
|
||||||
%package -n python2-requests
|
|
||||||
Summary: HTTP library, written in Python, for human beings
|
|
||||||
%{?python_provide:%python_provide python2-requests}
|
|
||||||
|
|
||||||
BuildRequires: python2-devel
|
|
||||||
BuildRequires: python2-chardet
|
|
||||||
BuildRequires: python2-urllib3
|
|
||||||
BuildRequires: python2-idna
|
|
||||||
%if %{with tests}
|
|
||||||
BuildRequires: python2-pytest
|
|
||||||
BuildRequires: python2-pytest-cov
|
|
||||||
BuildRequires: python2-pytest-mock
|
|
||||||
%endif
|
|
||||||
|
|
||||||
|
|
||||||
Requires: ca-certificates
|
|
||||||
Requires: python2-chardet
|
|
||||||
Requires: python2-urllib3
|
|
||||||
Requires: python2-idna
|
|
||||||
|
|
||||||
%if 0%{?rhel} && 0%{?rhel} <= 6
|
|
||||||
BuildRequires: python-ordereddict
|
|
||||||
Requires: python-ordereddict
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%description -n python2-requests
|
|
||||||
Most existing Python modules for sending HTTP requests are extremely verbose and
|
|
||||||
cumbersome. Python’s built-in urllib2 module provides most of the HTTP
|
|
||||||
capabilities you should need, but the API is thoroughly broken. This library is
|
|
||||||
designed to make HTTP requests easy for developers.
|
|
||||||
|
|
||||||
%package -n python%{python3_pkgversion}-requests
|
%package -n python%{python3_pkgversion}-requests
|
||||||
Summary: HTTP library, written in Python, for human beings
|
Summary: %{summary}
|
||||||
|
|
||||||
%{?python_provide:%python_provide python%{python3_pkgversion}-requests}
|
|
||||||
|
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
|
||||||
BuildRequires: python%{python3_pkgversion}-chardet
|
|
||||||
BuildRequires: python%{python3_pkgversion}-urllib3
|
|
||||||
BuildRequires: python%{python3_pkgversion}-idna
|
|
||||||
%if %{with tests}
|
|
||||||
BuildRequires: python%{python3_pkgversion}-pytest
|
|
||||||
BuildRequires: python%{python3_pkgversion}-pytest-cov
|
|
||||||
BuildRequires: python%{python3_pkgversion}-pytest-httpbin
|
|
||||||
BuildRequires: python%{python3_pkgversion}-pytest-mock
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Requires: python%{python3_pkgversion}-chardet
|
|
||||||
Requires: python%{python3_pkgversion}-urllib3
|
|
||||||
Requires: python%{python3_pkgversion}-idna
|
|
||||||
|
|
||||||
%description -n python%{python3_pkgversion}-requests
|
%description -n python%{python3_pkgversion}-requests
|
||||||
Most existing Python modules for sending HTTP requests are extremely verbose and
|
Most existing Python modules for sending HTTP requests are extremely verbose and
|
||||||
|
|
@ -101,340 +50,49 @@ cumbersome. Python’s built-in urllib2 module provides most of the HTTP
|
||||||
capabilities you should need, but the API is thoroughly broken. This library is
|
capabilities you should need, but the API is thoroughly broken. This library is
|
||||||
designed to make HTTP requests easy for developers.
|
designed to make HTTP requests easy for developers.
|
||||||
|
|
||||||
|
|
||||||
|
%if %{with extras}
|
||||||
|
%pyproject_extras_subpkg -n python%{python3_pkgversion}-requests security socks
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%generate_buildrequires
|
||||||
|
%pyproject_buildrequires %{?with_extradeps:-x security,socks}
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n requests-%{version}
|
%autosetup -p1 -n requests-%{version}
|
||||||
|
|
||||||
# Unbundle the certificate bundle from mozilla.
|
|
||||||
rm -rf requests/cacert.pem
|
|
||||||
|
|
||||||
# env shebang in nonexecutable file
|
# env shebang in nonexecutable file
|
||||||
sed -i '/#!\/usr\/.*python/d' requests/certs.py
|
sed -i '/#!\/usr\/.*python/d' src/requests/certs.py
|
||||||
|
|
||||||
|
# Some doctests use the internet and fail to pass in Koji. Since doctests don't have names, I don't
|
||||||
|
# know a way to skip them. We also don't want to patch them out, because patching them out will
|
||||||
|
# change the docs. Thus, we set pytest not to run doctests at all.
|
||||||
|
sed -i 's/ --doctest-modules//' pyproject.toml
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
%pyproject_wheel
|
||||||
%py3_build
|
|
||||||
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py2_install
|
%pyproject_install
|
||||||
%py3_install
|
%pyproject_save_files -l requests
|
||||||
|
|
||||||
|
|
||||||
%if %{with tests}
|
|
||||||
%check
|
%check
|
||||||
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} -m pytest -v
|
%pyproject_check_import
|
||||||
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
|
%if %{with tests}
|
||||||
%endif # tests
|
# test_unicode_header_name - reported: https://github.com/psf/requests/issues/6734
|
||||||
|
# test_use_proxy_from_environment needs pysocks
|
||||||
|
%pytest -v tests -k "not test_unicode_header_name %{!?with_extradeps:and not test_use_proxy_from_environment}"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
%files -n python2-requests
|
%files -n python%{python3_pkgversion}-requests -f %{pyproject_files}
|
||||||
%license LICENSE
|
|
||||||
%doc README.md HISTORY.md
|
%doc README.md HISTORY.md
|
||||||
%{python2_sitelib}/*.egg-info
|
|
||||||
%{python2_sitelib}/requests/
|
|
||||||
|
|
||||||
%files -n python%{python3_pkgversion}-requests
|
|
||||||
%license LICENSE
|
|
||||||
%doc README.md HISTORY.md
|
|
||||||
%{python3_sitelib}/*.egg-info
|
|
||||||
%{python3_sitelib}/requests/
|
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.21.0-2
|
%autochangelog
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu Dec 13 2018 Jeremy Cline <jeremy@jcline.org> - 2.21.0-1
|
|
||||||
- Update to v2.21.0
|
|
||||||
- Don't rely on certifi being patched properly to use the system CA bundle
|
|
||||||
|
|
||||||
* Mon Nov 26 2018 Miro Hrončok <mhroncok@redhat.com> - 2.20.0-2
|
|
||||||
- No pytest-httpbin for Python 2
|
|
||||||
|
|
||||||
* Mon Oct 29 2018 Jeremy Cline <jeremy@jcline.org> - 2.20.0-1
|
|
||||||
- Update to v2.20.0
|
|
||||||
|
|
||||||
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.19.1-3
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Jun 18 2018 Miro Hrončok <mhroncok@redhat.com> - 2.19.1-2
|
|
||||||
- Rebuilt for Python 3.7
|
|
||||||
|
|
||||||
* Thu Jun 14 2018 Jeremy Cline <jeremy@jcline.org> - 2.19.1-1
|
|
||||||
- Update to v2.19.1 (rhbz 1591531)
|
|
||||||
|
|
||||||
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 2.19.0-2
|
|
||||||
- Bootstrap for Python 3.7
|
|
||||||
|
|
||||||
* Tue Jun 12 2018 Jeremy Cline <jeremy@jcline.org> - 2.19.0-1
|
|
||||||
- Update to v2.19.0 (rhbz 1590508)
|
|
||||||
|
|
||||||
* Fri Jun 08 2018 Jeremy Cline <jeremy@jcline.org> - 2.18.4-6
|
|
||||||
- Don't print runtime warning about urllib3 v1.23 (rhbz 1589306)
|
|
||||||
|
|
||||||
* Tue Jun 05 2018 Jeremy Cline <jeremy@jcline.org> - 2.18.4-5
|
|
||||||
- Allow urllib3 v1.23 (rhbz 1586311)
|
|
||||||
|
|
||||||
* 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
|
|
||||||
|
|
||||||
* Mon Dec 11 2017 Iryna Shcherbina <ishcherb@redhat.com> - 2.18.4-2
|
|
||||||
- Fix ambiguous Python 2 dependency declarations
|
|
||||||
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
|
|
||||||
|
|
||||||
* Fri Aug 18 2017 Jeremy Cline <jeremy@jcline.org> - 2.18.4-1
|
|
||||||
- Update to 2.18.4
|
|
||||||
|
|
||||||
* Wed Jul 26 2017 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 2.18.2-1
|
|
||||||
- Update to 2.18.2
|
|
||||||
|
|
||||||
* Tue Jun 20 2017 Jeremy Cline <jeremy@jcline.org> - 2.18.1-2
|
|
||||||
- Drop the dependency on certifi in setup.py
|
|
||||||
|
|
||||||
* Mon Jun 19 2017 Jeremy Cline <jeremy@jcline.org> - 2.18.1-1
|
|
||||||
- Update to 2.18.1 (#1449432)
|
|
||||||
- Remove tests that require non-local network (#1450608)
|
|
||||||
|
|
||||||
* Wed May 17 2017 Jeremy Cline <jeremy@jcline.org> - 2.14.2-1
|
|
||||||
- Update to 2.14.2 (#1449432)
|
|
||||||
- Switch to autosetup to apply patches
|
|
||||||
|
|
||||||
* Sun May 14 2017 Stephen Gallagher <sgallagh@redhat.com> - 2.13.0-2
|
|
||||||
- Don't run tests when building as a module
|
|
||||||
|
|
||||||
* Thu Feb 09 2017 Jeremy Cline <jeremy@jcline.org> - 2.13.0-1
|
|
||||||
- Update to 2.13.0 (#1418138)
|
|
||||||
|
|
||||||
* Fri Dec 30 2016 Adam Williamson <awilliam@redhat.com> - 2.12.4-3
|
|
||||||
- Include and enable tests (now python-pytest-httpbin is packaged)
|
|
||||||
|
|
||||||
* Wed Dec 21 2016 Kevin Fenzi <kevin@scrye.com> - 2.12.4-2
|
|
||||||
- Rebuild for Python 3.6 again.
|
|
||||||
|
|
||||||
* Tue Dec 20 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.4-1
|
|
||||||
- Update to 2.12.4. Fixes #1404680
|
|
||||||
|
|
||||||
* Tue Dec 13 2016 Stratakis Charalampos <cstratak@redhat.com> - 2.12.3-2
|
|
||||||
- Rebuild for Python 3.6
|
|
||||||
|
|
||||||
* Thu Dec 01 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.3-1
|
|
||||||
- Update to 2.12.3. Fixes #1400601
|
|
||||||
|
|
||||||
* Wed Nov 30 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.2-1
|
|
||||||
- Update to 2.12.2
|
|
||||||
|
|
||||||
* Wed Nov 23 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.1-2
|
|
||||||
- Backport #3713. Fixes #1397149
|
|
||||||
|
|
||||||
* Thu Nov 17 2016 Jeremy Cline <jeremy@jcline.org> - 2.12.1-1
|
|
||||||
- Update to 2.12.1. Fixes #1395469
|
|
||||||
- Unbundle idna, a new upstream dependency
|
|
||||||
|
|
||||||
* Sat Aug 27 2016 Kevin Fenzi <kevin@scrye.com> - 2.11.1-1
|
|
||||||
- Update to 2.11.1. Fixes #1370814
|
|
||||||
|
|
||||||
* Wed Aug 10 2016 Kevin Fenzi <kevin@scrye.com> - 2.11.0-1
|
|
||||||
- Update to 2.11.0. Fixes #1365332
|
|
||||||
|
|
||||||
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.10.0-4
|
|
||||||
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
|
|
||||||
|
|
||||||
* Fri Jul 15 2016 Ralph Bean <rbean@redhat.com> - 2.10.0-3
|
|
||||||
- Update python2 packaging.
|
|
||||||
|
|
||||||
* Thu Jun 02 2016 Ralph Bean <rbean@redhat.com> - 2.10.0-2
|
|
||||||
- Fix python2 subpackage to comply with guidelines.
|
|
||||||
|
|
||||||
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.1-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Dec 21 2015 Ralph Bean <rbean@redhat.com> - 2.9.1-1
|
|
||||||
- new version
|
|
||||||
|
|
||||||
* Fri Dec 18 2015 Ralph Bean <rbean@redhat.com> - 2.9.0-1
|
|
||||||
- new version
|
|
||||||
|
|
||||||
* Mon Dec 14 2015 Ralph Bean <rbean@redhat.com> - 2.8.1-1
|
|
||||||
- Latest upstream.
|
|
||||||
- Bump hard dep on urllib3 to 1.12.
|
|
||||||
|
|
||||||
* Mon Nov 02 2015 Robert Kuska <rkuska@redhat.com> - 2.7.0-8
|
|
||||||
- Rebuilt for Python3.5 rebuild
|
|
||||||
|
|
||||||
* Sat Oct 10 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-7
|
|
||||||
- Tell setuptools about what version of urllib3 we're unbundling
|
|
||||||
for https://github.com/kennethreitz/requests/issues/2816
|
|
||||||
|
|
||||||
* Thu Sep 17 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-6
|
|
||||||
- Replace the provides macro with a plain provides field for now until we can
|
|
||||||
re-organize this package into two different subpackages.
|
|
||||||
|
|
||||||
* Thu Sep 17 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-5
|
|
||||||
- Remove 'provides: python2-requests' from the python3 subpackage, obviously.
|
|
||||||
|
|
||||||
* Tue Sep 15 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-4
|
|
||||||
- Employ %%python_provides macro to provide python2-requests.
|
|
||||||
|
|
||||||
* Fri Sep 04 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-3
|
|
||||||
- Lock down the python-urllib3 version to the specific version we unbundled.
|
|
||||||
https://bugzilla.redhat.com/show_bug.cgi?id=1253823
|
|
||||||
|
|
||||||
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon May 04 2015 Ralph Bean <rbean@redhat.com> - 2.7.0-1
|
|
||||||
- new version
|
|
||||||
|
|
||||||
* Wed Apr 29 2015 Ralph Bean <rbean@redhat.com> - 2.6.2-1
|
|
||||||
- new version
|
|
||||||
|
|
||||||
* Thu Apr 23 2015 Ralph Bean <rbean@redhat.com> - 2.6.1-1
|
|
||||||
- new version
|
|
||||||
|
|
||||||
* Wed Apr 22 2015 Ralph Bean <rbean@redhat.com> - 2.6.0-1
|
|
||||||
- new version
|
|
||||||
- Remove patch for CVE-2015-2296, now included in the upstream release.
|
|
||||||
|
|
||||||
* Mon Mar 16 2015 Ralph Bean <rbean@redhat.com> - 2.5.3-2
|
|
||||||
- Backport fix for CVE-2015-2296.
|
|
||||||
|
|
||||||
* Thu Feb 26 2015 Ralph Bean <rbean@redhat.com> - 2.5.3-1
|
|
||||||
- new version
|
|
||||||
|
|
||||||
* Wed Feb 18 2015 Ralph Bean <rbean@redhat.com> - 2.5.1-1
|
|
||||||
- new version
|
|
||||||
|
|
||||||
* Tue Dec 16 2014 Ralph Bean <rbean@redhat.com> - 2.5.0-3
|
|
||||||
- Pin python-urllib3 requirement at 1.10.
|
|
||||||
- Fix requirement pinning syntax.
|
|
||||||
|
|
||||||
* Thu Dec 11 2014 Ralph Bean <rbean@redhat.com> - 2.5.0-2
|
|
||||||
- Do the most basic of tests in the check section.
|
|
||||||
|
|
||||||
* Thu Dec 11 2014 Ralph Bean <rbean@redhat.com> - 2.5.0-1
|
|
||||||
- Latest upstream, 2.5.0 for #1171068
|
|
||||||
|
|
||||||
* Wed Nov 05 2014 Ralph Bean <rbean@redhat.com> - 2.4.3-1
|
|
||||||
- Latest upstream, 2.4.3 for #1136283
|
|
||||||
|
|
||||||
* Wed Nov 05 2014 Ralph Bean <rbean@redhat.com> - 2.3.0-4
|
|
||||||
- Re-do unbundling by symlinking system libs into the requests/packages/ dir.
|
|
||||||
|
|
||||||
* Sun Aug 3 2014 Tom Callaway <spot@fedoraproject.org> - 2.3.0-3
|
|
||||||
- fix license handling
|
|
||||||
|
|
||||||
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
||||||
|
|
||||||
* Thu May 29 2014 Arun S A G <sagarun@gmail.com> - 2.3.0-1
|
|
||||||
- Latest upstream
|
|
||||||
|
|
||||||
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 2.0.0-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
|
|
||||||
|
|
||||||
* Wed Sep 25 2013 Ralph Bean <rbean@redhat.com> - 2.0.0-1
|
|
||||||
- Latest upstream.
|
|
||||||
- Add doc macro to the python3 files section.
|
|
||||||
- Require python-urllib3 greater than or at 1.7.1.
|
|
||||||
|
|
||||||
* Mon Aug 26 2013 Rex Dieter <rdieter@fedoraproject.org> 1.2.3-5
|
|
||||||
- fix versioned dep on python-urllib3
|
|
||||||
|
|
||||||
* Mon Aug 26 2013 Ralph Bean <rbean@redhat.com> - 1.2.3-4
|
|
||||||
- Explicitly versioned the requirements on python-urllib3.
|
|
||||||
|
|
||||||
* Thu Aug 22 2013 Ralph Bean <rbean@redhat.com> - 1.2.3-3
|
|
||||||
- Release bump for a coupled update with python-urllib3.
|
|
||||||
|
|
||||||
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.3-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Jul 01 2013 Ralph Bean <rbean@redhat.com> - 1.2.3-1
|
|
||||||
- Latest upstream.
|
|
||||||
- Fixed bogus date in changelog.
|
|
||||||
|
|
||||||
* Tue Jun 11 2013 Ralph Bean <rbean@redhat.com> - 1.1.0-4
|
|
||||||
- Correct a rhel conditional on python-ordereddict
|
|
||||||
|
|
||||||
* Thu Feb 28 2013 Ralph Bean <rbean@redhat.com> - 1.1.0-3
|
|
||||||
- Unbundled python-urllib3. Using system python-urllib3 now.
|
|
||||||
- Conditionally include python-ordereddict for el6.
|
|
||||||
|
|
||||||
* Wed Feb 27 2013 Ralph Bean <rbean@redhat.com> - 1.1.0-2
|
|
||||||
- Unbundled python-charade/chardet. Using system python-chardet now.
|
|
||||||
- Removed deprecated comments and actions against oauthlib unbundling.
|
|
||||||
Those are no longer necessary in 1.1.0.
|
|
||||||
- Added links to bz tickets over Patch declarations.
|
|
||||||
|
|
||||||
* Tue Feb 26 2013 Ralph Bean <rbean@redhat.com> - 1.1.0-1
|
|
||||||
- Latest upstream.
|
|
||||||
- Relicense to ASL 2.0 with upstream.
|
|
||||||
- Removed cookie handling patch (fixed in upstream tarball).
|
|
||||||
- Updated cert unbundling patch to match upstream.
|
|
||||||
- Added check section, but left it commented out for koji.
|
|
||||||
|
|
||||||
* Fri Feb 8 2013 Toshio Kuratomi <toshio@fedoraproject.org> - 0.14.1-4
|
|
||||||
- Let brp_python_bytecompile run again, take care of the non-python{2,3} modules
|
|
||||||
by removing them from the python{,3}-requests package that they did not belong
|
|
||||||
in.
|
|
||||||
- Use the certificates in the ca-certificates package instead of the bundled one
|
|
||||||
+ https://bugzilla.redhat.com/show_bug.cgi?id=904614
|
|
||||||
- Fix a problem with cookie handling
|
|
||||||
+ https://bugzilla.redhat.com/show_bug.cgi?id=906924
|
|
||||||
|
|
||||||
* Mon Oct 22 2012 Arun S A G <sagarun@gmail.com> 0.14.1-1
|
|
||||||
- Updated to latest upstream release
|
|
||||||
|
|
||||||
* Sun Jun 10 2012 Arun S A G <sagarun@gmail.com> 0.13.1-1
|
|
||||||
- Updated to latest upstream release 0.13.1
|
|
||||||
- Use system provided ca-certificates
|
|
||||||
- No more async requests use grrequests https://github.com/kennethreitz/grequests
|
|
||||||
- Remove gevent as it is no longer required by requests
|
|
||||||
|
|
||||||
* Sun Apr 01 2012 Arun S A G <sagarun@gmail.com> 0.11.1-1
|
|
||||||
- Updated to upstream release 0.11.1
|
|
||||||
|
|
||||||
* Thu Mar 29 2012 Arun S A G <sagarun@gmail.com> 0.10.6-3
|
|
||||||
- Support building package for EL6
|
|
||||||
|
|
||||||
* Tue Mar 27 2012 Rex Dieter <rdieter@fedoraproject.org> 0.10.6-2
|
|
||||||
- +python3-requests pkg
|
|
||||||
|
|
||||||
* Sat Mar 3 2012 Arun SAG <sagarun@gmail.com> - 0.10.6-1
|
|
||||||
- Updated to new upstream version
|
|
||||||
|
|
||||||
* Sat Jan 21 2012 Arun SAG <sagarun@gmail.com> - 0.9.3-1
|
|
||||||
- Updated to new upstream version 0.9.3
|
|
||||||
- Include python-gevent as a dependency for requests.async
|
|
||||||
- Clean up shebangs in requests/setup.py,test_requests.py and test_requests_ext.py
|
|
||||||
|
|
||||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.2-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sun Nov 27 2011 Arun SAG <sagarun@gmail.com> - 0.8.2-1
|
|
||||||
- New upstream version
|
|
||||||
- keep alive support
|
|
||||||
- complete removal of cookiejar and urllib2
|
|
||||||
|
|
||||||
* Thu Nov 10 2011 Arun SAG <sagarun@gmail.com> - 0.7.6-1
|
|
||||||
- Updated to new upstream release 0.7.6
|
|
||||||
|
|
||||||
* Thu Oct 20 2011 Arun SAG <sagarun@gmail.com> - 0.6.6-1
|
|
||||||
- Updated to version 0.6.6
|
|
||||||
|
|
||||||
* Fri Aug 26 2011 Arun SAG <sagarun@gmail.com> - 0.6.1-1
|
|
||||||
- Updated to version 0.6.1
|
|
||||||
|
|
||||||
* Sat Aug 20 2011 Arun SAG <sagarun@gmail.com> - 0.6.0-1
|
|
||||||
- Updated to latest version 0.6.0
|
|
||||||
|
|
||||||
* Mon Aug 15 2011 Arun SAG <sagarun@gmail.com> - 0.5.1-2
|
|
||||||
- Remove OPT_FLAGS from build section since it is a noarch package
|
|
||||||
- Fix use of mixed tabs and space
|
|
||||||
- Remove extra space around the word cumbersome in description
|
|
||||||
|
|
||||||
* Sun Aug 14 2011 Arun SAG <sagarun@gmail.com> - 0.5.1-1
|
|
||||||
- Initial package
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
--- requests-2.12.4/tests/testserver/server.py 2016-12-21 11:31:56.000000000 -0800
|
|
||||||
+++ requests-2.12.4/tests/testserver/server.py.new 2016-12-30 10:40:06.085995065 -0800
|
|
||||||
@@ -27,7 +27,7 @@
|
|
||||||
"""Dummy server using for unit testing"""
|
|
||||||
WAIT_EVENT_TIMEOUT = 5
|
|
||||||
|
|
||||||
- def __init__(self, handler=None, host='localhost', port=0, requests_to_handle=1, wait_to_close_event=None):
|
|
||||||
+ def __init__(self, handler=None, host='127.0.0.1', port=0, requests_to_handle=1, wait_to_close_event=None):
|
|
||||||
super(Server, self).__init__()
|
|
||||||
|
|
||||||
self.handler = handler or consume_socket_content
|
|
||||||
|
|
@ -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)
|
|
||||||
3
sources
3
sources
|
|
@ -1,2 +1 @@
|
||||||
SHA512 (requests-v2.20.0.tar.gz) = 766c69d1778e7286232fcd750842e89cd9bb6637076e80fe95fb67f3ccb14049bf74a533de91ef9451ac6f397ad0a6d148eb444009f501178138cdeffc5ee7c4
|
SHA512 (requests-v2.32.5.tar.gz) = ca73dcaec9a12ecd7d16d5f30a9213fc520b9b9d659bd6d35e6f05f7b823e1bf6209c7ae48d5e301974794d92dbc8facb937ce99e22180b28dd80f6f2afa13ae
|
||||||
SHA512 (requests-v2.21.0.tar.gz) = 934c329e6631ec6089577c49651b73265f0c3f0829b9151e1463dea905f35820a03ec3b0ee6a2ab2292d213b715f0b2348110392d60f55ea1cbe4b24fca4f890
|
|
||||||
|
|
|
||||||
277
support_IPv6_CIDR_in_no_proxy.patch
Normal file
277
support_IPv6_CIDR_in_no_proxy.patch
Normal file
|
|
@ -0,0 +1,277 @@
|
||||||
|
From 91526670ad66e83e799459cb23b031b88bb680b4 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Derek Higgins <derekh@redhat.com>
|
||||||
|
Date: Thu, 30 May 2024 11:15:18 +0200
|
||||||
|
Subject: [PATCH 2/2] Add ipv6 support to should_bypass_proxies
|
||||||
|
|
||||||
|
Add support to should_bypass_proxies to support
|
||||||
|
IPv6 ipaddresses and CIDRs in no_proxy. Includes
|
||||||
|
adding IPv6 support to various other helper functions.
|
||||||
|
|
||||||
|
Co-authored-by: Lumir Balhar <lbalhar@redhat.com>
|
||||||
|
---
|
||||||
|
src/requests/utils.py | 83 ++++++++++++++++++++++++++++++++++++-------
|
||||||
|
tests/test_utils.py | 66 +++++++++++++++++++++++++++++++---
|
||||||
|
2 files changed, 132 insertions(+), 17 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/requests/utils.py b/src/requests/utils.py
|
||||||
|
index ae6c42f..0363698 100644
|
||||||
|
--- a/src/requests/utils.py
|
||||||
|
+++ b/src/requests/utils.py
|
||||||
|
@@ -679,18 +679,46 @@ def requote_uri(uri):
|
||||||
|
return quote(uri, safe=safe_without_percent)
|
||||||
|
|
||||||
|
|
||||||
|
+def _get_mask_bits(mask, totalbits=32):
|
||||||
|
+ """Converts a mask from /xx format to a int
|
||||||
|
+ to be used as a mask for IP's in int format
|
||||||
|
+
|
||||||
|
+ Example: if mask is 24 function returns 0xFFFFFF00
|
||||||
|
+ if mask is 24 and totalbits=128 function
|
||||||
|
+ returns 0xFFFFFF00000000000000000000000000
|
||||||
|
+
|
||||||
|
+ :rtype: int
|
||||||
|
+ """
|
||||||
|
+ bits = ((1 << mask) - 1) << (totalbits - mask)
|
||||||
|
+ return bits
|
||||||
|
+
|
||||||
|
+
|
||||||
|
def address_in_network(ip, net):
|
||||||
|
"""This function allows you to check if an IP belongs to a network subnet
|
||||||
|
|
||||||
|
Example: returns True if ip = 192.168.1.1 and net = 192.168.1.0/24
|
||||||
|
returns False if ip = 192.168.1.1 and net = 192.168.100.0/24
|
||||||
|
+ returns True if ip = 1:2:3:4::1 and net = 1:2:3:4::/64
|
||||||
|
|
||||||
|
:rtype: bool
|
||||||
|
"""
|
||||||
|
- ipaddr = struct.unpack("=L", socket.inet_aton(ip))[0]
|
||||||
|
netaddr, bits = net.split("/")
|
||||||
|
- netmask = struct.unpack("=L", socket.inet_aton(dotted_netmask(int(bits))))[0]
|
||||||
|
- network = struct.unpack("=L", socket.inet_aton(netaddr))[0] & netmask
|
||||||
|
+ if is_ipv4_address(ip) and is_ipv4_address(netaddr):
|
||||||
|
+ ipaddr = struct.unpack(">L", socket.inet_aton(ip))[0]
|
||||||
|
+ netmask = _get_mask_bits(int(bits))
|
||||||
|
+ network = struct.unpack(">L", socket.inet_aton(netaddr))[0]
|
||||||
|
+ elif is_ipv6_address(ip) and is_ipv6_address(netaddr):
|
||||||
|
+ ipaddr_msb, ipaddr_lsb = struct.unpack(
|
||||||
|
+ ">QQ", socket.inet_pton(socket.AF_INET6, ip)
|
||||||
|
+ )
|
||||||
|
+ ipaddr = (ipaddr_msb << 64) ^ ipaddr_lsb
|
||||||
|
+ netmask = _get_mask_bits(int(bits), 128)
|
||||||
|
+ network_msb, network_lsb = struct.unpack(
|
||||||
|
+ ">QQ", socket.inet_pton(socket.AF_INET6, netaddr)
|
||||||
|
+ )
|
||||||
|
+ network = (network_msb << 64) ^ network_lsb
|
||||||
|
+ else:
|
||||||
|
+ return False
|
||||||
|
return (ipaddr & netmask) == (network & netmask)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -710,12 +738,39 @@ def is_ipv4_address(string_ip):
|
||||||
|
:rtype: bool
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
- socket.inet_aton(string_ip)
|
||||||
|
+ socket.inet_pton(socket.AF_INET, string_ip)
|
||||||
|
+ except OSError:
|
||||||
|
+ return False
|
||||||
|
+ return True
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+def is_ipv6_address(string_ip):
|
||||||
|
+ """
|
||||||
|
+ :rtype: bool
|
||||||
|
+ """
|
||||||
|
+ try:
|
||||||
|
+ socket.inet_pton(socket.AF_INET6, string_ip)
|
||||||
|
except OSError:
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
+def compare_ips(a, b):
|
||||||
|
+ """
|
||||||
|
+ Compare 2 IP's, uses socket.inet_pton to normalize IPv6 IPs
|
||||||
|
+
|
||||||
|
+ :rtype: bool
|
||||||
|
+ """
|
||||||
|
+ if a == b:
|
||||||
|
+ return True
|
||||||
|
+ try:
|
||||||
|
+ return socket.inet_pton(socket.AF_INET6, a) == socket.inet_pton(
|
||||||
|
+ socket.AF_INET6, b
|
||||||
|
+ )
|
||||||
|
+ except OSError:
|
||||||
|
+ return False
|
||||||
|
+
|
||||||
|
+
|
||||||
|
def is_valid_cidr(string_network):
|
||||||
|
"""
|
||||||
|
Very simple check of the cidr format in no_proxy variable.
|
||||||
|
@@ -723,17 +778,19 @@ def is_valid_cidr(string_network):
|
||||||
|
:rtype: bool
|
||||||
|
"""
|
||||||
|
if string_network.count("/") == 1:
|
||||||
|
+ address, mask = string_network.split("/")
|
||||||
|
try:
|
||||||
|
- mask = int(string_network.split("/")[1])
|
||||||
|
+ mask = int(mask)
|
||||||
|
except ValueError:
|
||||||
|
return False
|
||||||
|
|
||||||
|
- if mask < 1 or mask > 32:
|
||||||
|
- return False
|
||||||
|
-
|
||||||
|
- try:
|
||||||
|
- socket.inet_aton(string_network.split("/")[0])
|
||||||
|
- except OSError:
|
||||||
|
+ if is_ipv4_address(address):
|
||||||
|
+ if mask < 1 or mask > 32:
|
||||||
|
+ return False
|
||||||
|
+ elif is_ipv6_address(address):
|
||||||
|
+ if mask < 1 or mask > 128:
|
||||||
|
+ return False
|
||||||
|
+ else:
|
||||||
|
return False
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
@@ -790,12 +847,12 @@ def should_bypass_proxies(url, no_proxy):
|
||||||
|
# the end of the hostname, both with and without the port.
|
||||||
|
no_proxy = (host for host in no_proxy.replace(" ", "").split(",") if host)
|
||||||
|
|
||||||
|
- if is_ipv4_address(parsed.hostname):
|
||||||
|
+ if is_ipv4_address(parsed.hostname) or is_ipv6_address(parsed.hostname):
|
||||||
|
for proxy_ip in no_proxy:
|
||||||
|
if is_valid_cidr(proxy_ip):
|
||||||
|
if address_in_network(parsed.hostname, proxy_ip):
|
||||||
|
return True
|
||||||
|
- elif parsed.hostname == proxy_ip:
|
||||||
|
+ elif compare_ips(parsed.hostname, proxy_ip):
|
||||||
|
# If no_proxy ip was defined in plain IP notation instead of cidr notation &
|
||||||
|
# matches the IP of the index
|
||||||
|
return True
|
||||||
|
diff --git a/tests/test_utils.py b/tests/test_utils.py
|
||||||
|
index 5e9b56e..befbb46 100644
|
||||||
|
--- a/tests/test_utils.py
|
||||||
|
+++ b/tests/test_utils.py
|
||||||
|
@@ -14,9 +14,11 @@ from requests._internal_utils import unicode_is_ascii
|
||||||
|
from requests.cookies import RequestsCookieJar
|
||||||
|
from requests.structures import CaseInsensitiveDict
|
||||||
|
from requests.utils import (
|
||||||
|
+ _get_mask_bits,
|
||||||
|
_parse_content_type_header,
|
||||||
|
add_dict_to_cookiejar,
|
||||||
|
address_in_network,
|
||||||
|
+ compare_ips,
|
||||||
|
dotted_netmask,
|
||||||
|
extract_zipped_paths,
|
||||||
|
get_auth_from_url,
|
||||||
|
@@ -263,8 +265,15 @@ class TestIsIPv4Address:
|
||||||
|
|
||||||
|
|
||||||
|
class TestIsValidCIDR:
|
||||||
|
- def test_valid(self):
|
||||||
|
- assert is_valid_cidr("192.168.1.0/24")
|
||||||
|
+ @pytest.mark.parametrize(
|
||||||
|
+ "value",
|
||||||
|
+ (
|
||||||
|
+ "192.168.1.0/24",
|
||||||
|
+ "1:2:3:4::/64",
|
||||||
|
+ ),
|
||||||
|
+ )
|
||||||
|
+ def test_valid(self, value):
|
||||||
|
+ assert is_valid_cidr(value)
|
||||||
|
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
"value",
|
||||||
|
@@ -274,6 +283,11 @@ class TestIsValidCIDR:
|
||||||
|
"192.168.1.0/128",
|
||||||
|
"192.168.1.0/-1",
|
||||||
|
"192.168.1.999/24",
|
||||||
|
+ "1:2:3:4::1",
|
||||||
|
+ "1:2:3:4::/a",
|
||||||
|
+ "1:2:3:4::0/321",
|
||||||
|
+ "1:2:3:4::/-1",
|
||||||
|
+ "1:2:3:4::12211/64",
|
||||||
|
),
|
||||||
|
)
|
||||||
|
def test_invalid(self, value):
|
||||||
|
@@ -287,6 +301,12 @@ class TestAddressInNetwork:
|
||||||
|
def test_invalid(self):
|
||||||
|
assert not address_in_network("172.16.0.1", "192.168.1.0/24")
|
||||||
|
|
||||||
|
+ def test_valid_v6(self):
|
||||||
|
+ assert address_in_network("1:2:3:4::1111", "1:2:3:4::/64")
|
||||||
|
+
|
||||||
|
+ def test_invalid_v6(self):
|
||||||
|
+ assert not address_in_network("1:2:3:4:1111", "1:2:3:4::/124")
|
||||||
|
+
|
||||||
|
|
||||||
|
class TestGuessFilename:
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
@@ -722,6 +742,11 @@ def test_urldefragauth(url, expected):
|
||||||
|
("http://172.16.1.12:5000/", False),
|
||||||
|
("http://google.com:5000/v1.0/", False),
|
||||||
|
("file:///some/path/on/disk", True),
|
||||||
|
+ ("http://[1:2:3:4:5:6:7:8]:5000/", True),
|
||||||
|
+ ("http://[1:2:3:4::1]/", True),
|
||||||
|
+ ("http://[1:2:3:9::1]/", True),
|
||||||
|
+ ("http://[1:2:3:9:0:0:0:1]/", True),
|
||||||
|
+ ("http://[1:2:3:9::2]/", False),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
def test_should_bypass_proxies(url, expected, monkeypatch):
|
||||||
|
@@ -730,11 +755,11 @@ def test_should_bypass_proxies(url, expected, monkeypatch):
|
||||||
|
"""
|
||||||
|
monkeypatch.setenv(
|
||||||
|
"no_proxy",
|
||||||
|
- "192.168.0.0/24,127.0.0.1,localhost.localdomain,172.16.1.1, google.com:6000",
|
||||||
|
+ "192.168.0.0/24,127.0.0.1,localhost.localdomain,1:2:3:4::/64,1:2:3:9::1,172.16.1.1, google.com:6000",
|
||||||
|
)
|
||||||
|
monkeypatch.setenv(
|
||||||
|
"NO_PROXY",
|
||||||
|
- "192.168.0.0/24,127.0.0.1,localhost.localdomain,172.16.1.1, google.com:6000",
|
||||||
|
+ "192.168.0.0/24,127.0.0.1,localhost.localdomain,1:2:3:4::/64,1:2:3:9::1,172.16.1.1, google.com:6000",
|
||||||
|
)
|
||||||
|
assert should_bypass_proxies(url, no_proxy=None) == expected
|
||||||
|
|
||||||
|
@@ -956,3 +981,36 @@ def test_should_bypass_proxies_win_registry_ProxyOverride_value(monkeypatch):
|
||||||
|
monkeypatch.setattr(winreg, "OpenKey", OpenKey)
|
||||||
|
monkeypatch.setattr(winreg, "QueryValueEx", QueryValueEx)
|
||||||
|
assert should_bypass_proxies("http://example.com/", None) is False
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+@pytest.mark.parametrize(
|
||||||
|
+ "mask, totalbits, maskbits",
|
||||||
|
+ (
|
||||||
|
+ (24, None, 0xFFFFFF00),
|
||||||
|
+ (31, None, 0xFFFFFFFE),
|
||||||
|
+ (0, None, 0x0),
|
||||||
|
+ (4, 4, 0xF),
|
||||||
|
+ (24, 128, 0xFFFFFF00000000000000000000000000),
|
||||||
|
+ ),
|
||||||
|
+)
|
||||||
|
+def test__get_mask_bits(mask, totalbits, maskbits):
|
||||||
|
+ args = {"mask": mask}
|
||||||
|
+ if totalbits:
|
||||||
|
+ args["totalbits"] = totalbits
|
||||||
|
+ assert _get_mask_bits(**args) == maskbits
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+@pytest.mark.parametrize(
|
||||||
|
+ "a, b, expected",
|
||||||
|
+ (
|
||||||
|
+ ("1.2.3.4", "1.2.3.4", True),
|
||||||
|
+ ("1.2.3.4", "2.2.3.4", False),
|
||||||
|
+ ("1::4", "1.2.3.4", False),
|
||||||
|
+ ("1::4", "1::4", True),
|
||||||
|
+ ("1::4", "1:0:0:0:0:0:0:4", True),
|
||||||
|
+ ("1::4", "1:0:0:0:0:0::4", True),
|
||||||
|
+ ("1::4", "1:0:0:0:0:0:1:4", False),
|
||||||
|
+ ),
|
||||||
|
+)
|
||||||
|
+def test_compare_ips(a, b, expected):
|
||||||
|
+ assert compare_ips(a, b) == expected
|
||||||
|
--
|
||||||
|
2.45.1
|
||||||
|
|
||||||
59
system-certs.patch
Normal file
59
system-certs.patch
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
From e0ce6c20989a205489df47f8abaff5369ed588ca Mon Sep 17 00:00:00 2001
|
||||||
|
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
|
||||||
|
Date: Thu, 30 May 2024 11:10:29 +0200
|
||||||
|
Subject: [PATCH] system certs
|
||||||
|
|
||||||
|
Co-authored-by: Lumir Balhar <lbalhar@redhat.com>
|
||||||
|
---
|
||||||
|
setup.cfg | 1 -
|
||||||
|
setup.py | 1 -
|
||||||
|
src/requests/certs.py | 8 +++++++-
|
||||||
|
3 files changed, 7 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/setup.cfg b/setup.cfg
|
||||||
|
index 8d44e0e..fa10a53 100644
|
||||||
|
--- a/setup.cfg
|
||||||
|
+++ b/setup.cfg
|
||||||
|
@@ -4,7 +4,6 @@ provides-extra =
|
||||||
|
socks
|
||||||
|
use_chardet_on_py3
|
||||||
|
requires-dist =
|
||||||
|
- certifi>=2017.4.17
|
||||||
|
charset_normalizer>=2,<4
|
||||||
|
idna>=2.5,<4
|
||||||
|
urllib3>=1.21.1,<3
|
||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
index 7d9b52b..17da826 100755
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -37,7 +37,6 @@ requires = [
|
||||||
|
"charset_normalizer>=2,<4",
|
||||||
|
"idna>=2.5,<4",
|
||||||
|
"urllib3>=1.21.1,<3",
|
||||||
|
- "certifi>=2017.4.17",
|
||||||
|
]
|
||||||
|
test_requirements = [
|
||||||
|
"pytest-httpbin==2.1.0",
|
||||||
|
diff --git a/src/requests/certs.py b/src/requests/certs.py
|
||||||
|
index be422c3..9aee713 100644
|
||||||
|
--- a/src/requests/certs.py
|
||||||
|
+++ b/src/requests/certs.py
|
||||||
|
@@ -10,8 +10,14 @@ only one — the one from the certifi package.
|
||||||
|
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
|
||||||
|
packaged CA bundle.
|
||||||
|
+
|
||||||
|
+This Fedora-patched package returns "/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem" provided
|
||||||
|
+by the ca-certificates RPM package.
|
||||||
|
"""
|
||||||
|
-from certifi import where
|
||||||
|
+
|
||||||
|
+def where():
|
||||||
|
+ """Return the absolute path to the system CA bundle."""
|
||||||
|
+ return '/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem'
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
print(where())
|
||||||
|
--
|
||||||
|
2.50.0
|
||||||
|
|
||||||
7
tests/ipv6-noproxy-cidr/main.fmf
Normal file
7
tests/ipv6-noproxy-cidr/main.fmf
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
require:
|
||||||
|
- nmap-ncat
|
||||||
|
- python3
|
||||||
|
- python3-requests
|
||||||
|
|
||||||
|
test: "${PYTHON:-python3} repro.py"
|
||||||
|
tty: "true"
|
||||||
74
tests/ipv6-noproxy-cidr/repro.py
Normal file
74
tests/ipv6-noproxy-cidr/repro.py
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
import subprocess
|
||||||
|
import requests
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
import atexit
|
||||||
|
|
||||||
|
subprocesses = []
|
||||||
|
|
||||||
|
python = os.environ.get("PYTHON","python3")
|
||||||
|
server_url = os.environ.get("SERVER_URL", None)
|
||||||
|
testing_no_proxy = os.environ.get("TESTING_NO_PROXY", None)
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
@atexit.register
|
||||||
|
def cleanup():
|
||||||
|
print("Cleaning up subprocesses")
|
||||||
|
for process in subprocesses:
|
||||||
|
process.terminate()
|
||||||
|
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
|
for process in subprocesses:
|
||||||
|
process.wait()
|
||||||
|
|
||||||
|
# Part one, assert that everything works
|
||||||
|
if server_url is None:
|
||||||
|
print("starting server")
|
||||||
|
p = subprocess.Popen([python, "server.py"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
subprocesses.append(p)
|
||||||
|
time.sleep(1)
|
||||||
|
server_url = "http://[::1]:8888"
|
||||||
|
no_proxy = "::1/128"
|
||||||
|
else:
|
||||||
|
print(f"using provided {server_url} as server")
|
||||||
|
print(f"using provided {testing_no_proxy} as NO_PROXY value")
|
||||||
|
assert testing_no_proxy, "TESTING_NO_PROXY envar missing"
|
||||||
|
|
||||||
|
# Send request and check the response
|
||||||
|
|
||||||
|
print("sending first request")
|
||||||
|
assert requests.get(server_url, timeout=2).text.startswith("Hello")
|
||||||
|
|
||||||
|
|
||||||
|
# Part two, dummy proxy causes timeout, that's fine
|
||||||
|
|
||||||
|
# Start proxy
|
||||||
|
print("starting proxy")
|
||||||
|
p = subprocess.Popen(["nc", "-k", "-l", "10000"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
subprocesses.append(p)
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
|
# Set proxy to environment
|
||||||
|
os.environ["HTTP_PROXY"] = "http://127.0.0.1:10000"
|
||||||
|
|
||||||
|
# Send request, expect timeout because proxy is dummy and do not respond
|
||||||
|
print("Sending request via proxy")
|
||||||
|
try:
|
||||||
|
requests.get(server_url, timeout=2)
|
||||||
|
except requests.exceptions.ReadTimeout:
|
||||||
|
print("timeout is fine, expected")
|
||||||
|
pass
|
||||||
|
|
||||||
|
# Part three, NO_PROXY bypass the proxy and the request should work as before
|
||||||
|
|
||||||
|
os.environ["NO_PROXY"] = testing_no_proxy or no_proxy
|
||||||
|
|
||||||
|
print("sending last request")
|
||||||
|
try:
|
||||||
|
assert requests.get(server_url, timeout=2).text.startswith("Hello")
|
||||||
|
except requests.exceptions.ReadTimeout:
|
||||||
|
print("PROBLEM - the last request timed out, NO_PROXY setting does not work!")
|
||||||
|
raise SystemExit(1)
|
||||||
|
else:
|
||||||
|
print("OK - NO_PROXY setting works fine - the last request bypassed proxy")
|
||||||
25
tests/ipv6-noproxy-cidr/server.py
Normal file
25
tests/ipv6-noproxy-cidr/server.py
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
from http.server import SimpleHTTPRequestHandler, HTTPServer
|
||||||
|
import socket
|
||||||
|
import sys
|
||||||
|
class IPv6OnlyHandler(SimpleHTTPRequestHandler):
|
||||||
|
def do_GET(self):
|
||||||
|
client_address = self.client_address[0]
|
||||||
|
# Check if the client address is an IPv6 address
|
||||||
|
if ":" in client_address:
|
||||||
|
self.send_response(200)
|
||||||
|
self.send_header('Content-type', 'text/plain')
|
||||||
|
self.end_headers()
|
||||||
|
self.wfile.write(b'Hello')
|
||||||
|
else:
|
||||||
|
# Raise a RuntimeError if the client address is an IPv4 address
|
||||||
|
raise SystemExit(f"IPv4 address ({client_address}) detected. Only IPv6 addresses are allowed.")
|
||||||
|
|
||||||
|
class HTTPServerV6(HTTPServer):
|
||||||
|
address_family = socket.AF_INET6
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
# Use IPv6 address and port 8080
|
||||||
|
server_address = ('::', 8888)
|
||||||
|
httpd = HTTPServerV6(server_address, IPv6OnlyHandler)
|
||||||
|
print('Server running on port 8888...')
|
||||||
|
httpd.serve_forever()
|
||||||
6
tests/smoke/main.fmf
Normal file
6
tests/smoke/main.fmf
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
summary: Basic sanity test for python-requests
|
||||||
|
test: ./runtest.sh
|
||||||
|
framework: beakerlib
|
||||||
|
require:
|
||||||
|
- python3-requests
|
||||||
|
duration: 5m
|
||||||
54
tests/smoke/runtest.sh
Executable file
54
tests/smoke/runtest.sh
Executable file
|
|
@ -0,0 +1,54 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# runtest.sh of /CoreOS/python-requests/Sanity/smoke
|
||||||
|
# Description: Basic sanity test for python-requests module.
|
||||||
|
# Author: Adam Kolar <akolar@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2013 Red Hat, Inc. All rights reserved.
|
||||||
|
#
|
||||||
|
# This copyrighted material is made available to anyone wishing
|
||||||
|
# to use, modify, copy, or redistribute it subject to the terms
|
||||||
|
# and conditions of the GNU General Public License version 2.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be
|
||||||
|
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE. See the GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public
|
||||||
|
# License along with this program; if not, write to the Free
|
||||||
|
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
# Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# Include Beaker environment
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
|
PACKAGES=${PACKAGES:-"python3-requests"}
|
||||||
|
|
||||||
|
PYTHON=${PYTHON:-"python"}
|
||||||
|
TEST="test.py"
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
rlPhaseStartSetup
|
||||||
|
rlAssertRpm --all
|
||||||
|
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||||
|
rlRun "cp $TEST $TmpDir"
|
||||||
|
rlRun "pushd $TmpDir"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest
|
||||||
|
rlRun "$PYTHON $TEST" 0 "Running sanity test for python requests"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun "popd"
|
||||||
|
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||||
|
rlPhaseEnd
|
||||||
|
rlJournalPrintText
|
||||||
|
rlJournalEnd
|
||||||
11
tests/smoke/test.py
Normal file
11
tests/smoke/test.py
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
import requests
|
||||||
|
from requests import *
|
||||||
|
|
||||||
|
class ExceptionRequests(Exception):
|
||||||
|
pass
|
||||||
|
|
||||||
|
if __name__=="__main__":
|
||||||
|
r=requests.get('https://redhat.com')
|
||||||
|
if r.status_code!=200 or \
|
||||||
|
not r.text or r.encoding.lower() != 'utf-8':
|
||||||
|
raise ExceptionRequests("Sanity error")
|
||||||
14
tests/upstream/main.fmf
Normal file
14
tests/upstream/main.fmf
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
summary: Runs upstream test suite
|
||||||
|
require:
|
||||||
|
- python3-requests
|
||||||
|
- python3-pip
|
||||||
|
- python3-pytest
|
||||||
|
- python3-cryptography
|
||||||
|
- python3-devel
|
||||||
|
- python3-httpbin
|
||||||
|
- rpm-build
|
||||||
|
- gcc
|
||||||
|
- gcc-c++
|
||||||
|
test: ./runtest.sh
|
||||||
|
framework: beakerlib
|
||||||
|
duration: 30m
|
||||||
80
tests/upstream/runtest.sh
Executable file
80
tests/upstream/runtest.sh
Executable file
|
|
@ -0,0 +1,80 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# runtest.sh of /CoreOS/python-requests/Sanity/upstream
|
||||||
|
# Description: Runs upstream test suite
|
||||||
|
# Author: Lukas Zachar <lzachar@redhat.com>
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
#
|
||||||
|
# Copyright (c) 2019 Red Hat, Inc.
|
||||||
|
#
|
||||||
|
# This copyrighted material is made available to anyone wishing
|
||||||
|
# to use, modify, copy, or redistribute it subject to the terms
|
||||||
|
# and conditions of the GNU General Public License version 2.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be
|
||||||
|
# useful, but WITHOUT ANY WARRANTY; without even the implied
|
||||||
|
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||||
|
# PURPOSE. See the GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public
|
||||||
|
# License along with this program; if not, write to the Free
|
||||||
|
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||||
|
# Boston, MA 02110-1301, USA.
|
||||||
|
#
|
||||||
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
# Include Beaker environment
|
||||||
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
|
PACKAGES="${PACKAGES:-python3-requests}"
|
||||||
|
PYTHON="${PYTHON:-python}"
|
||||||
|
|
||||||
|
rlJournalStart
|
||||||
|
rlPhaseStartSetup
|
||||||
|
rlAssertRpm --all
|
||||||
|
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
||||||
|
rlRun "pushd $TmpDir"
|
||||||
|
|
||||||
|
# So we can inject version of srpm
|
||||||
|
if [[ -z "$FORCE_SRPM" ]]; then
|
||||||
|
rlRun "rlFetchSrcForInstalled $(rpm --qf '%{name}' -qf $($PYTHON -c 'import requests;print(requests.__file__)'))"
|
||||||
|
else
|
||||||
|
rlRun "rlRpmDownload $FORCE_SRPM"
|
||||||
|
fi
|
||||||
|
rlRun "rpm -i --define '_topdir $TmpDir' --nodeps *rpm"
|
||||||
|
rlRun "rpmbuild -bp --define '_topdir $TmpDir' --nodeps $TmpDir/SPECS/*"
|
||||||
|
|
||||||
|
# Remove module from extracted sources so installed one is used
|
||||||
|
rlRun "rm -rf $TmpDir/BUILD/*requests*/requests*/src"
|
||||||
|
|
||||||
|
# pip-install libraries not in the repos
|
||||||
|
# pytest is installed in fmf requirement
|
||||||
|
rlRun "$PYTHON -m pip install pytest-mock==3.14.0 trustme==1.2.0 werkzeug==3.1.3 \
|
||||||
|
pytest-httpbin==2.1.0"
|
||||||
|
|
||||||
|
# Move to test dir, print what is there
|
||||||
|
rlRun "cd $(dirname $TmpDir/BUILD/*requests*/requests*/tests)"
|
||||||
|
rlRun "touch tests/requirements-dev.txt"
|
||||||
|
rlRun "find . -type f"
|
||||||
|
rlRun "yum repolist"
|
||||||
|
rlRun "$PYTHON -m pip list"
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartTest "$EXTRA_PARAMS"
|
||||||
|
# test_unicode_header_name hangs with urllib3 < 2
|
||||||
|
rlRun 'pytest -v -p no:warnings --junit-xml $TmpDir/result.xml -k "not test_use_proxy_from_environment and not test_unicode_header_name"'
|
||||||
|
|
||||||
|
rlAssertGrep '<testcase' $TmpDir/result.xml
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
# upload log if test failed
|
||||||
|
rlGetTestState || rlRun "rlFileSubmit $TmpDir/result.xml"
|
||||||
|
rlRun "popd"
|
||||||
|
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
||||||
|
rlPhaseEnd
|
||||||
|
rlJournalPrintText
|
||||||
|
rlJournalEnd
|
||||||
Loading…
Add table
Add a link
Reference in a new issue