Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
Description
Bug report
Bug description:
Sometimes runningmake test ormake quicktest leaves the terminal in-echo mode, which means that after the test suite runs to completion, no keyboard input is echoed until you do astty echo.
I've seen this in Python major version branches going back many releases, but I've just sighed, reset my terminal, and moved on. I actually spent a little bit of timetrying to debug the problem, but with little success. It definitely happens in the 3.13, 3.14, and cpython (3.15 dev) branches.
It happens only intermittently, so it's not reproducible. The linked branch above has my debug code in it, but even that hasn't really helped me narrow down the offending test. The best I could come up with istest_ssl because that also fails intermittently, and when it fails, it seems to leave the terminal in-echo, but the correlation isn't perfect. I.e. in pristinemain branch, you get bothecho and-echo when the full suite passes, or whentest_ssl fails.
Tested on macOS only, in Terminal.app and iTerm2. I've tried to reproduce it on a Linux VM, but haven't been able to. I suspect there's some timing issue where one of the terminal-munging tests runs in a subprocess and doesn't get reset at the right time.
Anyway, it's just an annoyance since the fix is easy:stty echo (which you have to type blind). Still I wanted to capture what I know in case anyone else has seen this and/or can make more progress on fixing it.
CPython versions tested on:
CPython main branch
Operating systems tested on:
macOS
Linked PRs
- gh-140482: Add some code to help debug the broken echo annoyance #140480
- gh-140482: Preserve and restore
stty echoas a test environment #140519 - [3.14] gh-140482: Preserve and restore
stty echoas a test environment (GH-140519) #140562 - [3.13] gh-140482: Preserve and restore
stty echoas a test environment (GH-140519) #140563