Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
This is an issue for a pre-existing PR#140298.
The problem lies in:
Lines 359 to 362 ina8edca6
| classTestAsyncioREPL(unittest.TestCase): | |
| deftest_multiple_statements_fail_early(self): | |
| user_input="1 / 0; print(f'afterwards: {1+1}')" | |
| p=spawn_repl("-m","asyncio") |
(I wrote this 😬)
It resorts tospawn_repl that adds-i on top of-m asyncio:
Lines 44 to 45 ina8edca6
| cmd_line= [stdin_fname,'-I','-i'] | |
| cmd_line.extend(args) |
Mixing-i with-m asyncio causes the asyncio REPL to launch first, and then a regular Python REPL--right after the former exits.
This is an expected outcome when-i and-m asyncio are mixed.
I didn't intend this result of the current setup--we want-i^<custom repl args> to run a REPL when testing without a PTY.
CPython versions tested on:
3.15
Operating systems tested on:
Linux