File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
src/hypothesis/strategies/_internal Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ their individual contributions.
56
56
* `Florian Bruhin <https://www.github.com/The-Compiler >`_
57
57
* `follower <https://www.github.com/follower >`_
58
58
* `Gary Donovan <https://www.github.com/garyd203 >`_
59
+ * `George Macon <https://www.github.com/gmacon >`_
59
60
* `Glenn Lehman <https://www.github.com/glnnlhmn >`_
60
61
* `Graham Williamson <https://github.com/00willo >`_
61
62
* `
Grant David Bachman <
https://github.com/grantbachman >`_ (
[email protected] )
Original file line number Diff line number Diff line change
1
+ RELEASE_TYPE: patch
2
+
3
+ Mention :func: `hypothesis.strategies.timezones `
4
+ in the documentation of :func: `hypothesis.strategies.datetimes ` for completeness.
5
+
6
+ Thanks to George Macon for this addition.
Original file line number Diff line number Diff line change @@ -186,9 +186,14 @@ def datetimes(
186
186
187
187
``timezones`` must be a strategy that generates either ``None``, for naive
188
188
datetimes, or :class:`~python:datetime.tzinfo` objects for 'aware' datetimes.
189
- You can construct your own, though we recommend using the :pypi:`dateutil
190
- <python-dateutil>` package and :func:`hypothesis.extra.dateutil.timezones`
191
- strategy, and also provide :func:`hypothesis.extra.pytz.timezones`.
189
+ You can construct your own, though we recommend using one of these built-in
190
+ strategies:
191
+
192
+ * with Python 3.9 or newer or :pypi:`backports.zoneinfo`:
193
+ :func:`hypothesis.strategies.timezones`;
194
+ * with :pypi:`dateutil <python-dateutil>`:
195
+ :func:`hypothesis.extra.dateutil.timezones`; or
196
+ * with :pypi:`pytz`: :func:`hypothesis.extra.pytz.timezones`.
192
197
193
198
You may pass ``allow_imaginary=False`` to filter out "imaginary" datetimes
194
199
which did not (or will not) occur due to daylight savings, leap seconds,
You can’t perform that action at this time.
0 commit comments