Repository: HypothesisWorks/hypothesis

Issue:
Use pinned versions in `basic-test.sh`
This is a hack we use in `typeshed`: https://github.com/python/typeshed/blob/master/.github/workflows/tests.yml#L38

Probably the easiest way to fix this problem!
Refs https://github.com/HypothesisWorks/hypothesis/pull/3214


Discussion:
Now it looks like a broken pip cache 😒 

```
++ grep numpy== ../requirements/coverage.txt
+ pip install numpy==1.22.0
/home/runner/work/hypothesis/hypothesis/hypothesis-python/.tox/py37-full/lib/python3.7/site-packages/pip/_vendor/packaging/version.py:114: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
  DeprecationWarning,
ERROR: Could not find a version that satisfies the requirement numpy==1.22.0 (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0rc1, 1.13.0rc2, 1.13.0, 1.13.1, 1.13.3, 1.14.0rc1, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0rc1, 1.15.0rc2, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0rc1, 1.16.0rc2, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0rc1, 1.17.0rc2, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0rc1, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0rc1, 1.19.0rc2, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0rc1, 1.20.0rc2, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0rc1, 1.21.0rc2, 1.21.0, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5)
ERROR: No matching distribution found for numpy==1.22.0
ERROR: InvocationError for command /usr/bin/bash scripts/basic-test.sh (exited with code 1)
```

`coverage.txt`:

```
numpy==1.22.0
    # via
    #   -r requirements/coverage.in
    #   pandas
```
Looks like `rich` was not pinned somewhere else. `ghostwritter` is still failing. I will fix it in our codebase.
Ok, found the last problem! ` ERROR: No matching distribution found for numpy==1.22.0` happens because `numpy==1.22.0` is for `python>=3.8`

I will decrease the version number.

Resolving patch:
diff --git a/hypothesis-python/src/hypothesis/extra/cli.py b/hypothesis-python/src/hypothesis/extra/cli.py
--- a/hypothesis-python/src/hypothesis/extra/cli.py
+++ b/hypothesis-python/src/hypothesis/extra/cli.py
@@ -244,7 +244,7 @@ def write(func, writer, except_, style):  # noqa: D301  # \b disables autowrap
         else:
             code = Syntax(
                 code,
-                lexer_name="python",
+                "python",
                 background_color="default",
                 theme="default" if guess_background_color() == "light" else "monokai",
             )
diff --git a/tooling/src/hypothesistooling/__main__.py b/tooling/src/hypothesistooling/__main__.py
--- a/tooling/src/hypothesistooling/__main__.py
+++ b/tooling/src/hypothesistooling/__main__.py
@@ -384,8 +384,8 @@ def run_tox(task, version):
 # and the corresponding @python_tests function below.
 PY37 = "3.7.12"
 PY38 = PYMAIN = "3.8.12"  # Sync PYMAIN minor version with GH Actions main.yml
-PY39 = "3.9.9"
-PY310 = "3.10.1"
+PY39 = "3.9.10"
+PY310 = "3.10.2"
 PY311 = "3.11-dev"
 PYPY37 = "pypy3.7-7.3.7"
 PYPY38 = "pypy3.8-7.3.7"


Test patch: