Activity log for bug #1835784

Date Who What changed Old value New value Message
2019-07-08 14:40:22 kmichel bug added bug
2019-07-08 14:53:15 kmichel description Despite the effort to use a LazyList for all_timezones, the list of timezones is always evaluated as soon as pytz is imported. This is caused by this line in the distributed file pytz/__init__.py (this is added by gen_tzinfo.py and not directly visible in the repo): _all_timezones_lower_to_standard = dict((tz.lower(), tz) for tz in all_timezones) This line was added for the case insensitive lookup in this commit: https://git.launchpad.net/pytz/commit/?id=78d76e59e52761b30cdf413be23d7d5e57ed416c This addition cause a startup delay of about 540ms on my computer. Without the line: import time: self [us] | cumulative | imported package [...] import time: 34059 | 41445 | pytz With the line (using python -X importtime): import time: self [us] | cumulative | imported package [...] import time: 577866 | 586989 | pytz (As a reference point, boto3 needs 490ms and numpy needs 1200ms). Despite the effort to use a LazyList for all_timezones, the list of timezones is always evaluated as soon as pytz is imported. This is caused by this line in the distributed file pytz/__init__.py (this is added by gen_tzinfo.py and not directly visible in the repo): _all_timezones_lower_to_standard = dict((tz.lower(), tz) for tz in all_timezones) This line was added for the case insensitive lookup in this commit: https://git.launchpad.net/pytz/commit/?id=78d76e59e52761b30cdf413be23d7d5e57ed416c This addition cause a startup delay of about 540ms on my computer. Without the line: import time: self [us] | cumulative | imported package [...] import time: 34059 | 41445 | pytz With the line (using python -X importtime): import time: self [us] | cumulative | imported package [...] import time: 577866 | 586989 | pytz (As a reference point, boto3 needs 240ms and numpy needs 1200ms).
2019-07-31 11:48:10 Stuart Bishop pytz: status New Triaged
2019-07-31 11:58:12 Stuart Bishop pytz: status Triaged Fix Committed
2019-07-31 16:29:54 Stuart Bishop pytz: status Fix Committed Fix Released