diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e8a0feebbc..adf3550b76 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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: diff --git a/hypothesis-python/RELEASE.rst b/hypothesis-python/RELEASE.rst new file mode 100644 index 0000000000..88f0635d08 --- /dev/null +++ b/hypothesis-python/RELEASE.rst @@ -0,0 +1,3 @@ +RELEASE_TYPE: patch + +This patch removes some ``# type: ignore`` comments following a :pypi:`mypy` update. diff --git a/hypothesis-python/setup.py b/hypothesis-python/setup.py index 14c24b9efb..60fc257c16 100644 --- a/hypothesis-python/setup.py +++ b/hypothesis-python/setup.py @@ -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'", diff --git a/hypothesis-python/src/hypothesis/extra/dateutil.py b/hypothesis-python/src/hypothesis/extra/dateutil.py index 810d0477a2..14d1003666 100644 --- a/hypothesis-python/src/hypothesis/extra/dateutil.py +++ b/hypothesis-python/src/hypothesis/extra/dateutil.py @@ -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() `. """ import datetime as dt diff --git a/hypothesis-python/src/hypothesis/extra/pytz.py b/hypothesis-python/src/hypothesis/extra/pytz.py index 5ac18907f2..aac9f0c893 100644 --- a/hypothesis-python/src/hypothesis/extra/pytz.py +++ b/hypothesis-python/src/hypothesis/extra/pytz.py @@ -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 @@ -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 + `__. """ all_timezones = [pytz.timezone(tz) for tz in pytz.all_timezones] # Some timezones have always had a constant offset from UTC. This makes diff --git a/hypothesis-python/src/hypothesis/strategies/_internal/ipaddress.py b/hypothesis-python/src/hypothesis/strategies/_internal/ipaddress.py index 75aaaba8d7..0f5fb1bccc 100644 --- a/hypothesis-python/src/hypothesis/strategies/_internal/ipaddress.py +++ b/hypothesis-python/src/hypothesis/strategies/_internal/ipaddress.py @@ -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) diff --git a/requirements/coverage.txt b/requirements/coverage.txt index 9a7f8280c4..6c9a2fe114 100644 --- a/requirements/coverage.txt +++ b/requirements/coverage.txt @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/requirements/fuzzing.txt b/requirements/fuzzing.txt index 08d4f95a3a..aa9ddcb393 100644 --- a/requirements/fuzzing.txt +++ b/requirements/fuzzing.txt @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -139,7 +138,7 @@ 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 @@ -147,7 +146,7 @@ requests==2.32.3 # hypofuzz retrying==1.3.4 # via dash -rich==13.9.2 +rich==13.9.4 # via hypothesis six==1.16.0 # via @@ -176,7 +175,7 @@ tzdata==2024.2 # via pandas urllib3==2.2.3 # via requests -werkzeug==3.0.4 +werkzeug==3.0.6 # via # dash # flask @@ -184,5 +183,5 @@ 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 diff --git a/requirements/test.txt b/requirements/test.txt index bcbce73f98..e4e46a00ac 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -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 diff --git a/requirements/tools.txt b/requirements/tools.txt index bbb0ec3c8f..7a7edac19b 100644 --- a/requirements/tools.txt +++ b/requirements/tools.txt @@ -26,7 +26,7 @@ beautifulsoup4==4.12.3 # via sphinx-codeautolink black==24.10.0 # via shed -blinker==1.8.2 +blinker==1.9.0 # via pelican build==1.2.2.post1 # via pip-tools @@ -50,9 +50,9 @@ colorama==0.4.6 # via tox com2ann==0.3.0 # via shed -coverage==7.6.3 +coverage==7.6.4 # via -r requirements/tools.in -cryptography==43.0.1 +cryptography==43.0.3 # via # secretstorage # types-pyopenssl @@ -61,7 +61,7 @@ decorator==5.1.1 # via ipython distlib==0.3.9 # via virtualenv -django==5.1.2 +django==5.1.3 # via -r requirements/tools.in docutils==0.21.2 # via @@ -101,7 +101,7 @@ importlib-metadata==8.5.0 # twine iniconfig==2.0.0 # via pytest -ipython==8.28.0 +ipython==8.29.0 # via -r requirements/tools.in isort==5.13.2 # via shed @@ -123,7 +123,7 @@ jinja2==3.1.4 # sphinx jsonpointer==3.0.0 # via sphinx-jsonschema -keyring==25.4.1 +keyring==25.5.0 # via twine lark==1.2.2 # via -r requirements/tools.in @@ -135,7 +135,7 @@ markdown==3.7 # via pelican markdown-it-py==3.0.0 # via rich -markupsafe==3.0.1 +markupsafe==3.0.2 # via jinja2 matplotlib-inline==0.1.7 # via ipython @@ -145,7 +145,7 @@ more-itertools==10.5.0 # via # jaraco-classes # jaraco-functools -mypy==1.11.2 +mypy==1.13.0 # via -r requirements/tools.in mypy-extensions==1.0.0 # via @@ -155,11 +155,11 @@ nh3==0.2.18 # via readme-renderer nodeenv==1.9.1 # via pyright -numpy==2.1.2 +numpy==2.1.3 # via -r requirements/tools.in ordered-set==4.1.0 # via pelican -packaging==24.1 +packaging==24.2 # via # black # build @@ -213,7 +213,7 @@ pyproject-hooks==1.2.0 # via # build # pip-tools -pyright==1.1.384 +pyright==1.1.388 # via -r requirements/tools.in pytest==8.3.3 # via @@ -227,7 +227,7 @@ python-dateutil==2.9.0.post0 # pelican pytz==2024.2 # via feedgenerator -pyupgrade==3.18.0 +pyupgrade==3.19.0 # via shed pyyaml==6.0.2 # via @@ -248,11 +248,11 @@ restructuredtext-lint==1.4.0 # via -r requirements/tools.in rfc3986==2.0.0 # via twine -rich==13.9.2 +rich==13.9.4 # via # pelican # twine -ruff==0.6.9 +ruff==0.7.3 # via -r requirements/tools.in secretstorage==3.3.3 # via keyring @@ -307,7 +307,7 @@ sqlparse==0.5.1 # via django stack-data==0.6.3 # via ipython -tokenize-rt==6.0.0 +tokenize-rt==6.1.0 # via pyupgrade tomli==2.0.2 # via @@ -320,7 +320,7 @@ tomli==2.0.2 # pytest # sphinx # tox -tox==4.21.2 +tox==4.23.2 # via -r requirements/tools.in traitlets==5.14.3 # via @@ -338,7 +338,7 @@ types-pytz==2024.2.0.20241003 # via -r requirements/tools.in types-redis==4.6.0.20241004 # via -r requirements/tools.in -types-setuptools==75.1.0.20241014 +types-setuptools==75.3.0.20241107 # via types-cffi typing-extensions==4.12.2 # via @@ -357,19 +357,19 @@ urllib3==2.2.3 # via # requests # twine -virtualenv==20.26.6 +virtualenv==20.27.1 # via tox watchfiles==0.24.0 # via pelican wcwidth==0.2.13 # via prompt-toolkit -wheel==0.44.0 +wheel==0.45.0 # via pip-tools zipp==3.20.2 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: -pip==24.2 +pip==24.3.1 # via pip-tools -setuptools==75.1.0 +setuptools==75.3.0 # via pip-tools diff --git a/tooling/src/hypothesistooling/__main__.py b/tooling/src/hypothesistooling/__main__.py index 67fa285e69..a7746fc44a 100644 --- a/tooling/src/hypothesistooling/__main__.py +++ b/tooling/src/hypothesistooling/__main__.py @@ -503,7 +503,7 @@ def run_tox(task, version, *args): "3.12": "3.12.7", "3.13": "3.13.0", "3.13t": "3.13t-dev", - "3.14": "3.14-dev", + "3.14": "3.14.0a1", "3.14t": "3.14t-dev", "pypy3.9": "pypy3.9-7.3.16", "pypy3.10": "pypy3.10-7.3.17",