fix check error by set RECENT_DATE
(cherry picked from commit 51f118394fa1cfe235b2a8705dc251542785e807)
This commit is contained in:
parent
0c9f29a70d
commit
a8af19fd16
@ -3,7 +3,7 @@
|
||||
|
||||
Name: python-%{srcname}
|
||||
Version: 1.25.9
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Sanity-friendly HTTP client for Python
|
||||
License: MIT
|
||||
URL: https://urllib3.readthedocs.io
|
||||
@ -11,6 +11,7 @@ Source0: https://github.com/urllib3/urllib3/archive/%{version}/urllib3-%{
|
||||
Source1: ssl_match_hostname_py3.py
|
||||
|
||||
BuildArch: noarch
|
||||
Patch0000: set-RECENT_DATE-not-be-older-than-2-years.patch
|
||||
|
||||
%global _description \
|
||||
HTTP library with thread-safe connection pooling, file post support,\
|
||||
@ -88,7 +89,8 @@ ln -s %{python3_sitelib}/__pycache__/six.cpython-%{python3_version_nodots}.pyc %
|
||||
|
||||
%if %{with tests}
|
||||
%check
|
||||
PYTHONPATH=%{buildroot}%{python2_sitelib}:%{python2_sitelib} %{__python2} -m pytest -v
|
||||
#we don't have python2-trustme,so we don't need check python2
|
||||
#PYTHONPATH=%{buildroot}%{python2_sitelib}:%{python2_sitelib} %{__python2} -m pytest -v
|
||||
PYTHONPATH=%{buildroot}%{python3_sitelib}:%{python3_sitelib} %{__python3} -m pytest -v
|
||||
%endif
|
||||
|
||||
@ -107,6 +109,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib}:%{python3_sitelib} %{__python3} -m pyt
|
||||
%{python3_sitelib}/urllib3-*.egg-info
|
||||
|
||||
%changelog
|
||||
* Mon 24 May 2021 sunguoshuai<sunguoshuai@huawei.com> - 1.25.9-2
|
||||
- fix check error by set RECENT_DATE
|
||||
|
||||
* Wed 25 Nov 2020 leiju<leiju4@huawei.com> - 1.25.9-1
|
||||
- upgrade to 1.25.9
|
||||
|
||||
|
||||
25
set-RECENT_DATE-not-be-older-than-2-years.patch
Normal file
25
set-RECENT_DATE-not-be-older-than-2-years.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 686ab7d843e7ad9d9782fb63f600a4942b896c2d Mon Sep 17 00:00:00 2001
|
||||
From: si-gui <sunguoshuai@huawei.com>
|
||||
Date: Mon, 24 May 2021 20:04:00 +0800
|
||||
Subject: [PATCH] set RECENT_DATE not be older than 2 years
|
||||
|
||||
---
|
||||
src/urllib3/connection.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/urllib3/connection.py b/src/urllib3/connection.py
|
||||
index 6da1cf4..29dc4d8 100644
|
||||
--- a/src/urllib3/connection.py
|
||||
+++ b/src/urllib3/connection.py
|
||||
@@ -57,7 +57,7 @@ port_by_scheme = {"http": 80, "https": 443}
|
||||
|
||||
# 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)
|
||||
+RECENT_DATE = datetime.date(2021, 1, 1)
|
||||
|
||||
_CONTAINS_CONTROL_CHAR_RE = re.compile(r"[^-!#$%&'*+.^_`|~0-9a-zA-Z]")
|
||||
|
||||
--
|
||||
2.30.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user