Skip to content

Commit

Permalink
Revert 8656870 to fix initialization thread safety
Browse files Browse the repository at this point in the history
Fixes #95
  • Loading branch information
stub42 committed Jan 14, 2023
1 parent c412073 commit 14d9199
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/pytz/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +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:
global _all_timezones_unchecked
_all_timezones_lower_to_standard = dict((tz.lower(), tz) for tz in _all_timezones_unchecked) # noqa
del _all_timezones_unchecked
return _all_timezones_lower_to_standard.get(zone.lower()) or zone # noqa


Expand Down

0 comments on commit 14d9199

Please sign in to comment.