You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to documentation all calls to ZoneInfo should raise ValueError or ZoneInfoNotFoundError.
Creating a ZoneInfo object with an invalid very long timezone (length > 255) an OSError is raised instead (OSError: [Errno 36] File name too long).
Bug report
According to documentation all calls to ZoneInfo should raise
ValueErrororZoneInfoNotFoundError.Creating a ZoneInfo object with an invalid very long timezone (length > 255) an OSError is raised instead (
OSError: [Errno 36] File name too long).I believe that
cpython/Lib/zoneinfo/_common.py
Lines 11 to 24 in 29f1b0b
OSErrorexception raised by open and reraise it toZoneInfoNotFoundError.Sample code for reproduction:
Your environment
Linked PRs
load_tzdataraisingOSError, not `ZoneInfoNotFound… #99602