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
Implemented UTCDatetime constrained type #8158
base: main
Are you sure you want to change the base?
Conversation
…/pydantic into dtutc-constrained-type
CodSpeed Performance ReportMerging #8158 will not alter performanceComparing Summary
|
please review |
@sydney-runkle can you please review and give some pointers |
Thanks for your work on this! We're working on getting v2.6 out soon. I'd love to have this new feature included in v2.7, so I'll give this a thorough review once we get 2.6 out :). |
Thanks for your work on this. I think the approach that we want to use here is actually adding support for the annotated types @samuelcolvin endorsed that suggestion here: #8088 (comment). You can see examples of how we've added support for other annotated types annotations such as
Ping me if you have any follow up questions + when you need a review :). Thanks for your work on this! |
let me take a look, and work on it. Will reach out to you if needed any input from your end. Thank you. |
At PyCon 2024 going to fork this and work on it. |
Change Summary
The integration of a
UTCDateTime
constrained type, as mentioned in #8088, allows for validation of whether a given datetime is in the UTC timezone. This is achieved by checking if the offset is 0.Related issue number
fix #8088
Checklist
Selected Reviewer: @sydney-runkle