Repository navigation
Allow tzinfo objects for Timezone - #56
Conversation
adriangb
left a comment
There was a problem hiding this comment.
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 |
|
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