Fix pytz-zoneinfo.patch to apply.

This commit is contained in:
Matěj Cepl 2016-04-23 11:02:55 +02:00
parent 65cfcfae04
commit 4c8cb4d6a7

View File

@ -1,6 +1,5 @@
diff -up pytz-2015.7/pytz/__init__.py.zoneinfo pytz-2015.7/pytz/__init__.py
--- pytz-2015.7/pytz/__init__.py.zoneinfo 2015-10-26 00:30:26.000000000 -0600
+++ pytz-2015.7/pytz/__init__.py 2015-10-26 09:55:20.891455592 -0600
--- a/pytz/__init__.py
+++ b/pytz/__init__.py
@@ -75,24 +75,19 @@ else: # Python 2.x
"""
return s.encode('US-ASCII')
@ -30,7 +29,7 @@ diff -up pytz-2015.7/pytz/__init__.py.zoneinfo pytz-2015.7/pytz/__init__.py
return open(filename, 'rb')
@@ -487,1027 +482,36 @@ def _test():
@@ -487,1037 +482,38 @@ def _test():
if __name__ == '__main__':
_test()
@ -279,6 +278,7 @@ diff -up pytz-2015.7/pytz/__init__.py.zoneinfo pytz-2015.7/pytz/__init__.py
- 'Asia/Bahrain',
- 'Asia/Baku',
- 'Asia/Bangkok',
- 'Asia/Barnaul',
- 'Asia/Beirut',
- 'Asia/Bishkek',
- 'Asia/Brunei',
@ -350,6 +350,7 @@ diff -up pytz-2015.7/pytz/__init__.py.zoneinfo pytz-2015.7/pytz/__init__.py
- 'Asia/Thimbu',
- 'Asia/Thimphu',
- 'Asia/Tokyo',
- 'Asia/Tomsk',
- 'Asia/Ujung_Pandang',
- 'Asia/Ulaanbaatar',
- 'Asia/Ulan_Bator',
@ -455,6 +456,7 @@ diff -up pytz-2015.7/pytz/__init__.py.zoneinfo pytz-2015.7/pytz/__init__.py
- 'Etc/Zulu',
- 'Europe/Amsterdam',
- 'Europe/Andorra',
- 'Europe/Astrakhan',
- 'Europe/Athens',
- 'Europe/Belfast',
- 'Europe/Belgrade',
@ -475,6 +477,7 @@ diff -up pytz-2015.7/pytz/__init__.py.zoneinfo pytz-2015.7/pytz/__init__.py
- 'Europe/Jersey',
- 'Europe/Kaliningrad',
- 'Europe/Kiev',
- 'Europe/Kirov',
- 'Europe/Lisbon',
- 'Europe/Ljubljana',
- 'Europe/London',
@ -502,6 +505,7 @@ diff -up pytz-2015.7/pytz/__init__.py.zoneinfo pytz-2015.7/pytz/__init__.py
- 'Europe/Tallinn',
- 'Europe/Tirane',
- 'Europe/Tiraspol',
- 'Europe/Ulyanovsk',
- 'Europe/Uzhgorod',
- 'Europe/Vaduz',
- 'Europe/Vatican',
@ -618,6 +622,9 @@ diff -up pytz-2015.7/pytz/__init__.py.zoneinfo pytz-2015.7/pytz/__init__.py
- 'W-SU',
- 'WET',
- 'Zulu']
-all_timezones = LazyList(
- tz for tz in all_timezones if resource_exists(tz))
-
+all_timezones = []
+for root, dirs, files in os.walk(_tzinfo_dir):
+ for exclude in 'posix', 'right':
@ -629,9 +636,10 @@ diff -up pytz-2015.7/pytz/__init__.py.zoneinfo pytz-2015.7/pytz/__init__.py
+ if tz_file != 'README' and tz_file != 'Theory'
+ and '.' not in tz_file)
+
all_timezones = LazyList(
tz for tz in all_timezones if resource_exists(tz))
+
+ all_timezones = LazyList(
+ tz for tz in all_timezones if resource_exists(tz))
+
all_timezones_set = LazySet(all_timezones)
-common_timezones = \
-['Africa/Abidjan',
@ -808,7 +816,6 @@ diff -up pytz-2015.7/pytz/__init__.py.zoneinfo pytz-2015.7/pytz/__init__.py
- 'America/Regina',
- 'America/Resolute',
- 'America/Rio_Branco',
- 'America/Santa_Isabel',
- 'America/Santarem',
- 'America/Santiago',
- 'America/Santo_Domingo',
@ -856,6 +863,7 @@ diff -up pytz-2015.7/pytz/__init__.py.zoneinfo pytz-2015.7/pytz/__init__.py
- 'Asia/Bahrain',
- 'Asia/Baku',
- 'Asia/Bangkok',
- 'Asia/Barnaul',
- 'Asia/Beirut',
- 'Asia/Bishkek',
- 'Asia/Brunei',
@ -915,6 +923,7 @@ diff -up pytz-2015.7/pytz/__init__.py.zoneinfo pytz-2015.7/pytz/__init__.py
- 'Asia/Tehran',
- 'Asia/Thimphu',
- 'Asia/Tokyo',
- 'Asia/Tomsk',
- 'Asia/Ulaanbaatar',
- 'Asia/Urumqi',
- 'Asia/Ust-Nera',
@ -953,6 +962,7 @@ diff -up pytz-2015.7/pytz/__init__.py.zoneinfo pytz-2015.7/pytz/__init__.py
- 'Canada/Pacific',
- 'Europe/Amsterdam',
- 'Europe/Andorra',
- 'Europe/Astrakhan',
- 'Europe/Athens',
- 'Europe/Belgrade',
- 'Europe/Berlin',
@ -972,6 +982,7 @@ diff -up pytz-2015.7/pytz/__init__.py.zoneinfo pytz-2015.7/pytz/__init__.py
- 'Europe/Jersey',
- 'Europe/Kaliningrad',
- 'Europe/Kiev',
- 'Europe/Kirov',
- 'Europe/Lisbon',
- 'Europe/Ljubljana',
- 'Europe/London',
@ -997,6 +1008,7 @@ diff -up pytz-2015.7/pytz/__init__.py.zoneinfo pytz-2015.7/pytz/__init__.py
- 'Europe/Stockholm',
- 'Europe/Tallinn',
- 'Europe/Tirane',
- 'Europe/Ulyanovsk',
- 'Europe/Uzhgorod',
- 'Europe/Vaduz',
- 'Europe/Vatican',
@ -1083,4 +1095,6 @@ diff -up pytz-2015.7/pytz/__init__.py.zoneinfo pytz-2015.7/pytz/__init__.py
+
common_timezones = LazyList(
tz for tz in common_timezones if tz in all_timezones)
-
+
common_timezones_set = LazySet(common_timezones)