-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add support for ZoneInfo #9896
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
Add support for ZoneInfo #9896
Conversation
CodSpeed Performance ReportMerging #9896 will not alter performanceComparing Summary
|
|
hey @Youssefares correct me if i'm wrong but i guess its similar to this one we have in Pydantic-extra pydantic/pydantic-extra-types#193 |
This does seem very similar, zoneinfo.ZoneInfo is part of the python std library though. I maybe wrong but my understanding of pydantic-extra-types is that it defines additional convenience types, while pydantic itself is where we offer support for standard types. I am not 100% sure about the need for an extra-type in this scenario given zoneinfo now exists since 3.9. I also think (in my experience at least), most people try to drop the pytz dependency from their project nowadays if zoneinfo does the job. I'll leave to maintainers to decide whether the extra type using pytz is still required, but I believe supporting zoneinfo is very much worthwhile eitherway. |
Yes as you said the best answer we can have is from maintainers themselves. |
|
please review |
|
Exciting stuff here - this is next in my queue to review :). Should be able to get to it this evening or first thing tomorrow :). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very excited to include this. Added one minor simplification request!
I think we should definitely just stick to std lib support, so the zoneinfo addition here is great! |
zoneinfo.ZoneInfo available since 3.9
d0dcd54 to
ded911c
Compare
|
CI's failing because this issue #9761 been resurrected somehow it seems? Looking into it.. |
|
That looks better.. 🟢 ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
Thanks a bunch!
Change Summary
Related issue number
fix #4710
Checklist
Selected Reviewer: @sydney-runkle