diff --git a/src/trio/_tests/test_exports.py b/src/trio/_tests/test_exports.py index 32a2666e4..1db92af5f 100644 --- a/src/trio/_tests/test_exports.py +++ b/src/trio/_tests/test_exports.py @@ -172,8 +172,6 @@ def no_underscores(symbols: Iterable[str]) -> set[str]: elif tool == "mypy": if not RUN_SLOW: # pragma: no cover pytest.skip("use --run-slow to check against mypy") - if sys.implementation.name != "cpython": - pytest.skip("mypy not installed in tests on pypy") cache = Path.cwd() / ".mypy_cache" @@ -266,10 +264,10 @@ def no_hidden(symbols: Iterable[str]) -> set[str]: if (not symbol.startswith("_")) or symbol.startswith("__") } - if tool == "mypy": - if sys.implementation.name != "cpython": - pytest.skip("mypy not installed in tests on pypy") + if tool == "jedi" and sys.implementation.name != "cpython": + pytest.skip("jedi does not support pypy") + if tool == "mypy": cache = Path.cwd() / ".mypy_cache" _ensure_mypy_cache_updated() diff --git a/test-requirements.in b/test-requirements.in index af8a751b1..227a25afc 100644 --- a/test-requirements.in +++ b/test-requirements.in @@ -6,22 +6,22 @@ pyright pyOpenSSL >= 22.0.0 # for the ssl + DTLS tests trustme # for the ssl + DTLS tests pylint # for pylint finding all symbols tests -jedi # for jedi code completion tests +jedi; implementation_name == "cpython" # for jedi code completion tests cryptography>=41.0.0 # cryptography<41 segfaults on pypy3.10 # Tools black; implementation_name == "cpython" -mypy; implementation_name == "cpython" -types-pyOpenSSL; implementation_name == "cpython" # and annotations +mypy ruff >= 0.4.3 astor # code generation uv >= 0.2.24 codespell # https://github.com/python-trio/trio/pull/654#issuecomment-420518745 -mypy-extensions; implementation_name == "cpython" +mypy-extensions typing-extensions -types-cffi; implementation_name == "cpython" +types-cffi +types-pyOpenSSL # annotations in doc files types-docutils sphinx diff --git a/test-requirements.txt b/test-requirements.txt index 5bbaf38f6..65c3d98cc 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -63,7 +63,7 @@ iniconfig==2.0.0 # via pytest isort==5.13.2 # via pylint -jedi==0.19.1 +jedi==0.19.1 ; implementation_name == 'cpython' # via -r test-requirements.in jinja2==3.1.4 # via sphinx @@ -71,9 +71,9 @@ markupsafe==2.1.5 # via jinja2 mccabe==0.7.0 # via pylint -mypy==1.11.1 ; implementation_name == 'cpython' +mypy==1.11.1 # via -r test-requirements.in -mypy-extensions==1.0.0 ; implementation_name == 'cpython' +mypy-extensions==1.0.0 # via # -r test-requirements.in # black @@ -87,7 +87,7 @@ packaging==24.1 # black # pytest # sphinx -parso==0.8.4 +parso==0.8.4 ; implementation_name == 'cpython' # via jedi pathspec==0.12.1 ; implementation_name == 'cpython' # via black @@ -145,15 +145,15 @@ tomlkit==0.13.2 # via pylint trustme==1.1.0 # via -r test-requirements.in -types-cffi==1.16.0.20240331 ; implementation_name == 'cpython' +types-cffi==1.16.0.20240331 # via # -r test-requirements.in # types-pyopenssl types-docutils==0.21.0.20240724 # via -r test-requirements.in -types-pyopenssl==24.1.0.20240722 ; implementation_name == 'cpython' +types-pyopenssl==24.1.0.20240722 # via -r test-requirements.in -types-setuptools==71.1.0.20240818 ; implementation_name == 'cpython' +types-setuptools==71.1.0.20240818 # via types-cffi typing-extensions==4.12.2 # via