Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
b100bebd73
!28 update pytz to 2023.3
From: @sherlock2010 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2023-08-04 02:33:13 +00:00
sherlock2010
092a8ff2b8 update pytz to 2023.3 2023-08-01 07:41:39 +00:00
openeuler-ci-bot
20c966a6fd
!26 update pytz to 2022.7.1
From: @sherlock2010 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2023-03-10 07:30:31 +00:00
sherlock2010
c237ddd160 update pytz to 2022.7.1 2023-03-10 01:30:52 +00:00
openeuler-ci-bot
7d8e6354fc
!25 update pytz to 2022.6
From: @sherlock2010 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2022-11-15 09:32:18 +00:00
sherlock2010
9a53584e01 update pytz to 2022.6 2022-11-14 08:22:13 +00:00
openeuler-ci-bot
508831b55e
!22 enable tests
From: @eaglegai 
Reviewed-by: @dwl301 
Signed-off-by: @dwl301
2022-06-30 03:24:21 +00:00
eaglegai
aa7a87d9cd enable tests 2022-06-30 10:58:16 +08:00
openeuler-ci-bot
78d7e4bce8
!19 remove useless patch
From: @yangl777 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
2022-06-22 09:02:21 +00:00
yangl777
b15be9af66 remove useless patch 2022-06-21 14:39:31 +08:00
6 changed files with 48 additions and 34 deletions

View File

@ -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

View File

@ -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

Binary file not shown.

View File

@ -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

View File

@ -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)