set(all_timezones_set) returns empty unless called after all_timezones_set
Bug #1900081 reported by
Deep Chowdhury
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pytz |
Triaged
|
Undecided
|
Unassigned |
Bug Description
The set(all_
Once we call all_timezones_set, the set(all_
>>> import pytz
>>> set(pytz.
set()
>>> 'Asia/Dubai' in set(pytz.
False
>>> 'Asia/Dubai' in pytz.all_
True
>>> 'Asia/Dubai' in set(pytz.
True
pytz version: 2020.1
python version: 3.7.3
To post a comment you must log in.
I think this is https:/ /bugs.launchpad .net/pytz/ +bug/1435617 again, which I don't think can be fixed for older Python versions. It may be possible to drop lazy.py with newer Python and an alternative lazy loading mechanism.