update pytz to 2022.7.1

This commit is contained in:
sherlock2010 2023-03-09 11:47:53 +00:00
parent 7d8e6354fc
commit c237ddd160
4 changed files with 15 additions and 8 deletions

View File

@ -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,1041 +502,37 @@
@@ -502,1042 +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',
@ -640,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 = \
@ -745,6 +746,7 @@ index e2f49fa..65c1d11 100644
- 'America/Cayman',
- 'America/Chicago',
- 'America/Chihuahua',
- 'America/Ciudad_Juarez',
- 'America/Costa_Rica',
- 'America/Creston',
- 'America/Cuiaba',
@ -816,7 +818,6 @@ index e2f49fa..65c1d11 100644
- 'America/Nuuk',
- 'America/Ojinaga',
- 'America/Panama',
- 'America/Pangnirtung',
- 'America/Paramaribo',
- 'America/Phoenix',
- 'America/Port-au-Prince',

Binary file not shown.

BIN
pytz-2022.7.1.tar.gz Normal file

Binary file not shown.

View File

@ -1,12 +1,12 @@
%bcond_without tests
Name: pytz
Version: 2022.6
Version: 2022.7.1
Release: 1
Summary: World Timezone Definitions for Python
License: MIT
URL: http://pytz.sourceforge.net/
Source0: https://files.pythonhosted.org/packages/76/63/1be349ff0a44e4795d9712cc0b2d806f5e063d4d34631b71b832fac715a8/pytz-2022.6.tar.gz
Source0: https://files.pythonhosted.org/packages/03/3e/dc5c793b62c60d0ca0b7e58f1fdd84d5aaa9f8df23e7589b39cc9ce20a03/pytz-2022.7.1.tar.gz
Patch0: backport-pytz-zoneinfo.patch
Patch1: backport-remove_tzinfo_test.patch
@ -57,6 +57,12 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} -m pytest -v
%{python3_sitelib}/*
%changelog
* 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