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

Unnecessary dependency on tzdata on python 3.12 for timezone_name #291

Closed
Some7hing0riginal opened this issue Feb 21, 2025 · 0 comments · Fixed by #303
Closed

Unnecessary dependency on tzdata on python 3.12 for timezone_name #291

Some7hing0riginal opened this issue Feb 21, 2025 · 0 comments · Fixed by #303

Comments

@Some7hing0riginal
Copy link

from pydantic_extra_types.timezone_name import TimeZoneName

results in

ImportError: No timezone provider found. Please install tzdata with "pip install tzdata"

By default, zoneinfo uses the system’s time zone data if available and only falls back to tzdata if it can't find it. I would like to request if we can just use the system time zone data to not force us to install tzdata unnecessarily.

jelly added a commit to jelly/pydantic-extra-types that referenced this issue Mar 31, 2025
The zoneinfo module by default uses the systems timezone information and
if not found falls back to tzdata. This change makes `get_timezone()`
behave the same allowing for tzdata to fully become an optional
dependency for Linux distributions which already include time zone data.

Closes: pydantic#291
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant