Compare commits
10 Commits
5b0f964deb
...
b100bebd73
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b100bebd73 | ||
|
|
092a8ff2b8 | ||
|
|
20c966a6fd | ||
|
|
c237ddd160 | ||
|
|
7d8e6354fc | ||
|
|
9a53584e01 | ||
|
|
508831b55e | ||
|
|
aa7a87d9cd | ||
|
|
78d7e4bce8 | ||
|
|
b15be9af66 |
@ -56,20 +56,20 @@ index c720561..cf0c701 100644
|
||||
9 _ +09/+10 1945 S 30 24
|
||||
8 _ C%sT
|
||||
@@ -4324,7 +4324,7 @@ L Asia/Dhaka Asia/Dacca
|
||||
L Asia/Shanghai Asia/Harbin
|
||||
L Asia/Urumqi Asia/Kashgar
|
||||
L Asia/Dhaka Asia/Dacca
|
||||
L Europe/Istanbul Asia/Istanbul
|
||||
L Asia/Kathmandu Asia/Katmandu
|
||||
-L Asia/Macau Asia/Macao
|
||||
+L Asia/Macao Asia/Macao
|
||||
L Asia/Yangon Asia/Rangoon
|
||||
L Asia/Ho_Chi_Minh Asia/Saigon
|
||||
L Asia/Jerusalem Asia/Tel_Aviv
|
||||
L Asia/Thimphu Asia/Thimbu
|
||||
diff --git a/pytz/zoneinfo/zone.tab b/pytz/zoneinfo/zone.tab
|
||||
index 408fcb2..ee58572 100644
|
||||
--- a/pytz/zoneinfo/zone.tab
|
||||
+++ b/pytz/zoneinfo/zone.tab
|
||||
@@ -269,7 +269,7 @@ MM +1647+09610 Asia/Yangon
|
||||
MN +4755+10653 Asia/Ulaanbaatar Mongolia (most areas)
|
||||
MN +4755+10653 Asia/Ulaanbaatar most of Mongolia
|
||||
MN +4801+09139 Asia/Hovd Bayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan
|
||||
MN +4804+11430 Asia/Choibalsan Dornod, Sukhbaatar
|
||||
-MO +221150+1133230 Asia/Macau
|
||||
@ -82,7 +82,7 @@ index 822ffa1..03ec66b 100644
|
||||
--- a/pytz/zoneinfo/zone1970.tab
|
||||
+++ b/pytz/zoneinfo/zone1970.tab
|
||||
@@ -232,7 +232,7 @@ MM +1647+09610 Asia/Yangon
|
||||
MN +4755+10653 Asia/Ulaanbaatar Mongolia (most areas)
|
||||
MN +4755+10653 Asia/Ulaanbaatar most of Mongolia
|
||||
MN +4801+09139 Asia/Hovd Bayan-Ölgii, Govi-Altai, Hovd, Uvs, Zavkhan
|
||||
MN +4804+11430 Asia/Choibalsan Dornod, Sükhbaatar
|
||||
-MO +221150+1133230 Asia/Macau
|
||||
|
||||
@ -14,7 +14,7 @@ index e2f49fa..65c1d11 100644
|
||||
"""Open a resource from the zoneinfo subdir for reading.
|
||||
@@ -88,23 +91,8 @@ def open_resource(name):
|
||||
for part in name_parts:
|
||||
if part == os.path.pardir or os.path.sep in part:
|
||||
if part == os.path.pardir or os.sep in part:
|
||||
raise ValueError('Bad path segment: %r' % part)
|
||||
- zoneinfo_dir = os.environ.get('PYTZ_TZDATADIR', None)
|
||||
- if zoneinfo_dir is not None:
|
||||
@ -40,11 +40,11 @@ index e2f49fa..65c1d11 100644
|
||||
|
||||
--- 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 @@
|
||||
@@ -502,1041 +502,37 @@
|
||||
|
||||
if __name__ == '__main__':
|
||||
_test()
|
||||
-all_timezones = \
|
||||
-_all_timezones_unchecked = \
|
||||
-['Africa/Abidjan',
|
||||
- 'Africa/Accra',
|
||||
- 'Africa/Addis_Ababa',
|
||||
@ -140,6 +140,7 @@ index e2f49fa..65c1d11 100644
|
||||
- 'America/Cayman',
|
||||
- 'America/Chicago',
|
||||
- 'America/Chihuahua',
|
||||
- 'America/Ciudad_Juarez',
|
||||
- 'America/Coral_Harbour',
|
||||
- 'America/Cordoba',
|
||||
- 'America/Costa_Rica',
|
||||
@ -494,6 +495,7 @@ index e2f49fa..65c1d11 100644
|
||||
- 'Europe/Kaliningrad',
|
||||
- 'Europe/Kiev',
|
||||
- 'Europe/Kirov',
|
||||
- 'Europe/Kyiv',
|
||||
- 'Europe/Lisbon',
|
||||
- 'Europe/Ljubljana',
|
||||
- 'Europe/London',
|
||||
@ -639,19 +641,19 @@ index e2f49fa..65c1d11 100644
|
||||
- 'W-SU',
|
||||
- 'WET',
|
||||
- 'Zulu']
|
||||
+all_timezones = []
|
||||
+_all_timezones_unchecked = []
|
||||
+for root, dirs, files in os.walk(_tzinfo_dir):
|
||||
+ for exclude in 'posix', 'right':
|
||||
+ if exclude in dirs:
|
||||
+ del dirs[dirs.index(exclude)]
|
||||
+
|
||||
+ all_timezones.extend(os.path.join(root, tz_file)[len(_tzinfo_dir)+1:]
|
||||
+ _all_timezones_unchecked.extend(os.path.join(root, tz_file)[len(_tzinfo_dir)+1:]
|
||||
+ for tz_file in files
|
||||
+ if tz_file not in ['leapseconds', 'README', 'Theory']
|
||||
+ and '.' not in tz_file)
|
||||
+
|
||||
all_timezones = LazyList(
|
||||
tz for tz in all_timezones if resource_exists(tz))
|
||||
tz for tz in _all_timezones_unchecked if resource_exists(tz))
|
||||
|
||||
all_timezones_set = LazySet(all_timezones)
|
||||
-common_timezones = \
|
||||
@ -744,6 +746,7 @@ index e2f49fa..65c1d11 100644
|
||||
- 'America/Cayman',
|
||||
- 'America/Chicago',
|
||||
- 'America/Chihuahua',
|
||||
- 'America/Ciudad_Juarez',
|
||||
- 'America/Costa_Rica',
|
||||
- 'America/Creston',
|
||||
- 'America/Cuiaba',
|
||||
@ -807,7 +810,6 @@ index e2f49fa..65c1d11 100644
|
||||
- 'America/Montserrat',
|
||||
- 'America/Nassau',
|
||||
- 'America/New_York',
|
||||
- 'America/Nipigon',
|
||||
- 'America/Nome',
|
||||
- 'America/Noronha',
|
||||
- 'America/North_Dakota/Beulah',
|
||||
@ -816,7 +818,6 @@ index e2f49fa..65c1d11 100644
|
||||
- 'America/Nuuk',
|
||||
- 'America/Ojinaga',
|
||||
- 'America/Panama',
|
||||
- 'America/Pangnirtung',
|
||||
- 'America/Paramaribo',
|
||||
- 'America/Phoenix',
|
||||
- 'America/Port-au-Prince',
|
||||
@ -824,7 +825,6 @@ index e2f49fa..65c1d11 100644
|
||||
- 'America/Porto_Velho',
|
||||
- 'America/Puerto_Rico',
|
||||
- 'America/Punta_Arenas',
|
||||
- 'America/Rainy_River',
|
||||
- 'America/Rankin_Inlet',
|
||||
- 'America/Recife',
|
||||
- 'America/Regina',
|
||||
@ -845,7 +845,6 @@ index e2f49fa..65c1d11 100644
|
||||
- 'America/Swift_Current',
|
||||
- 'America/Tegucigalpa',
|
||||
- 'America/Thule',
|
||||
- 'America/Thunder_Bay',
|
||||
- 'America/Tijuana',
|
||||
- 'America/Toronto',
|
||||
- 'America/Tortola',
|
||||
@ -853,7 +852,6 @@ index e2f49fa..65c1d11 100644
|
||||
- 'America/Whitehorse',
|
||||
- 'America/Winnipeg',
|
||||
- 'America/Yakutat',
|
||||
- 'America/Yellowknife',
|
||||
- 'Antarctica/Casey',
|
||||
- 'Antarctica/Davis',
|
||||
- 'Antarctica/DumontDUrville',
|
||||
@ -997,8 +995,8 @@ index e2f49fa..65c1d11 100644
|
||||
- 'Europe/Istanbul',
|
||||
- 'Europe/Jersey',
|
||||
- 'Europe/Kaliningrad',
|
||||
- 'Europe/Kiev',
|
||||
- 'Europe/Kirov',
|
||||
- 'Europe/Kyiv',
|
||||
- 'Europe/Lisbon',
|
||||
- 'Europe/Ljubljana',
|
||||
- 'Europe/London',
|
||||
@ -1026,7 +1024,6 @@ index e2f49fa..65c1d11 100644
|
||||
- 'Europe/Tallinn',
|
||||
- 'Europe/Tirane',
|
||||
- 'Europe/Ulyanovsk',
|
||||
- 'Europe/Uzhgorod',
|
||||
- 'Europe/Vaduz',
|
||||
- 'Europe/Vatican',
|
||||
- 'Europe/Vienna',
|
||||
@ -1034,7 +1031,6 @@ index e2f49fa..65c1d11 100644
|
||||
- 'Europe/Volgograd',
|
||||
- 'Europe/Warsaw',
|
||||
- 'Europe/Zagreb',
|
||||
- 'Europe/Zaporozhye',
|
||||
- 'Europe/Zurich',
|
||||
- 'GMT',
|
||||
- 'Indian/Antananarivo',
|
||||
|
||||
Binary file not shown.
BIN
pytz-2023.3.tar.gz
Normal file
BIN
pytz-2023.3.tar.gz
Normal file
Binary file not shown.
36
pytz.spec
36
pytz.spec
@ -1,12 +1,12 @@
|
||||
%bcond_with tests
|
||||
%bcond_without tests
|
||||
|
||||
Name: pytz
|
||||
Version: 2021.3
|
||||
Version: 2023.3
|
||||
Release: 1
|
||||
Summary: World Timezone Definitions for Python
|
||||
License: MIT
|
||||
URL: http://pytz.sourceforge.net/
|
||||
Source0: https://files.pythonhosted.org/packages/e3/8e/1cde9d002f48a940b9d9d38820aaf444b229450c0854bdf15305ce4a3d1a/pytz-2021.3.tar.gz
|
||||
Source0: https://files.pythonhosted.org/packages/5e/32/12032aa8c673ee16707a9b6cdda2b09c0089131f35af55d443b6a9c69c1d/pytz-2023.3.tar.gz
|
||||
|
||||
Patch0: backport-pytz-zoneinfo.patch
|
||||
Patch1: backport-remove_tzinfo_test.patch
|
||||
@ -57,6 +57,36 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
|
||||
%{python3_sitelib}/*
|
||||
|
||||
%changelog
|
||||
* Tue Aug 01 2023 zhouyihang <zhouyihang3@h-partners.com> - 2023.3-1
|
||||
- Type:requirement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:update pytz to 2023.3
|
||||
|
||||
* Thu Mar 09 2023 zhouyihang <zhouyihang3@h-partners.com> - 2022.7.1-1
|
||||
- Type:requirement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:update pytz to 2022.7.1
|
||||
|
||||
* Mon Nov 14 2022 zhouyihang <zhouyihang3@h-partners.com> - 2022.6-1
|
||||
- Type:requirement
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:update pytz to 2022.6
|
||||
|
||||
* Thu Jun 30 2022 gaihuiying <eaglegai@163.com> - 2021.3-3
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:enable tests
|
||||
|
||||
* Tue Jun 21 2022 yanglu <yanglu72@h-partners.com> - 2021.3-2
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:remove useless patch
|
||||
|
||||
* Tue Mar 22 2022 xihaochen <xihaochen@h-partners.com> - 2021.3-1
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
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)
|
||||
Loading…
x
Reference in New Issue
Block a user