Fix FTBFS - Move RECENT_DATE to 2017-06-30
As of 2018-01-01, python-urllib3 no longer builds because of the test
suite failure caused by RECENT_DATE not being recent enough.
RECENT_DATE was updated to 2017-06-30 upstream.
https://github.com/shazow/urllib3/issues/1303
4bff1e93d2
This commit is contained in:
parent
a4ea2a37ad
commit
9b84183aca
32
python-urllib3-recent-date.patch
Normal file
32
python-urllib3-recent-date.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
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):
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Name: python-%{srcname}
|
Name: python-%{srcname}
|
||||||
Version: 1.22
|
Version: 1.22
|
||||||
Release: 3%{?dist}
|
Release: 4%{?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
|
||||||
@ -10,6 +10,8 @@ URL: https://github.com/shazow/urllib3
|
|||||||
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
|
Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz
|
||||||
# Used with Python 3.5+
|
# Used with Python 3.5+
|
||||||
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
|
||||||
@ -75,6 +77,7 @@ Python3 HTTP module with connection pooling and file POST abilities.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{srcname}-%{version}
|
%setup -q -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/
|
||||||
@ -139,6 +142,9 @@ py.test-3
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jan 25 2018 Tomas Hoger <thoger@redhat.com> - 1.22-4
|
||||||
|
- Fix FTBFS - Move RECENT_DATE to 2017-06-30
|
||||||
|
|
||||||
* Fri Dec 01 2017 Jeremy Cline <jeremy@jcline.org> - 1.22-3
|
* Fri Dec 01 2017 Jeremy Cline <jeremy@jcline.org> - 1.22-3
|
||||||
- Symlink the Python 3 bytecode for six (rbhz 1519147)
|
- Symlink the Python 3 bytecode for six (rbhz 1519147)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user