From 9fbb9c313be27ac5d8bbf09b512b32050d35665d Mon Sep 17 00:00:00 2001 From: wangxiyuan Date: Tue, 25 Oct 2022 17:19:38 +0800 Subject: [PATCH] Fix unit test error --- Bump_RECENT_DATE.patch | 21 +++++++++++++++++++++ python-urllib3.spec | 6 +++++- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 Bump_RECENT_DATE.patch diff --git a/Bump_RECENT_DATE.patch b/Bump_RECENT_DATE.patch new file mode 100644 index 0000000..6f3c3d0 --- /dev/null +++ b/Bump_RECENT_DATE.patch @@ -0,0 +1,21 @@ +From 2d98f6b53c38ab8e224cb825d6323b8eb54c887f Mon Sep 17 00:00:00 2001 +From: Quentin Pradet +Date: Fri, 1 Jul 2022 14:43:18 +0400 +Subject: [PATCH] Bump RECENT_DATE + +--- + 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 d3634e5654..0b6d60ed63 100644 +--- a/src/urllib3/connection.py ++++ b/src/urllib3/connection.py +@@ -73,7 +73,7 @@ class BaseSSLError(BaseException): # type: ignore[no-redef] + + # 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(2020, 7, 1) ++RECENT_DATE = datetime.date(2022, 1, 1) + + _CONTAINS_CONTROL_CHAR_RE = re.compile(r"[^-!#$%&'*+.^_`|~0-9a-zA-Z]") diff --git a/python-urllib3.spec b/python-urllib3.spec index b92262b..84df1ec 100644 --- a/python-urllib3.spec +++ b/python-urllib3.spec @@ -3,7 +3,7 @@ Name: python-%{srcname} Version: 1.26.3 -Release: 4 +Release: 5 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}/%{version} Source1: ssl_match_hostname_py3.py Patch0001: remove_mock.patch +Patch0002: Bump_RECENT_DATE.patch Patch6000: backport-CVE-2021-28363.patch Patch6001: backport-CVE-2021-33503.patch @@ -74,6 +75,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib}:%{python3_sitelib} %{__python3} -m pyt %{python3_sitelib}/urllib3-*.egg-info %changelog +* Tue Oct 25 2022 wangxiyuan - 1.26.3-5 +- Fix unit test error + * Wed Mar 02 2022 huangtianhua - 1.26.3-4 - Remove python3-nose BuildRequires -- Gitee