Skip to content

Commit bd3e51f

Browse files
committed
Rename all_timezones_unchecked to strongly indicate it is not public
1 parent 01592a9 commit bd3e51f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gen_tzinfo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ def add_allzones(filename):
121121
cz.append(zone)
122122
cz.sort()
123123

124-
print('all_timezones_unchecked = \\', file=outf)
124+
print('_all_timezones_unchecked = \\', file=outf)
125125
pprint(sorted(allzones()), outf)
126126
print('''all_timezones = LazyList(
127-
tz for tz in all_timezones_unchecked if resource_exists(tz))
127+
tz for tz in _all_timezones_unchecked if resource_exists(tz))
128128
''', file=outf)
129129
print('all_timezones_set = LazySet(all_timezones)', file=outf)
130130
# Per lp:1835784 we can't afford to do this at import time

src/pytz/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def _case_insensitive_zone_lookup(zone):
202202
"""case-insensitively matching timezone, else return zone unchanged"""
203203
global _all_timezones_lower_to_standard
204204
if _all_timezones_lower_to_standard is None:
205-
_all_timezones_lower_to_standard = dict((tz.lower(), tz) for tz in all_timezones_unchecked) # noqa
205+
_all_timezones_lower_to_standard = dict((tz.lower(), tz) for tz in _all_timezones_unchecked) # noqa
206206
return _all_timezones_lower_to_standard.get(zone.lower()) or zone # noqa
207207

208208

0 commit comments

Comments
 (0)