Skip to content

test_repl.test_toplevel_contextvars_async fails under Fish in a VS Code terminal#137569

@brettcannon

Description

@brettcannon

Bug report

Bug description:

This is on VS Code insiders on Windows with a checkout in WSL.

➲ ./python -m test test_repl Using random seed: 506736770 0:00:00 load avg: 0.01 Run 1 test sequentially in a single process 0:00:00 load avg: 0.01 [1/1] test_repl test test_repl failed -- Traceback (most recent call last): File "/home/brett/Repositories/python/cpython/Lib/test/test_repl.py", line 339, in test_toplevel_contextvars_async self.assertIn(expected, output, expected) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError: 'toplevel contextvar test: ok' not found in 'asyncio REPL 3.15.0a0 (heads/main-dirty:d7dbde89588, Aug 8 2025, 14:49:47) [Clang 14.0.6 ] on linux\nUse "await" directly instead of "asyncio.run()".\nType "help", "copyright", "credits" or "license" for more information.\nException in thread Interactive thread:\nexiting asyncio REPL...\nTraceback (most recent call last):\nTraceback (most recent call last):\n File "/home/brett/Repositories/python/cpython/Lib/runpy.py", line 198, in _run_module_as_main\n return _run_code(code, main_globals, None,\n "__main__", mod_spec)\n File "/home/brett/Repositories/python/cpython/Lib/threading.py", line 1074, in _bootstrap_inner\n self._context.run(self.run)\n ~~~~~~~~~~~~~~~~~^^^^^^^^^^\n File "/home/brett/Repositories/python/cpython/Lib/asyncio/__main__.py", line 105, in run\n exec(startup_code, console.locals)\n ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/brett/.vscode-server-insiders/data/User/workspaceStorage/0abd4bd2132dfcbfde5adbe8d7792ee2/ms-python.python/pythonrc.py", line 5, in <module>\n import readline\nModuleNotFoundError: No module named \'readline\'\n File "/home/brett/Repositories/python/cpython/Lib/runpy.py", line 88, in _run_code\n exec(code, run_globals)\n ~~~~^^^^^^^^^^^^^^^^^^^\n File "/home/brett/Repositories/python/cpython/Lib/asyncio/__main__.py", line 245, in <module>\n sys.exit(return_code)\n ~~~~~~~~^^^^^^^^^^^^^\nSystemExit: 0\n>>> >>> >>> ... File "<stdin>", line 2\n await set_var()\n ^^^^^\nSyntaxError: invalid syntax\n>>> toplevel contextvar test: failed\n>>> \n' : toplevel contextvar test: ok 0:00:00 load avg: 0.17 [1/1/1] test_repl failed (1 failure) == Tests result: FAILURE == 1 test failed: test_repl Total duration: 846 ms Total tests: run=13 failures=1 Total test files: run=1/1 failed=1 Result: FAILURE 

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtopic-replRelated to the interactive shelltype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions