Skip to content

Commit

Permalink
Merge pull request #4168 from HypothesisWorks/create-pull-request/patch
Browse files Browse the repository at this point in the history
Update pinned dependencies
  • Loading branch information
Zac-HD authored Nov 10, 2024
2 parents 32220d9 + 24abdca commit a34dad0
Show file tree
Hide file tree
Showing 11 changed files with 71 additions and 57 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ jobs:
NODE_VERSION: 18
# Note that the versions below must be updated in sync; we've automated
# that with `update_pyodide_versions()` in our weekly cronjob.
PYODIDE_VERSION: 0.26.2
PYODIDE_VERSION: 0.26.3
PYTHON_VERSION: 3.12.1
EMSCRIPTEN_VERSION: 3.1.58
steps:
Expand Down
3 changes: 3 additions & 0 deletions hypothesis-python/RELEASE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
RELEASE_TYPE: patch

This patch removes some ``# type: ignore`` comments following a :pypi:`mypy` update.
2 changes: 1 addition & 1 deletion hypothesis-python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def local_file(name):
"pytest": ["pytest>=4.6"],
"dpcontracts": ["dpcontracts>=0.4"],
"redis": ["redis>=3.0.0"],
"crosshair": ["hypothesis-crosshair>=0.0.16", "crosshair-tool>=0.0.74"],
"crosshair": ["hypothesis-crosshair>=0.0.18", "crosshair-tool>=0.0.77"],
# zoneinfo is an odd one: every dependency is platform-conditional.
"zoneinfo": [
"tzdata>=2024.2 ; sys_platform == 'win32' or sys_platform == 'emscripten'",
Expand Down
4 changes: 4 additions & 0 deletions hypothesis-python/src/hypothesis/extra/dateutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
You can use this strategy to make :func:`~hypothesis.strategies.datetimes`
and :func:`~hypothesis.strategies.times` produce timezone-aware values.
.. tip::
Consider using the stdlib :mod:`zoneinfo` module, via
:func:`st.timezones() <hypothesis.strategies.timezones>`.
"""

import datetime as dt
Expand Down
19 changes: 14 additions & 5 deletions hypothesis-python/src/hypothesis/extra/pytz.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,14 @@
This module provides :pypi:`pytz` timezones.
You can use this strategy to make
:py:func:`hypothesis.strategies.datetimes` and
:py:func:`hypothesis.strategies.times` produce timezone-aware values.
If you are unable to use the stdlib :mod:`zoneinfo` module, e.g. via the
:func:`hypothesis.strategies.timezones` strategy, you can use this
strategy with :py:func:`hypothesis.strategies.datetimes` and
:py:func:`hypothesis.strategies.times` to produce timezone-aware values.
.. deprecated:: :mod:`zoneinfo` was added
we intend to remove ``hypothesis.extra.pytz``, after libraries
such as Pandas and Django complete their own migrations.
"""

import datetime as dt
Expand All @@ -37,8 +42,12 @@ def timezones() -> st.SearchStrategy[dt.tzinfo]:
"""Any timezone in the Olsen database, as a pytz tzinfo object.
This strategy minimises to UTC, or the smallest possible fixed
offset, and is designed for use with
:py:func:`hypothesis.strategies.datetimes`.
offset, and is designed for use with :func:`hypothesis.strategies.datetimes`.
.. tip::
Prefer the :func:`hypothesis.strategies.timezones` strategy, which uses
the stdlib :mod:`zoneinfo` module and avoids `the many footguns in pytz
<https://blog.ganssle.io/articles/2018/03/pytz-fastest-footgun.html>`__.
"""
all_timezones = [pytz.timezone(tz) for tz in pytz.all_timezones]
# Some timezones have always had a constant offset from UTC. This makes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ def ip_addresses(
if v not in (None, network.version):
raise InvalidArgument(f"{v=} is incompatible with {network=}")
addr_type = IPv4Address if network.version == 4 else IPv6Address
return integers(int(network[0]), int(network[-1])).map(addr_type) # type: ignore
return integers(int(network[0]), int(network[-1])).map(addr_type)
17 changes: 8 additions & 9 deletions requirements/coverage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
annotated-types==0.7.0
# via -r requirements/coverage.in
async-timeout==4.0.3
async-timeout==5.0.1
# via redis
attrs==24.1.0
# via
Expand All @@ -18,7 +18,7 @@ click==8.1.7
# via
# -r requirements/coverage.in
# black
coverage[toml]==7.6.2
coverage[toml]==7.6.4
# via pytest-cov
dpcontracts==0.6.0
# via -r requirements/coverage.in
Expand All @@ -28,7 +28,7 @@ exceptiongroup==1.2.2 ; python_version < "3.11"
# pytest
execnet==2.1.1
# via pytest-xdist
fakeredis==2.25.1
fakeredis==2.26.1
# via -r requirements/coverage.in
iniconfig==2.0.0
# via pytest
Expand All @@ -38,12 +38,11 @@ libcst==1.5.0
# via -r requirements/coverage.in
mypy-extensions==1.0.0
# via black
numpy==2.1.2
numpy==2.1.3
# via
# -r requirements/coverage.in
# pandas
# pyarrow
packaging==24.1
packaging==24.2
# via
# black
# pytest
Expand All @@ -59,14 +58,14 @@ pluggy==1.5.0
# via pytest
ptyprocess==0.7.0
# via pexpect
pyarrow==17.0.0
pyarrow==18.0.0
# via -r requirements/coverage.in
pytest==8.3.3
# via
# -r requirements/test.in
# pytest-cov
# pytest-xdist
pytest-cov==5.0.0
pytest-cov==6.0.0
# via -r requirements/coverage.in
pytest-xdist==3.6.1
# via -r requirements/test.in
Expand All @@ -80,7 +79,7 @@ pytz==2024.2
# pandas
pyyaml==6.0.2
# via libcst
redis==5.1.1
redis==5.2.0
# via fakeredis
six==1.16.0
# via python-dateutil
Expand Down
33 changes: 16 additions & 17 deletions requirements/fuzzing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
annotated-types==0.7.0
# via -r requirements/coverage.in
async-timeout==4.0.3
async-timeout==5.0.1
# via redis
attrs==24.1.0
# via
Expand All @@ -18,7 +18,7 @@ black==24.10.0
# -r requirements/coverage.in
# hypofuzz
# hypothesis
blinker==1.8.2
blinker==1.9.0
# via flask
certifi==2024.8.30
# via requests
Expand All @@ -30,11 +30,11 @@ click==8.1.7
# black
# flask
# hypothesis
coverage[toml]==7.6.2
coverage[toml]==7.6.4
# via
# hypofuzz
# pytest-cov
dash==2.18.1
dash==2.18.2
# via hypofuzz
dash-core-components==2.0.0
# via dash
Expand All @@ -51,13 +51,13 @@ exceptiongroup==1.2.2 ; python_version < "3.11"
# pytest
execnet==2.1.1
# via pytest-xdist
fakeredis==2.25.1
fakeredis==2.26.1
# via -r requirements/coverage.in
flask==3.0.3
# via dash
hypofuzz==24.9.1
# via -r requirements/fuzzing.in
hypothesis[cli]==6.115.0
hypothesis[cli]==6.118.6
# via hypofuzz
idna==3.10
# via requests
Expand All @@ -77,7 +77,7 @@ libcst==1.5.0
# hypofuzz
markdown-it-py==3.0.0
# via rich
markupsafe==3.0.1
markupsafe==3.0.2
# via
# jinja2
# werkzeug
Expand All @@ -87,12 +87,11 @@ mypy-extensions==1.0.0
# via black
nest-asyncio==1.6.0
# via dash
numpy==2.1.2
numpy==2.1.3
# via
# -r requirements/coverage.in
# pandas
# pyarrow
packaging==24.1
packaging==24.2
# via
# black
# plotly
Expand All @@ -111,11 +110,11 @@ plotly==5.24.1
# via dash
pluggy==1.5.0
# via pytest
psutil==6.0.0
psutil==6.1.0
# via hypofuzz
ptyprocess==0.7.0
# via pexpect
pyarrow==17.0.0
pyarrow==18.0.0
# via -r requirements/coverage.in
pygments==2.18.0
# via rich
Expand All @@ -125,7 +124,7 @@ pytest==8.3.3
# hypofuzz
# pytest-cov
# pytest-xdist
pytest-cov==5.0.0
pytest-cov==6.0.0
# via -r requirements/coverage.in
pytest-xdist==3.6.1
# via -r requirements/test.in
Expand All @@ -139,15 +138,15 @@ pytz==2024.2
# pandas
pyyaml==6.0.2
# via libcst
redis==5.1.1
redis==5.2.0
# via fakeredis
requests==2.32.3
# via
# dash
# hypofuzz
retrying==1.3.4
# via dash
rich==13.9.2
rich==13.9.4
# via hypothesis
six==1.16.0
# via
Expand Down Expand Up @@ -176,13 +175,13 @@ tzdata==2024.2
# via pandas
urllib3==2.2.3
# via requests
werkzeug==3.0.4
werkzeug==3.0.6
# via
# dash
# flask
zipp==3.20.2
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
setuptools==75.1.0
setuptools==75.3.0
# via dash
2 changes: 1 addition & 1 deletion requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ execnet==2.1.1
# via pytest-xdist
iniconfig==2.0.0
# via pytest
packaging==24.1
packaging==24.2
# via pytest
pexpect==4.9.0
# via -r requirements/test.in
Expand Down
Loading

0 comments on commit a34dad0

Please sign in to comment.