diff --git a/gen_tzinfo.py b/gen_tzinfo.py index 0822bb2..c881bff 100644 --- a/gen_tzinfo.py +++ b/gen_tzinfo.py @@ -121,10 +121,10 @@ def add_allzones(filename): cz.append(zone) cz.sort() - print('all_timezones_unchecked = \\', file=outf) + print('_all_timezones_unchecked = \\', file=outf) pprint(sorted(allzones()), outf) print('''all_timezones = LazyList( - tz for tz in all_timezones_unchecked if resource_exists(tz)) + tz for tz in _all_timezones_unchecked if resource_exists(tz)) ''', file=outf) print('all_timezones_set = LazySet(all_timezones)', file=outf) # Per lp:1835784 we can't afford to do this at import time diff --git a/src/pytz/__init__.py b/src/pytz/__init__.py index cba72e9..59a3bc9 100644 --- a/src/pytz/__init__.py +++ b/src/pytz/__init__.py @@ -202,7 +202,7 @@ def _case_insensitive_zone_lookup(zone): """case-insensitively matching timezone, else return zone unchanged""" global _all_timezones_lower_to_standard if _all_timezones_lower_to_standard is None: - _all_timezones_lower_to_standard = dict((tz.lower(), tz) for tz in all_timezones_unchecked) # noqa + _all_timezones_lower_to_standard = dict((tz.lower(), tz) for tz in _all_timezones_unchecked) # noqa return _all_timezones_lower_to_standard.get(zone.lower()) or zone # noqa