2019.1, patch for Python 3.8.
This commit is contained in:
parent
002329f46c
commit
5f89271285
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,3 +9,4 @@ pytz-2010h.tar.gz
|
||||
/pytz-2017.2.zip
|
||||
/pytz-2018.5.tar.gz
|
||||
/pytz-2018.9.tar.gz
|
||||
/pytz-2019.1.tar.gz
|
||||
|
16
python-38-test.patch
Normal file
16
python-38-test.patch
Normal file
@ -0,0 +1,16 @@
|
||||
--- 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)
|
@ -38,7 +38,9 @@ index d217c96..2b1ac03 100644
|
||||
return open(filename, 'rb')
|
||||
|
||||
|
||||
@@ -485,1044 +473,37 @@ def _test():
|
||||
--- pytz-2019.1/pytz/__init__.py~ 2019-07-26 08:22:41.000000000 -0500
|
||||
+++ pytz-2019.1/pytz/__init__.py 2019-07-26 08:25:55.826367312 -0500
|
||||
@@ -489,1045 +489,38 @@
|
||||
|
||||
if __name__ == '__main__':
|
||||
_test()
|
||||
@ -651,6 +653,7 @@ index d217c96..2b1ac03 100644
|
||||
tz for tz in all_timezones if resource_exists(tz))
|
||||
|
||||
all_timezones_set = LazySet(all_timezones)
|
||||
_all_timezones_lower_to_standard = dict((tz.lower(), tz) for tz in all_timezones)
|
||||
-common_timezones = \
|
||||
-['Africa/Abidjan',
|
||||
- 'Africa/Accra',
|
||||
|
@ -1,5 +1,5 @@
|
||||
Name: pytz
|
||||
Version: 2018.9
|
||||
Version: 2019.1
|
||||
Release: 1%{?dist}
|
||||
Summary: World Timezone Definitions for Python
|
||||
|
||||
@ -10,6 +10,8 @@ Source0: %pypi_source
|
||||
Patch0: pytz-zoneinfo.patch
|
||||
# https://bugzilla.redhat.com/1497572
|
||||
Patch1: remove_tzinfo_test.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1687959
|
||||
Patch2: python-38-test.patch
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
@ -86,6 +88,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jul 26 2019 Gwyn Ciesla <gwync@protonmail.com> - 2019.1-1
|
||||
- 2019.1
|
||||
|
||||
* Tue Mar 12 2019 Miro Hrončok <mhroncok@redhat.com> - 2018.9-1
|
||||
- Update to 2018.9
|
||||
- Remove leapseconds from pytz.all_timezones (#1642003)
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (pytz-2018.9.tar.gz) = c3dabe61d04539245761a5c4e3bfb614df1c3b8ccc2ffa1cf320c5ad642242c29b3321fe7855d32a2ae55c739acbbe8c0e1813df5b3c757b8f56fff910fee159
|
||||
SHA512 (pytz-2019.1.tar.gz) = 981a5aa2430bb7740bc1fd53e6c7416552c4f19d33a82701854b087ca5624ec3211b55add802e1e004f3728c32447f93d934c0d2bff993cd1be5e96e41fd44d6
|
||||
|
Loading…
Reference in New Issue
Block a user