-
Notifications
You must be signed in to change notification settings - Fork 27
Allow tzinfo objects for Timezone
#56
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
Conversation
adriangb
left a comment
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.
Is this backwards compatible?
Currently only Also, should I add a |
|
Yes please add the changed section |
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## main #56 +/- ##
=======================================
Coverage 94.76% 94.76%
=======================================
Files 2 2
Lines 210 210
Branches 30 30
=======================================
Hits 199 199
Misses 9 9
Partials 2 2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Zac-HD
left a comment
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.
I think this is basically a documentation fix rather than a new feature, but let's just merge it instead of debating how to describe it. Thanks @Viicos for noticing and fixing the problem!
|
Per pydantic/pydantic#8088 (comment), IMO we should not. Offsets are a fundamentally different datatype than timezones: the UTC offset of a timezone changes with every daylight savings transition, as well as at other times when the tz rules are changed. Furthermore, offsets are very very very rarely the right solution to a problem, making them an attractive nuisance which causes far more trouble in bugs than it saves in the few cases where it's the right way. I think you can cover most reasonable cases with |
This way
zoneinfoor third party libraries can be used as well.Related: HypothesisWorks/hypothesis#3780