Skip to content

Add a st.timezones() strategy using the stdlib zoneinfo module #2630

Closed
@Zac-HD

Description

@Zac-HD

Python 3.9 adds the PEP 615 zoneinfo module to the standard library, and IMO we should add a corresponding hypothesis.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 when zoneinfo is not available; leaning towards no dependency to avoid imposing any cost on people who aren't using it.

Metadata

Metadata

Assignees

Labels

new-featureentirely novel capabilities or strategies

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions