Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

python: zoneinfo is pretty much broken #1972

Open
mayli opened this issue Apr 5, 2024 · 2 comments
Open

python: zoneinfo is pretty much broken #1972

mayli opened this issue Apr 5, 2024 · 2 comments
Labels
python Issues/PRs relating to Python Workers

Comments

@mayli
Copy link

mayli commented Apr 5, 2024

https://docs.python.org/3/library/zoneinfo.html

zoneinfo.available_timezones()[¶](https://docs.python.org/3/library/zoneinfo.html#zoneinfo.available_timezones) return an empty and any access results something like

  File "/lib/python312.zip/zoneinfo/_common.py", line 24, in load_tzdata
    raise ZoneInfoNotFoundError(f"No time zone found with key {key}")
zoneinfo._common.ZoneInfoNotFoundError: 'No time zone found with key UTC'
@hoodmane
Copy link
Contributor

hoodmane commented Apr 5, 2024

Yes, system timezone data is not available and the tzdata package is not around.

By default, zoneinfo uses the system’s time zone data if available; if no system time zone data is available, the library will fall back to using the first-party tzdata package available on PyPI.

We should probably vendor tzdata so that it will work as expected @dom96 @garrettgu10.

@hoodmane
Copy link
Contributor

hoodmane commented Apr 5, 2024

Upstream bug:
pyodide/pyodide#4668

@dom96 dom96 added the python Issues/PRs relating to Python Workers label Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Issues/PRs relating to Python Workers
Projects
None yet
Development

No branches or pull requests

3 participants