This commit is contained in:
Gwyn Ciesla 2022-03-21 13:21:25 -05:00
parent b779ebdfbb
commit 5ac601d436
4 changed files with 7 additions and 19 deletions

1
.gitignore vendored
View File

@ -17,3 +17,4 @@ pytz-2010h.tar.gz
/pytz-2020.5.tar.gz
/pytz-2021.1.tar.gz
/pytz-2021.3.tar.gz
/pytz-2022.1.tar.gz

View File

@ -1,16 +0,0 @@
--- a/pytz/tests/test_tzinfo.py~ 2019-07-26 08:38:47.000000000 -0500
+++ b/pytz/tests/test_tzinfo.py 2019-07-26 08:40:12.751754602 -0500
@@ -184,8 +184,11 @@
# Python 3 introduced a new pickle protocol where numbers are stored in
# hexadecimal representation. Here we extract the pickle
# representation of the number for the current Python version.
- old_pickle_pattern = pickle.dumps(tz._utcoffset.seconds)[3:-1]
- new_pickle_pattern = pickle.dumps(new_utcoffset)[3:-1]
+ #
+ # Test protocol 3 on Python 3 and protocol 0 on Python 2.
+ protocol = (3 if sys.version_info >= (3,) else 0)
+ old_pickle_pattern = pickle.dumps(tz._utcoffset.seconds, protocol)[3:-1]
+ new_pickle_pattern = pickle.dumps(new_utcoffset, protocol)[3:-1]
hacked_p = p.replace(old_pickle_pattern, new_pickle_pattern)
self.assertNotEqual(p, hacked_p)

View File

@ -11,8 +11,8 @@
%bcond_without tests
Name: pytz
Version: 2021.3
Release: 2%{?dist}
Version: 2022.1
Release: 1%{?dist}
Summary: World Timezone Definitions for Python
License: MIT
@ -108,6 +108,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
%changelog
* Mon Mar 21 2022 Gwyn Ciesla <gwync@protonmail.com> - 2022.1-1
- 2022.1
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2021.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (pytz-2021.3.tar.gz) = c45099f319592976b7715d9973496a2c7438a1b958ef8b90a1ad1fb97e7035624fe6191796727d4b7edf3236271bea4d864e25d1d92431e8cf767ac798448882
SHA512 (pytz-2022.1.tar.gz) = 7737aa28626743026b7de932b27bf44d7b209f495d9dd7f90c6448ec271e007f23004fcd04982e2ca6d0a4075206e1dae7b8836319c299b5559c514366d518a6