Is it possible to skip the resource load for every timezone? It can make import time super high and shouldn't be necessary on systems where you know what you're getting during install
Asked by
Timothy Paine
In __init__.py, the line:
all_timezones = LazyList(tz for tz in all_timezones if resource_
causes all timezone files to be opened (in the resource_exists function). This is fine in many cases, but when we deploy pytz to network drives, it makes the import cost pretty high. And since we're not installing pytz on-the-fly, we already know that all the timezone files are present. Is it possible to either:
a. disable this check with an environment variable, or
b. use something like os.listdir to check if stuff is present?
I have implemented (a) on my branch, I'm going to send it in for a review. Happy to discuss further and do any work necessary to fix the underlying issue.
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- pytz Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
To post a message you must log in.