Skip to content

Default to using system zoneinfo if available - #303

Merged
yezz123 merged 1 commit into
pydantic:mainfrom
jelly:tzdata-optional
Mar 31, 2025
Merged

yezz123 merged 1 commit into
pydantic:mainfrom
jelly:tzdata-optional

Conversation

@jelly

@jelly jelly commented Mar 31, 2025

Copy link
Copy Markdown
Contributor

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: #291

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
@yezz123
yezz123 merged commit a257599 into pydantic:main Mar 31, 2025
@jelly
jelly deleted the tzdata-optional branch March 31, 2025 10:19
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 this pull request may close these issues.

Unnecessary dependency on tzdata on python 3.12 for timezone_name

2 participants