Set RECENT_DATE not to be older than 2 years

Backports https://github.com/urllib3/urllib3/pull/1645
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1727796
This commit is contained in:
Miro Hrončok 2019-07-08 10:23:29 +02:00
parent f032b5b74e
commit 85d9ed5010
2 changed files with 39 additions and 1 deletions

31
1645.patch Normal file
View File

@ -0,0 +1,31 @@
From 19b02fee383647ede591c0368e6ac437c832b871 Mon Sep 17 00:00:00 2001
From: Seth Michael Larson <sethmichaellarson@gmail.com>
Date: Tue, 2 Jul 2019 23:08:27 -0500
Subject: [PATCH] Update RECENT_DATE to 2019-1-1
---
src/urllib3/connection.py | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/urllib3/connection.py b/src/urllib3/connection.py
index 57c58fe..96f5d28 100644
--- a/src/urllib3/connection.py
+++ b/src/urllib3/connection.py
@@ -56,11 +56,9 @@ port_by_scheme = {
'https': 443,
}
-# 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)
+# When it comes time to update this value as a part of regular maintenance
+# (ie test_recent_date is failing) update it to ~6 months before the current date.
+RECENT_DATE = datetime.date(2019, 1, 1)
class DummyConnection(object):
--
2.21.0

View File

@ -5,7 +5,7 @@
Name: python-%{srcname} Name: python-%{srcname}
Version: 1.25.3 Version: 1.25.3
Release: 2%{?dist} Release: 3%{?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
@ -18,6 +18,10 @@ BuildArch: noarch
# Merged upstream, compatibility with latest pytest # Merged upstream, compatibility with latest pytest
Patch0: 1614.patch Patch0: 1614.patch
# Merged upstream, set RECENT_DATE not to be older than 2 years
# https://bugzilla.redhat.com/show_bug.cgi?id=1727796
Patch1: 1645.patch
%description %description
Python HTTP module with connection pooling and file POST abilities. Python HTTP module with connection pooling and file POST abilities.
@ -137,6 +141,9 @@ popd
%changelog %changelog
* Mon Jul 08 2019 Miro Hrončok <mhroncok@redhat.com> - 1.25.3-3
- Set RECENT_DATE not to be older than 2 years (#1727796)
* Tue May 28 2019 Jeremy Cline <jcline@redhat.com> - 1.25.3-2 * Tue May 28 2019 Jeremy Cline <jcline@redhat.com> - 1.25.3-2
- Drop the Python 2 tests since Tornado is going away - Drop the Python 2 tests since Tornado is going away