update pytz version to 2021.3
This commit is contained in:
parent
4e60fc7b69
commit
05e3ca3c74
@ -1,5 +1,5 @@
|
||||
diff --git a/pytz/__init__.py b/pytz/__init__.py
|
||||
index d217c96..2b1ac03 100644
|
||||
index e2f49fa..65c1d11 100644
|
||||
--- a/pytz/__init__.py
|
||||
+++ b/pytz/__init__.py
|
||||
@@ -74,6 +74,9 @@ else: # Python 2.x
|
||||
@ -38,9 +38,9 @@ index d217c96..2b1ac03 100644
|
||||
return open(filename, 'rb')
|
||||
|
||||
|
||||
--- pytz-2019.2/pytz/__init__.py~ 2019-07-31 12:32:00.000000000 -0500
|
||||
+++ pytz-2019.2/pytz/__init__.py 2019-07-31 12:44:07.995969364 -0500
|
||||
@@ -502,1044 +502,37 @@
|
||||
--- a/pytz/__init__.py~ 2021-10-04 09:16:08.981477792 -0500
|
||||
+++ b/pytz/__init__.py 2021-10-04 11:29:19.283758542 -0500
|
||||
@@ -502,1045 +502,37 @@
|
||||
|
||||
if __name__ == '__main__':
|
||||
_test()
|
||||
@ -588,6 +588,7 @@ index d217c96..2b1ac03 100644
|
||||
- 'Pacific/Guam',
|
||||
- 'Pacific/Honolulu',
|
||||
- 'Pacific/Johnston',
|
||||
- 'Pacific/Kanton',
|
||||
- 'Pacific/Kiritimati',
|
||||
- 'Pacific/Kosrae',
|
||||
- 'Pacific/Kwajalein',
|
||||
@ -638,7 +639,6 @@ index d217c96..2b1ac03 100644
|
||||
- 'W-SU',
|
||||
- 'WET',
|
||||
- 'Zulu']
|
||||
+
|
||||
+all_timezones = []
|
||||
+for root, dirs, files in os.walk(_tzinfo_dir):
|
||||
+ for exclude in 'posix', 'right':
|
||||
@ -1055,7 +1055,6 @@ index d217c96..2b1ac03 100644
|
||||
- 'Pacific/Chuuk',
|
||||
- 'Pacific/Easter',
|
||||
- 'Pacific/Efate',
|
||||
- 'Pacific/Enderbury',
|
||||
- 'Pacific/Fakaofo',
|
||||
- 'Pacific/Fiji',
|
||||
- 'Pacific/Funafuti',
|
||||
@ -1064,6 +1063,7 @@ index d217c96..2b1ac03 100644
|
||||
- 'Pacific/Guadalcanal',
|
||||
- 'Pacific/Guam',
|
||||
- 'Pacific/Honolulu',
|
||||
- 'Pacific/Kanton',
|
||||
- 'Pacific/Kiritimati',
|
||||
- 'Pacific/Kosrae',
|
||||
- 'Pacific/Kwajalein',
|
||||
@ -1095,9 +1095,10 @@ index d217c96..2b1ac03 100644
|
||||
- 'US/Pacific',
|
||||
- 'UTC']
|
||||
+
|
||||
+common_timezones = [l.split()[2]
|
||||
+ for l in open(os.path.join(_tzinfo_dir, 'zone.tab'))
|
||||
+ if l != '' and l[0] != '#']
|
||||
+with open(os.path.join(_tzinfo_dir, 'zone.tab')) as zonetab:
|
||||
+ common_timezones = [l.split()[2]
|
||||
+ for l in zonetab
|
||||
+ if l != '' and l[0] != '#']
|
||||
+common_timezones.extend(
|
||||
+ ['GMT',
|
||||
+ 'US/Alaska',
|
||||
12
backport-remove_tzinfo_test.patch
Normal file
12
backport-remove_tzinfo_test.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/pytz/tests/test_tzinfo.py b/pytz/tests/test_tzinfo.py
|
||||
index b2640a8..4f5322b 100644
|
||||
--- a/pytz/tests/test_tzinfo.py
|
||||
+++ b/pytz/tests/test_tzinfo.py
|
||||
@@ -155,6 +155,7 @@ class PicklingTest(unittest.TestCase):
|
||||
self._roundtrip_tzinfo(localized_tz)
|
||||
self._roundtrip_datetime(dt.replace(tzinfo=localized_tz))
|
||||
|
||||
+ @unittest.skip('Fails with system-wide timezone database')
|
||||
def testRoundtrip(self):
|
||||
for zone in pytz.all_timezones:
|
||||
tz = pytz.timezone(zone)
|
||||
Binary file not shown.
BIN
pytz-2021.3.tar.gz
Normal file
BIN
pytz-2021.3.tar.gz
Normal file
Binary file not shown.
18
pytz.spec
18
pytz.spec
@ -1,15 +1,15 @@
|
||||
%bcond_with tests
|
||||
|
||||
Name: pytz
|
||||
Version: 2021.1
|
||||
Release: 2
|
||||
Version: 2021.3
|
||||
Release: 1
|
||||
Summary: World Timezone Definitions for Python
|
||||
License: MIT
|
||||
URL: http://pytz.sourceforge.net/
|
||||
Source0: https://files.pythonhosted.org/packages/b0/61/eddc6eb2c682ea6fd97a7e1018a6294be80dba08fa28e7a3570148b4612d/pytz-2021.1.tar.gz
|
||||
Source0: https://files.pythonhosted.org/packages/e3/8e/1cde9d002f48a940b9d9d38820aaf444b229450c0854bdf15305ce4a3d1a/pytz-2021.3.tar.gz
|
||||
|
||||
Patch0: pytz-zoneinfo.patch
|
||||
Patch1: remove_tzinfo_test.patch
|
||||
Patch0: backport-pytz-zoneinfo.patch
|
||||
Patch1: backport-remove_tzinfo_test.patch
|
||||
Patch2: 0001-modify-timezone-from-Macau-to-Macao.patch
|
||||
|
||||
BuildArch: noarch
|
||||
@ -23,7 +23,7 @@ Python Library Reference (datetime.tzinfo).
|
||||
|
||||
%package -n python3-pytz
|
||||
Summary: python3 for pytz
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-devel tzdata
|
||||
%if %{with tests}
|
||||
BuildRequires: python3-pytest
|
||||
%endif
|
||||
@ -57,6 +57,12 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
|
||||
%{python3_sitelib}/*
|
||||
|
||||
%changelog
|
||||
* Tue Mar 22 2022 xihaochen <xihaochen@h-partners.com> - 2021.3-1
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:update version to 2021.3
|
||||
|
||||
* Mon Dec 06 2021 gaihuiying <gaihuiying1@huawei.com> - 2021.1-2
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user