forked from pool/python-urllib3
Accepting request 560897 from home:dimstar:Factory
- Add python-urllib3-recent-date.patch: Fix test suite, use correct date (gh#shazow/urllib3#1303, boo#1074247). OBS-URL: https://build.opensuse.org/request/show/560897 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-urllib3?expand=0&rev=34
This commit is contained in:
committed by
Git OBS Bridge
parent
2f366d4311
commit
cc94804031
35
python-urllib3-recent-date.patch
Normal file
35
python-urllib3-recent-date.patch
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
From fc27a8ed4203084c97fd1260d2566255c35ca945 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
|
||||||
|
---
|
||||||
|
urllib3/connection.py | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/urllib3/connection.py b/urllib3/connection.py
|
||||||
|
index 06bcbde..9ea04bb 100644
|
||||||
|
--- a/urllib3/connection.py
|
||||||
|
+++ b/urllib3/connection.py
|
||||||
|
@@ -57,9 +57,9 @@ port_by_scheme = {
|
||||||
|
}
|
||||||
|
|
||||||
|
# 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)
|
||||||
|
+# within two years of the current date, and not
|
||||||
|
+# less than 6 months ago.
|
||||||
|
+RECENT_DATE = datetime.date(2017, 6, 30)
|
||||||
|
|
||||||
|
|
||||||
|
class DummyConnection(object):
|
||||||
|
--
|
||||||
|
2.15.1
|
||||||
|
|
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Dec 31 14:39:03 UTC 2017 - dimstar@opensuse.org
|
||||||
|
|
||||||
|
- Add python-urllib3-recent-date.patch: Fix test suite, use correct
|
||||||
|
date (gh#shazow/urllib3#1303, boo#1074247).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Oct 19 11:48:58 UTC 2017 - jmatejek@suse.com
|
Thu Oct 19 11:48:58 UTC 2017 - jmatejek@suse.com
|
||||||
|
|
||||||
|
@@ -32,6 +32,8 @@ Patch1: urllib3-test-no-coverage.patch
|
|||||||
Patch2: urllib3-ssl-default-context.patch
|
Patch2: urllib3-ssl-default-context.patch
|
||||||
# PATCH-FIX-OPENSUSE -- do not use unsupported SSLv3 in tests
|
# PATCH-FIX-OPENSUSE -- do not use unsupported SSLv3 in tests
|
||||||
Patch3: urllib3-test-ssl-drop-sslv3.patch
|
Patch3: urllib3-test-ssl-drop-sslv3.patch
|
||||||
|
# PATCH-FIX-UPSTREAM python-urllib3-recent-date.patch gh#shazow/urllib3#1303, boo#1074247 dimstar@opensuse.org -- Fix test suite, use correct date
|
||||||
|
Patch4: python-urllib3-recent-date.patch
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
#!BuildIgnore: python-requests
|
#!BuildIgnore: python-requests
|
||||||
BuildRequires: %{python_module PySocks}
|
BuildRequires: %{python_module PySocks}
|
||||||
@@ -73,6 +75,7 @@ Highlights
|
|||||||
%if %(python3 -c "import ssl; print(hasattr(ssl,'PROTOCOL_TLSv1_2'))") == "True"
|
%if %(python3 -c "import ssl; print(hasattr(ssl,'PROTOCOL_TLSv1_2'))") == "True"
|
||||||
%patch3 -p1
|
%patch3 -p1
|
||||||
%endif
|
%endif
|
||||||
|
%patch4 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
Reference in New Issue
Block a user