Compare commits
6 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5172ae63e | ||
|
|
d79390d490 |
||
|
|
2d9f3272e5 |
||
|
|
b7dcb3a9f3 |
||
|
|
d6a8e52d24 |
||
|
|
573e987c72 |
4 changed files with 49 additions and 62 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
|
@ -19,3 +19,7 @@
|
||||||
/urllib3-1.20.tar.gz
|
/urllib3-1.20.tar.gz
|
||||||
/urllib3-1.21.1.tar.gz
|
/urllib3-1.21.1.tar.gz
|
||||||
/urllib3-1.22.tar.gz
|
/urllib3-1.22.tar.gz
|
||||||
|
/urllib3-1.23.tar.gz
|
||||||
|
/urllib3-1.24.tar.gz
|
||||||
|
/urllib3-1.24.1.tar.gz
|
||||||
|
/urllib3-1.24.2.tar.gz
|
||||||
|
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
From 4bff1e93d2dd4663d422d7e290473d9189cec5db Mon Sep 17 00:00:00 2001
|
|
||||||
From: Dominique Leuenberger <dimstar@opensuse.org>
|
|
||||||
Date: Sun, 31 Dec 2017 15:11:16 +0100
|
|
||||||
Subject: [PATCH] Move RECENT_DATE to 2017-06-30
|
|
||||||
|
|
||||||
The test suite expects the current date to be no more than two years in the future
|
|
||||||
of RECENT_DATE, which just serves as a reference point.
|
|
||||||
|
|
||||||
Also clarify the comment about how to update RECENT_DATE
|
|
||||||
|
|
||||||
Fixes #1303
|
|
||||||
|
|
||||||
diff --git a/urllib3/connection.py b/urllib3/connection.py
|
|
||||||
index 06bcbde1a..a03b573f0 100644
|
|
||||||
--- a/urllib3/connection.py
|
|
||||||
+++ b/urllib3/connection.py
|
|
||||||
@@ -56,10 +56,11 @@ class ConnectionError(Exception):
|
|
||||||
'https': 443,
|
|
||||||
}
|
|
||||||
|
|
||||||
-# When updating RECENT_DATE, move it to
|
|
||||||
-# within two years of the current date, and no
|
|
||||||
-# earlier than 6 months ago.
|
|
||||||
-RECENT_DATE = datetime.date(2016, 1, 1)
|
|
||||||
+# When updating RECENT_DATE, move it to within two years of the current date,
|
|
||||||
+# and not less than 6 months ago.
|
|
||||||
+# Example: if Today is 2018-01-01, then RECENT_DATE should be any date on or
|
|
||||||
+# after 2016-01-01 (today - 2 years) AND before 2017-07-01 (today - 6 months)
|
|
||||||
+RECENT_DATE = datetime.date(2017, 6, 30)
|
|
||||||
|
|
||||||
|
|
||||||
class DummyConnection(object):
|
|
||||||
|
|
@ -1,17 +1,15 @@
|
||||||
%global srcname urllib3
|
%global srcname urllib3
|
||||||
|
|
||||||
Name: python-%{srcname}
|
Name: python-%{srcname}
|
||||||
Version: 1.22
|
Version: 1.24.2
|
||||||
Release: 6%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Python HTTP library with thread-safe connection pooling and file post
|
Summary: Python HTTP library with thread-safe connection pooling and file post
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/shazow/urllib3
|
URL: https://github.com/urllib3/urllib3
|
||||||
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
|
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
|
||||||
# Used with Python 3.5+
|
# Unbundle ssl_match_hostname since we depend on it
|
||||||
Source1: ssl_match_hostname_py3.py
|
Source1: ssl_match_hostname_py3.py
|
||||||
# https://github.com/shazow/urllib3/commit/4bff1e93d2dd4663d422d7e290473d9189cec5db
|
|
||||||
Patch0: python-urllib3-recent-date.patch
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
|
@ -28,14 +26,12 @@ Requires: python2-six
|
||||||
Requires: python2-backports-ssl_match_hostname
|
Requires: python2-backports-ssl_match_hostname
|
||||||
|
|
||||||
# Secure extra requirements
|
# Secure extra requirements
|
||||||
Requires: python2-pyOpenSSL
|
|
||||||
Requires: python2-cryptography
|
|
||||||
Requires: python2-idna
|
|
||||||
Requires: python2-ipaddress
|
Requires: python2-ipaddress
|
||||||
Requires: python2-pysocks
|
Requires: python2-pysocks
|
||||||
|
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
# For unittests
|
# For unittests
|
||||||
|
BuildRequires: python2-backports-ssl_match_hostname
|
||||||
BuildRequires: python2-nose
|
BuildRequires: python2-nose
|
||||||
BuildRequires: python2-nose-exclude
|
BuildRequires: python2-nose-exclude
|
||||||
BuildRequires: python2-coverage
|
BuildRequires: python2-coverage
|
||||||
|
|
@ -66,18 +62,13 @@ BuildRequires: python3-tornado
|
||||||
Requires: ca-certificates
|
Requires: ca-certificates
|
||||||
Requires: python3-six
|
Requires: python3-six
|
||||||
Requires: python3-pysocks
|
Requires: python3-pysocks
|
||||||
Requires: python3-pyOpenSSL
|
|
||||||
Requires: python3-cryptography
|
|
||||||
Requires: python3-idna
|
|
||||||
Requires: python3-pysocks
|
|
||||||
|
|
||||||
%description -n python3-%{srcname}
|
%description -n python3-%{srcname}
|
||||||
Python3 HTTP module with connection pooling and file POST abilities.
|
Python3 HTTP module with connection pooling and file POST abilities.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{srcname}-%{version}
|
%autosetup -p1 -n %{srcname}-%{version}
|
||||||
%patch0 -p1 -b .recent-date
|
|
||||||
# Drop the dummyserver tests in koji. They fail there in real builds, but not
|
# Drop the dummyserver tests in koji. They fail there in real builds, but not
|
||||||
# in scratch builds (weird).
|
# in scratch builds (weird).
|
||||||
rm -rf test/with_dummyserver/
|
rm -rf test/with_dummyserver/
|
||||||
|
|
@ -87,6 +78,10 @@ rm -rf test/appengine/
|
||||||
# to do with Fedora in particular. They don't fail in upstream build infrastructure
|
# to do with Fedora in particular. They don't fail in upstream build infrastructure
|
||||||
rm -rf test/contrib/
|
rm -rf test/contrib/
|
||||||
|
|
||||||
|
# Tests for Python built without SSL, but Fedora builds with SSL. These tests
|
||||||
|
# fail when combined with the unbundling of backports-ssl_match_hostname
|
||||||
|
rm -f test/test_no_ssl.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
%py2_build
|
||||||
%py3_build
|
%py3_build
|
||||||
|
|
@ -101,11 +96,11 @@ rm -rf %{buildroot}/%{python2_sitelib}/urllib3/packages/six.py*
|
||||||
rm -rf %{buildroot}/%{python2_sitelib}/urllib3/packages/ssl_match_hostname/
|
rm -rf %{buildroot}/%{python2_sitelib}/urllib3/packages/ssl_match_hostname/
|
||||||
|
|
||||||
mkdir -p %{buildroot}/%{python2_sitelib}/urllib3/packages/
|
mkdir -p %{buildroot}/%{python2_sitelib}/urllib3/packages/
|
||||||
ln -s ../../six.py %{buildroot}/%{python2_sitelib}/urllib3/packages/six.py
|
ln -s %{python2_sitelib}/six.py %{buildroot}/%{python2_sitelib}/urllib3/packages/six.py
|
||||||
ln -s ../../six.pyc %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyc
|
ln -s %{python2_sitelib}/six.pyc %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyc
|
||||||
ln -s ../../six.pyo %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyo
|
ln -s %{python2_sitelib}/six.pyo %{buildroot}/%{python2_sitelib}/urllib3/packages/six.pyo
|
||||||
|
ln -s %{python2_sitelib}/backports/ssl_match_hostname \
|
||||||
ln -s ../../backports/ssl_match_hostname %{buildroot}/%{python2_sitelib}/urllib3/packages/ssl_match_hostname
|
%{buildroot}/%{python2_sitelib}/urllib3/packages/ssl_match_hostname
|
||||||
|
|
||||||
# Unbundle the Python 3 build
|
# Unbundle the Python 3 build
|
||||||
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py*
|
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py*
|
||||||
|
|
@ -113,18 +108,19 @@ rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/six*
|
||||||
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname/
|
rm -rf %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname/
|
||||||
|
|
||||||
mkdir -p %{buildroot}/%{python3_sitelib}/urllib3/packages/
|
mkdir -p %{buildroot}/%{python3_sitelib}/urllib3/packages/
|
||||||
ln -s ../../six.py %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py
|
cp -a %{SOURCE1} %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname.py
|
||||||
ln -s ../../../__pycache__/six.cpython-%{python3_version_nodots}.opt-1.pyc %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
|
ln -s %{python3_sitelib}/six.py %{buildroot}/%{python3_sitelib}/urllib3/packages/six.py
|
||||||
ln -s ../../../__pycache__/six.cpython-%{python3_version_nodots}.pyc %{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
|
ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.opt-1.pyc \
|
||||||
# urllib3 requires Python 3.5 to use the standard library's match_hostname,
|
%{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
|
||||||
# which we ship in Fedora 26, so we can safely replace the bundled version with
|
ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.pyc \
|
||||||
# this stub which imports the necessary objects.
|
%{buildroot}/%{python3_sitelib}/urllib3/packages/__pycache__/
|
||||||
cp %{SOURCE1} %{buildroot}/%{python3_sitelib}/urllib3/packages/ssl_match_hostname.py
|
|
||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
py.test
|
pushd test
|
||||||
py.test-3
|
PYTHONPATH=%{buildroot}%{python2_sitelib}:%{python2_sitelib} %{__python2} -m pytest -v
|
||||||
|
PYTHONPATH=%{buildroot}%{python3_sitelib}:%{python3_sitelib} %{__python3} -m pytest -v
|
||||||
|
popd
|
||||||
|
|
||||||
|
|
||||||
%files -n python2-%{srcname}
|
%files -n python2-%{srcname}
|
||||||
|
|
@ -142,6 +138,25 @@ py.test-3
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 17 2019 Jeremy Cline <jcline@redhat.com> - 1.24.2-1
|
||||||
|
- Update to v1.24.2
|
||||||
|
|
||||||
|
* Tue Nov 13 2018 Jeremy Cline <jeremy@jcline.org> - 1.24.1-2
|
||||||
|
- Adjust unbundling of ssl_match_hostname
|
||||||
|
|
||||||
|
* Mon Oct 29 2018 Jeremy Cline <jeremy@jcline.org> - 1.24.1-1
|
||||||
|
- Update to v1.24.1
|
||||||
|
|
||||||
|
* Thu May 03 2018 Lukas Slebodnik <lslebodn@fedoraproject.org> - 1.22-9
|
||||||
|
- Do not lowercase hostnames with custom-protocol (rhbz 1567862)
|
||||||
|
- upstream: https://github.com/urllib3/urllib3/issues/1267
|
||||||
|
|
||||||
|
* Wed Apr 18 2018 Jeremy Cline <jeremy@jcline.org> - 1.22-8
|
||||||
|
- Drop the dependency on idna and cryptography (rhbz 1567862)
|
||||||
|
|
||||||
|
* Mon Apr 16 2018 Jeremy Cline <jeremy@jcline.org> - 1.22-7
|
||||||
|
- Drop the dependency on PyOpenSSL, it's not needed (rhbz 1567862)
|
||||||
|
|
||||||
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.22-6
|
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.22-6
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||||
|
|
||||||
|
|
|
||||||
2
sources
2
sources
|
|
@ -1 +1 @@
|
||||||
SHA512 (urllib3-1.22.tar.gz) = 1b45a4a64e71847a4fc62b9263235d5b05b62076698fa324454efeb7ad065abd702cc9eadb2d396d9270b07e91e9bad94c52a4b9b115aadccb27f81955e6feab
|
SHA512 (urllib3-1.24.2.tar.gz) = 08e8d896f57eb9af5511d07002859f87f2a7bddbd5e66468908188dfe13d2e3985a8cdd2da12d06d0b337945ca8314c1f026d4e82badf23a09bf686fa121e863
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue