diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 088ec5488c..569ea8f591 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -130,7 +130,7 @@ jobs: - name: Install dependencies run: | pip install --upgrade setuptools pip wheel - pip install -r requirements/test.txt fakeredis typing-extensions + pip install -r requirements/coverage.txt pip install hypothesis-python/[all] - name: Run tests run: python -m pytest --numprocesses auto hypothesis-python/tests/ --ignore=hypothesis-python/tests/quality/ --ignore=hypothesis-python/tests/ghostwriter/ diff --git a/AUTHORS.rst b/AUTHORS.rst index a8aa5b3c51..6e359a55a6 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -83,7 +83,7 @@ their individual contributions. * `Katelyn Gigante `_ * `Katrina Durance `_ * `kbara `_ -* Keeri Tramm +* `Keeri Tramm `_ * `Kristian Glass `_ * `Krzysztof PrzybyƂa `_ * `Kyle Reeve `_ (krzw92@gmail.com) diff --git a/hypothesis-python/docs/quickstart.rst b/hypothesis-python/docs/quickstart.rst index 916694bf92..6f1d00ae5f 100644 --- a/hypothesis-python/docs/quickstart.rst +++ b/hypothesis-python/docs/quickstart.rst @@ -86,7 +86,7 @@ Anyway, this test immediately finds a bug in the code: Hypothesis correctly points out that this code is simply wrong if called on an empty string. -If we fix that by just adding the following code to the beginning of the function +If we fix that by just adding the following code to the beginning of our ``encode`` function then Hypothesis tells us the code is correct (by doing nothing as you'd expect a passing test to). @@ -115,7 +115,8 @@ of data are valid inputs, or to ensure that particular edge cases such as although Hypothesis will :doc:`remember failing examples `, we don't recommend distributing that database. -It's also worth noting that both example and given support keyword arguments as +It's also worth noting that both :func:`@example ` and +:func:`@given ` support keyword arguments as well as positional. The following would have worked just as well: .. code:: python @@ -160,12 +161,6 @@ values are enough to set the count to a number different from one, followed by another distinct value which should have reset the count but in this case didn't. -The examples Hypothesis provides are valid Python code you can run. Any -arguments that you explicitly provide when calling the function are not -generated by Hypothesis, and if you explicitly provide *all* the arguments -Hypothesis will just call the underlying function once rather than -running it multiple times. - ---------- Installing ---------- diff --git a/hypothesis-python/setup.py b/hypothesis-python/setup.py index 934ecb3563..7db41d56e2 100644 --- a/hypothesis-python/setup.py +++ b/hypothesis-python/setup.py @@ -16,7 +16,8 @@ if sys.version_info[:2] < (3, 7): raise Exception( - "This version of Python is too old to install new versions of Hypothesis. " + "You are trying to install Hypothesis using Python " + f"{sys.version.split()[0]}, but it requires Python 3.7 or later." "Update `pip` and `setuptools`, try again, and you will automatically " "get the latest compatible version of Hypothesis instead. " "See also https://python3statement.org/practicalities/" diff --git a/hypothesis-python/tests/conftest.py b/hypothesis-python/tests/conftest.py index 988efaf70c..bcbd024903 100644 --- a/hypothesis-python/tests/conftest.py +++ b/hypothesis-python/tests/conftest.py @@ -37,11 +37,6 @@ if sys.version_info >= (3, 11): collect_ignore_glob.append("cover/test_asyncio.py") # @asyncio.coroutine removed - assert sys.version_info.releaselevel == "alpha" - # TODO: our traceback elision doesn't work with Python 3.11's nice new format yet - collect_ignore_glob.append("cover/test_traceback_elision.py") - collect_ignore_glob.append("pytest/test_capture.py") - def pytest_configure(config): config.addinivalue_line("markers", "slow: pandas expects this marker to exist.") diff --git a/hypothesis-python/tests/cover/test_lookup_py37.py b/hypothesis-python/tests/cover/test_lookup_py37.py index bdfbbecd9e..6a1955eb6b 100644 --- a/hypothesis-python/tests/cover/test_lookup_py37.py +++ b/hypothesis-python/tests/cover/test_lookup_py37.py @@ -163,10 +163,6 @@ def test_resolving_standard_callable_ellipsis(x: collections.abc.Callable[..., E assert isinstance(x(1, 2, 3, a=4, b=5, c=6), Elem) -@pytest.mark.skipif( - sys.version_info[:3] == (3, 11, 0), - reason="https://github.com/python/cpython/issues/91621", -) @given(...) def test_resolving_standard_callable_no_args(x: collections.abc.Callable[[], Elem]): assert isinstance(x, collections.abc.Callable) diff --git a/requirements/coverage.txt b/requirements/coverage.txt index aa9928fb1f..e2f30035ae 100644 --- a/requirements/coverage.txt +++ b/requirements/coverage.txt @@ -30,7 +30,7 @@ iniconfig==1.1.1 # via pytest lark-parser==0.12.0 # via -r requirements/coverage.in -libcst==0.4.1 +libcst==0.4.2 # via -r requirements/coverage.in mypy-extensions==0.4.3 # via @@ -104,5 +104,5 @@ typing-extensions==4.2.0 # typing-inspect typing-inspect==0.7.1 # via libcst -wrapt==1.14.0 +wrapt==1.14.1 # via deprecated diff --git a/requirements/tools.txt b/requirements/tools.txt index 8a318d6ad9..b99aa2f23d 100644 --- a/requirements/tools.txt +++ b/requirements/tools.txt @@ -51,7 +51,7 @@ commonmark==0.9.1 # via rich coverage==6.3.2 # via -r requirements/tools.in -cryptography==37.0.1 +cryptography==37.0.2 # via secretstorage decorator==5.1.1 # via ipython @@ -156,7 +156,7 @@ keyring==23.5.0 # via twine lark-parser==0.12.0 # via -r requirements/tools.in -libcst==0.4.1 +libcst==0.4.2 # via # -r requirements/tools.in # shed @@ -184,7 +184,7 @@ parso==0.8.3 # via jedi pathspec==0.9.0 # via black -pbr==5.8.1 +pbr==5.9.0 # via stevedore pep517==0.12.0 # via pip-tools @@ -234,7 +234,7 @@ pygments==2.12.0 # sphinx pyparsing==3.0.8 # via packaging -pyright==1.1.242 +pyright==1.1.245 # via -r requirements/tools.in pytest==7.1.2 # via -r requirements/tools.in @@ -242,7 +242,7 @@ python-dateutil==2.8.2 # via -r requirements/tools.in pytz==2022.1 # via babel -pyupgrade==2.32.0 +pyupgrade==2.32.1 # via shed pyyaml==6.0 # via @@ -262,7 +262,7 @@ restructuredtext-lint==1.4.0 # via -r requirements/tools.in rfc3986==2.0.0 # via twine -rich==12.3.0 +rich==12.4.0 # via twine secretstorage==3.3.2 # via keyring @@ -340,9 +340,9 @@ types-click==7.1.8 # via -r requirements/tools.in types-pkg-resources==0.1.3 # via -r requirements/tools.in -types-pytz==2021.3.7 +types-pytz==2021.3.8 # via -r requirements/tools.in -types-redis==4.2.0 +types-redis==4.2.2 # via -r requirements/tools.in typing-extensions==4.2.0 # via