Add a st.timezones()
strategy using the stdlib zoneinfo
module
#2630
Labels
new-feature
entirely novel capabilities or strategies
Python 3.9 adds the PEP 615
zoneinfo
module to the standard library, and IMO we should add a correspondinghypothesis.strategies.timezones()
- with #2414 to skew the distribution and help it find bugs.I'm open to either adding a dependency on the backport (
zoneinfo ; python_version<"3.9"
), or just raising a runtime error if you try to use the strategy whenzoneinfo
is not available; leaning towards no dependency to avoid imposing any cost on people who aren't using it.The text was updated successfully, but these errors were encountered: