Skip to content

Commit

Permalink
Merge pull request HypothesisWorks#3615 from HypothesisWorks/create-p…
Browse files Browse the repository at this point in the history
…ull-request/patch

Update pinned dependencies
  • Loading branch information
Zac-HD committed Apr 18, 2023
2 parents c95176c + c1799dd commit 0966b62
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 59 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,15 @@ jobs:
- check-py39-pytest46
- check-py39-pytest54
- check-pytest62
- check-django42
- check-django41
- check-django40
- check-django32
- check-pandas20
- check-pandas15
- check-pandas14
- check-pandas13
- check-pandas12
- check-pandas11
- check-py39-pandas10
fail-fast: false
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ if [ -n "${GITHUB_ACTIONS-}" ] || [ -n "${CODESPACES-}" ] ; then
else
# Otherwise, we install it from scratch
# NOTE: tooling keeps this version in sync with ci_version in tooling
"$SCRIPTS/ensure-python.sh" 3.10.10
PYTHON=$(pythonloc 3.10.10)/bin/python
"$SCRIPTS/ensure-python.sh" 3.10.11
PYTHON=$(pythonloc 3.10.11)/bin/python
fi

TOOL_REQUIREMENTS="$ROOT/requirements/tools.txt"
Expand Down
2 changes: 1 addition & 1 deletion hypothesis-python/docs/numpy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Supported versions
There is quite a lot of variation between pandas versions. We only
commit to supporting the latest version of pandas, but older minor versions are
supported on a "best effort" basis. Hypothesis is currently tested against
and confirmed working with every Pandas minor version from 1.0 through to 1.5.
and confirmed working with every Pandas minor version from 1.1 through to 2.0.

Releases that are not the latest patch release of their minor version are not
tested or officially supported, but will probably also work unless you hit a
Expand Down
2 changes: 2 additions & 0 deletions hypothesis-python/tests/nocover/test_regex.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ def conservative_regex(draw):
def test_conservative_regex_are_correct_by_construction(data):
pattern = re.compile(data.draw(CONSERVATIVE_REGEX), flags=data.draw(FLAGS))
result = data.draw(base_regex_strategy(pattern))
# We'll skip "capital I with dot above" due to awful casefolding behaviour
assume("İ" not in pattern.pattern + result)
assert pattern.search(result) is not None


Expand Down
17 changes: 13 additions & 4 deletions hypothesis-python/tests/pandas/test_indexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.

import sys

import numpy as np
import pandas
import pytest
Expand All @@ -19,12 +21,20 @@
from tests.pandas.helpers import supported_by_pandas


# https://pandas.pydata.org/docs/whatsnew/v2.0.0.html#index-can-now-hold-numpy-numeric-dtypes
@given(pdst.indexes(dtype=int, max_size=0))
def test_gets_right_dtype_for_empty_indices(ix):
assert ix.dtype == np.dtype("int64")
is_32bit = sys.maxsize == 2**32 - 1
pandas2 = pandas.__version__.startswith("2.")
windows = sys.platform == "win32" # including 64-bit windows, confusingly
if pandas2 and (is_32bit or windows):
# No, I don't know what this is int32 on 64-bit windows, but here we are.
assert ix.dtype == np.dtype("int32")
else:
assert ix.dtype == np.dtype("int64")


@given(pdst.indexes(elements=st.integers(0, 2**63 - 1), max_size=0))
@given(pdst.indexes(elements=st.integers(0, sys.maxsize), max_size=0))
def test_gets_right_dtype_for_empty_indices_with_elements(ix):
assert ix.dtype == np.dtype("int64")

Expand Down Expand Up @@ -82,8 +92,7 @@ def test_generate_arbitrary_indices(data):
st.one_of(
npst.boolean_dtypes(),
npst.integer_dtypes(endianness="="),
npst.floating_dtypes(endianness="="),
npst.complex_number_dtypes(endianness="="),
npst.floating_dtypes(endianness="=", sizes=(32, 64)),
npst.datetime64_dtypes(endianness="="),
npst.timedelta64_dtypes(endianness="="),
).filter(supported_by_pandas),
Expand Down
29 changes: 14 additions & 15 deletions hypothesis-python/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,7 @@ commands=

# Note: when adding or removing tested Pandas versions, make sure to update the
# docs in numpy.rst too. To see current download rates of each minor version:
# https://pepy.tech/project/pandas?versions=1.0.*&versions=1.1.*&versions=1.2.*&versions=1.3.*&versions=1.4.*&versions=1.5.*
[testenv:py39-pandas10]
deps =
-r../requirements/test.txt
pandas~=1.0.5
numpy~=1.23.5
commands =
python -bb -X dev -m pytest tests/pandas -n auto

# https://pepy.tech/project/pandas?versions=1.1.*&versions=1.2.*&versions=1.3.*&versions=1.4.*&versions=1.5.*&versions=2.0.*
[testenv:pandas11]
deps =
-r../requirements/test.txt
Expand All @@ -77,14 +69,21 @@ commands =
[testenv:pandas14]
deps =
-r../requirements/test.txt
pandas~=1.4.3
pandas~=1.4.4
commands =
python -bb -X dev -m pytest tests/pandas -n auto

[testenv:pandas15]
deps =
-r../requirements/test.txt
pandas~=1.5.0
pandas~=1.5.3
commands =
python -bb -X dev -m pytest tests/pandas -n auto

[testenv:pandas20]
deps =
-r../requirements/test.txt
pandas~=2.0.0
commands =
python -bb -X dev -m pytest tests/pandas -n auto
# Adding a new pandas? See comment above!
Expand All @@ -95,14 +94,14 @@ commands =
pip install django~=3.2.15
python -bb -X dev -m tests.django.manage test tests.django

[testenv:django40]
[testenv:django41]
commands =
pip install django~=4.0.7
pip install django~=4.1.0
python -bb -X dev -m tests.django.manage test tests.django

[testenv:django41]
[testenv:django42]
commands =
pip install django~=4.1.0
pip install django~=4.2.0
python -bb -X dev -m tests.django.manage test tests.django

[testenv:py{37,38,39}-nose]
Expand Down
16 changes: 8 additions & 8 deletions requirements/coverage.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,14 @@
async-timeout==4.0.2
# via redis
attrs==22.2.0
# via
# hypothesis (hypothesis-python/setup.py)
# pytest
# via hypothesis (hypothesis-python/setup.py)
black==23.3.0
# via -r requirements/coverage.in
click==8.1.3
# via
# -r requirements/coverage.in
# black
coverage==7.2.2
coverage==7.2.3
# via -r requirements/coverage.in
dpcontracts==0.6.0
# via -r requirements/coverage.in
Expand All @@ -26,7 +24,7 @@ exceptiongroup==1.1.1 ; python_version < "3.11"
# pytest
execnet==1.9.0
# via pytest-xdist
fakeredis==2.10.2
fakeredis==2.10.3
# via -r requirements/coverage.in
iniconfig==2.0.0
# via pytest
Expand All @@ -42,11 +40,11 @@ numpy==1.24.2
# via
# -r requirements/coverage.in
# pandas
packaging==23.0
packaging==23.1
# via
# black
# pytest
pandas==1.5.3
pandas==2.0.0
# via -r requirements/coverage.in
pathspec==0.11.1
# via black
Expand All @@ -58,7 +56,7 @@ pluggy==1.0.0
# via pytest
ptyprocess==0.7.0
# via pexpect
pytest==7.2.2
pytest==7.3.1
# via
# -r requirements/test.in
# pytest-xdist
Expand Down Expand Up @@ -93,3 +91,5 @@ typing-extensions==4.5.0
# typing-inspect
typing-inspect==0.8.0
# via libcst
tzdata==2023.3
# via pandas
8 changes: 3 additions & 5 deletions requirements/test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
# ./build.sh upgrade-requirements
#
attrs==22.2.0
# via
# hypothesis (hypothesis-python/setup.py)
# pytest
# via hypothesis (hypothesis-python/setup.py)
exceptiongroup==1.1.1 ; python_version < "3.11"
# via
# hypothesis (hypothesis-python/setup.py)
Expand All @@ -16,15 +14,15 @@ execnet==1.9.0
# via pytest-xdist
iniconfig==2.0.0
# via pytest
packaging==23.0
packaging==23.1
# via pytest
pexpect==4.8.0
# via -r requirements/test.in
pluggy==1.0.0
# via pytest
ptyprocess==0.7.0
# via pexpect
pytest==7.2.2
pytest==7.3.1
# via
# -r requirements/test.in
# pytest-xdist
Expand Down
33 changes: 16 additions & 17 deletions requirements/tools.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ attrs==22.2.0
# via
# flake8-bugbear
# hypothesis (hypothesis-python/setup.py)
# pytest
autoflake==2.0.2
# via shed
babel==2.12.1
Expand All @@ -25,7 +24,7 @@ backcall==0.2.0
# via ipython
bandit==1.7.5
# via flake8-bandit
beautifulsoup4==4.12.0
beautifulsoup4==4.12.2
# via sphinx-codeautolink
black==23.3.0
# via shed
Expand Down Expand Up @@ -53,9 +52,9 @@ colorama==0.4.6
# via tox
com2ann==0.3.0
# via shed
coverage==7.2.2
coverage==7.2.3
# via -r requirements/tools.in
cryptography==40.0.1
cryptography==40.0.2
# via
# secretstorage
# types-pyopenssl
Expand All @@ -64,7 +63,7 @@ decorator==5.1.1
# via ipython
distlib==0.3.6
# via virtualenv
django==4.1.7
django==4.2
# via -r requirements/tools.in
docutils==0.18.1
# via
Expand All @@ -80,7 +79,7 @@ exceptiongroup==1.1.1 ; python_version < "3.11"
# pytest
executing==1.2.0
# via stack-data
filelock==3.10.7
filelock==3.11.0
# via
# tox
# virtualenv
Expand All @@ -105,7 +104,7 @@ flake8-bugbear==23.3.23
# via -r requirements/tools.in
flake8-builtins==2.1.0
# via -r requirements/tools.in
flake8-comprehensions==3.11.1
flake8-comprehensions==3.12.0
# via -r requirements/tools.in
flake8-datetimez==20.10.0
# via -r requirements/tools.in
Expand Down Expand Up @@ -135,7 +134,7 @@ idna==3.4
# via requests
imagesize==1.4.1
# via sphinx
importlib-metadata==6.1.0
importlib-metadata==6.4.1
# via
# keyring
# twine
Expand Down Expand Up @@ -184,7 +183,7 @@ mypy-extensions==1.0.0
# typing-inspect
nodeenv==1.7.0
# via pyright
packaging==23.0
packaging==23.1
# via
# black
# build
Expand All @@ -202,7 +201,7 @@ pexpect==4.8.0
# via ipython
pickleshare==0.7.5
# via ipython
pip-tools==6.12.3
pip-tools==6.13.0
# via -r requirements/tools.in
pkginfo==1.9.6
# via twine
Expand Down Expand Up @@ -231,7 +230,7 @@ pyflakes==3.0.1
# via
# autoflake
# flake8
pygments==2.14.0
pygments==2.15.0
# via
# ipython
# readme-renderer
Expand All @@ -241,9 +240,9 @@ pyproject-api==1.5.1
# via tox
pyproject-hooks==1.0.0
# via build
pyright==1.1.301
pyright==1.1.303
# via -r requirements/tools.in
pytest==7.2.2
pytest==7.3.1
# via -r requirements/tools.in
python-dateutil==2.8.2
# via -r requirements/tools.in
Expand All @@ -267,7 +266,7 @@ restructuredtext-lint==1.4.0
# via -r requirements/tools.in
rfc3986==2.0.0
# via twine
rich==13.3.3
rich==13.3.4
# via
# bandit
# twine
Expand Down Expand Up @@ -339,7 +338,7 @@ tomli==2.0.1
# pyproject-hooks
# pytest
# tox
tox==4.4.8
tox==4.4.12
# via -r requirements/tools.in
traitlets==5.9.0
# via
Expand All @@ -351,7 +350,7 @@ types-click==7.1.8
# via -r requirements/tools.in
types-pkg-resources==0.1.3
# via -r requirements/tools.in
types-pyopenssl==23.1.0.1
types-pyopenssl==23.1.0.2
# via types-redis
types-pytz==2023.3.0.0
# via -r requirements/tools.in
Expand Down Expand Up @@ -383,7 +382,7 @@ zipp==3.15.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
pip==23.0.1
pip==23.1
# via pip-tools
setuptools==67.6.1
# via
Expand Down
9 changes: 4 additions & 5 deletions tooling/src/hypothesistooling/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ def run_tox(task, version, *args):
"3.7": "3.7.16",
"3.8": "3.8.16",
"3.9": "3.9.16",
"3.10": "3.10.10",
"3.11": "3.11.2",
"3.10": "3.10.11",
"3.11": "3.11.3",
"3.12": "3.12-dev",
"pypy3.7": "pypy3.7-7.3.9",
"pypy3.8": "pypy3.8-7.3.11",
Expand Down Expand Up @@ -443,11 +443,10 @@ def standard_tox_task(name, *args, py=ci_version):
standard_tox_task("py39-pytest54", py="3.9")
standard_tox_task("pytest62")

for n in [32, 40, 41]:
for n in [32, 41, 42]:
standard_tox_task(f"django{n}")

standard_tox_task("py39-pandas10", py="3.9")
for n in [11, 12, 13, 14, 15]:
for n in [11, 12, 13, 14, 15, 20]:
standard_tox_task(f"pandas{n}")

standard_tox_task("coverage")
Expand Down

0 comments on commit 0966b62

Please sign in to comment.