From 1db3da2bf074ade6d77d2957c1964bbb53dd9389 Mon Sep 17 00:00:00 2001 From: EXPLOSION Date: Sat, 1 Jul 2023 08:21:09 +0900 Subject: [PATCH 1/5] Prevent typing_extensions 4.7.0 --- test-requirements.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test-requirements.in b/test-requirements.in index fc94889d91..cab38ffe8d 100644 --- a/test-requirements.in +++ b/test-requirements.in @@ -39,3 +39,6 @@ isort < 5.12.0 # cryptography 40.0.2 (and presumably prior) segfaults on PyPy 3.7 cryptography < 40.0.0 + +# typing_extensions 4.7.0 breaks pylint on pypy 3.7 +typing_extensions < 4.7.0 \ No newline at end of file From 4b6d2678937fe48134e28cd67d44f2610641c17c Mon Sep 17 00:00:00 2001 From: EXPLOSION Date: Sat, 1 Jul 2023 09:28:24 +0900 Subject: [PATCH 2/5] xfail instead --- test-requirements.in | 3 --- trio/_tests/test_exports.py | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test-requirements.in b/test-requirements.in index cab38ffe8d..fc94889d91 100644 --- a/test-requirements.in +++ b/test-requirements.in @@ -39,6 +39,3 @@ isort < 5.12.0 # cryptography 40.0.2 (and presumably prior) segfaults on PyPy 3.7 cryptography < 40.0.0 - -# typing_extensions 4.7.0 breaks pylint on pypy 3.7 -typing_extensions < 4.7.0 \ No newline at end of file diff --git a/trio/_tests/test_exports.py b/trio/_tests/test_exports.py index db79434071..5b4788b472 100644 --- a/trio/_tests/test_exports.py +++ b/trio/_tests/test_exports.py @@ -75,6 +75,10 @@ def public_modules(module): ) def test_static_tool_sees_all_symbols(tool, modname, tmpdir): global mypy_cache_updated + + if tool == "pylint" and sys.version_info < (3, 8) and sys.implementation == "pypy": + pytest.xfail("typing_extensions 4.7.0 is broken on pypy 3.7") + module = importlib.import_module(modname) def no_underscores(symbols): From 187c3093c648e39453be073ad2ab2a0ea07fed41 Mon Sep 17 00:00:00 2001 From: EXPLOSION Date: Sat, 1 Jul 2023 09:35:54 +0900 Subject: [PATCH 3/5] Oops, sys.implementation is an object --- trio/_tests/test_exports.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trio/_tests/test_exports.py b/trio/_tests/test_exports.py index 5b4788b472..ebfb4e4a2b 100644 --- a/trio/_tests/test_exports.py +++ b/trio/_tests/test_exports.py @@ -76,7 +76,7 @@ def public_modules(module): def test_static_tool_sees_all_symbols(tool, modname, tmpdir): global mypy_cache_updated - if tool == "pylint" and sys.version_info < (3, 8) and sys.implementation == "pypy": + if tool == "pylint" and sys.version_info < (3, 8) and sys.implementation.name == "pypy": pytest.xfail("typing_extensions 4.7.0 is broken on pypy 3.7") module = importlib.import_module(modname) From b8f87b38002a6152dfb198e7b7ae9342c929ed7c Mon Sep 17 00:00:00 2001 From: EXPLOSION Date: Sat, 1 Jul 2023 11:18:27 +0900 Subject: [PATCH 4/5] Reformat --- trio/_tests/test_exports.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/trio/_tests/test_exports.py b/trio/_tests/test_exports.py index ebfb4e4a2b..c4aef116d8 100644 --- a/trio/_tests/test_exports.py +++ b/trio/_tests/test_exports.py @@ -76,7 +76,11 @@ def public_modules(module): def test_static_tool_sees_all_symbols(tool, modname, tmpdir): global mypy_cache_updated - if tool == "pylint" and sys.version_info < (3, 8) and sys.implementation.name == "pypy": + if ( + tool == "pylint" + and sys.version_info < (3, 8) + and sys.implementation.name == "pypy" + ): pytest.xfail("typing_extensions 4.7.0 is broken on pypy 3.7") module = importlib.import_module(modname) From a3fa648768d3a11211ae8fdbe64c864b8245ddf3 Mon Sep 17 00:00:00 2001 From: EXPLOSION Date: Sun, 2 Jul 2023 10:13:13 +0900 Subject: [PATCH 5/5] Update requirements files again --- test-requirements.in | 2 +- test-requirements.txt | 2 +- trio/_tests/test_exports.py | 8 -------- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/test-requirements.in b/test-requirements.in index fc94889d91..d95e9dc843 100644 --- a/test-requirements.in +++ b/test-requirements.in @@ -23,7 +23,7 @@ pip-tools >= 6.13.0 # typed_ast is deprecated as of 3.8, and straight up doesn't compile on 3.10-dev as of 2021-12-13 typed_ast; implementation_name == "cpython" and python_version < "3.8" mypy-extensions; implementation_name == "cpython" -typing-extensions; implementation_name == "cpython" +typing-extensions < 4.7.0 # Trio's own dependencies cffi; os_name == "nt" diff --git a/test-requirements.txt b/test-requirements.txt index f96eb2f32a..5cc5cc87f8 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -143,7 +143,7 @@ trustme==1.0.0 # via -r test-requirements.in types-pyopenssl==23.1.0.3 ; implementation_name == "cpython" # via -r test-requirements.in -typing-extensions==4.6.2 ; implementation_name == "cpython" +typing-extensions==4.6.2 # via # -r test-requirements.in # astroid diff --git a/trio/_tests/test_exports.py b/trio/_tests/test_exports.py index c4aef116d8..db79434071 100644 --- a/trio/_tests/test_exports.py +++ b/trio/_tests/test_exports.py @@ -75,14 +75,6 @@ def public_modules(module): ) def test_static_tool_sees_all_symbols(tool, modname, tmpdir): global mypy_cache_updated - - if ( - tool == "pylint" - and sys.version_info < (3, 8) - and sys.implementation.name == "pypy" - ): - pytest.xfail("typing_extensions 4.7.0 is broken on pypy 3.7") - module = importlib.import_module(modname) def no_underscores(symbols):