diff --git a/Lib/_collections_abc.py b/Lib/_collections_abc.py index 601107d2d8..2ae0ef3d25 100644 --- a/Lib/_collections_abc.py +++ b/Lib/_collections_abc.py @@ -508,6 +508,10 @@ def __getitem__(self, item): new_args = (t_args, t_result) return _CallableGenericAlias(Callable, tuple(new_args)) + # TODO: RUSTPYTHON patch for common call + def __or__(self, other): + super().__or__(other) + def _is_param_expr(obj): """Checks if obj matches either a list of types, ``...``, ``ParamSpec`` or ``_ConcatenateGenericAlias`` from typing.py diff --git a/Lib/test/test_subprocess.py b/Lib/test/test_subprocess.py index 5a75971be6..7784e84eb3 100644 --- a/Lib/test/test_subprocess.py +++ b/Lib/test/test_subprocess.py @@ -1773,8 +1773,6 @@ def test_run_with_pathlike_path_and_arguments(self): res = subprocess.run(args) self.assertEqual(res.returncode, 57) - # TODO: RUSTPYTHON - @unittest.expectedFailure @unittest.skipUnless(mswindows, "Maybe test trigger a leak on Ubuntu") def test_run_with_an_empty_env(self): # gh-105436: fix subprocess.run(..., env={}) broken on Windows diff --git a/extra_tests/snippets/stdlib_typing.py b/extra_tests/snippets/stdlib_typing.py new file mode 100644 index 0000000000..12ec4d55af --- /dev/null +++ b/extra_tests/snippets/stdlib_typing.py @@ -0,0 +1,9 @@ +from collections.abc import Awaitable, Callable +from typing import TypeVar + +T = TypeVar("T") + +def abort_signal_handler( + fn: Callable[[], Awaitable[T]], on_abort: Callable[[], None] | None = None +) -> T: + pass \ No newline at end of file