Skip to content

gh-64007: Do not colorize response to input() in the IDLE Shell - #157700

Merged
terryjreedy merged 5 commits into
python:mainfrom
serhiy-storchaka:gh-64007-input-colors
Sep 21, 2026
Merged

terryjreedy merged 5 commits into
python:mainfrom
serhiy-storchaka:gh-64007-input-colors

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

The Shell colorizer treated all text after the I/O mark as code, so text entered for input() got keyword and builtin colors, which stayed after Enter. Now the colorizer skips it while the Shell reads a line for input(), and the colors of text typed ahead are removed.

🤖 Generated with Claude Code

The colorizer treated all text after the I/O mark as code.  Now it
skips it while the Shell reads a line for input(), and the colors of
text typed ahead are removed.
@serhiy-storchaka serhiy-storchaka added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Sep 17, 2026
@terryjreedy

Copy link
Copy Markdown
Member

Conflict resolution needed, I presume to the merge for async output. Perhaps in the test, where both additions should be done.

@terryjreedy

terryjreedy commented Sep 20, 2026

Copy link
Copy Markdown
Member

Too complex for Claude. Root mistake was using same class name, PyShellTest, for tests needing different setups. I will first rename class for this PR, which should leave an easier-to-fix conflict in the context lines.

EDIT: failed. Renaming had no effect or conflict diff other than changing name. Adding space below and above failed.

EDIT2: I resolved conflict by accepting current main pieces and pasting in the new, renamed test class after it.

Comment thread Lib/idlelib/idle_test/test_pyshell.py
Comment thread Lib/idlelib/idle_test/test_pyshell.py
Comment thread Lib/idlelib/idle_test/test_pyshell.py
@terryjreedy terryjreedy changed the title gh-64007: Do not colorize input for input() in the IDLE Shell gh-64007: Do not colorize response to input() in the IDLE Shell output area Sep 20, 2026
@terryjreedy terryjreedy changed the title gh-64007: Do not colorize response to input() in the IDLE Shell output area gh-64007: Do not colorize response to input() in the IDLE Shell Sep 21, 2026
@terryjreedy
terryjreedy merged commit f8bbe69 into python:main Sep 21, 2026
52 checks passed
@miss-islington-app

Copy link
Copy Markdown

Thanks @serhiy-storchaka for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Sorry, @serhiy-storchaka and @terryjreedy, I could not cleanly backport this to 3.15 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker f8bbe696f152d302e7eb3eeb0587a1933cae59fc 3.15

@bedevere-app

bedevere-app Bot commented Sep 21, 2026

Copy link
Copy Markdown

GH-157877 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Sep 21, 2026
@bedevere-app

bedevere-app Bot commented Sep 21, 2026

Copy link
Copy Markdown

GH-157878 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Sep 21, 2026
@terryjreedy

terryjreedy commented Sep 21, 2026

Copy link
Copy Markdown
Member

@serhiy-storchaka I forgot what I did before
Another 3.15 merge conflict for you/Claude to be resolved by generating backport later. Draft issue added to project.

terryjreedy added a commit that referenced this pull request Sep 21, 2026
GH-157700) (#157878)

gh-64007: Do not colorize response to input() in the IDLE Shell (GH-157700)

The colorizer treated all text after the I/O mark as code.  Now it
skips it while the Shell reads a line for input(), and the colors of
text typed ahead are removed.

---------
(cherry picked from commit f8bbe69)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
terryjreedy added a commit that referenced this pull request Sep 21, 2026
GH-157700) (#157877)

gh-64007: Do not colorize response to input() in the IDLE Shell (GH-157700)

The colorizer treated all text after the I/O mark as code.  Now it
skips it while the Shell reads a line for input(), and the colors of
text typed ahead are removed.

---------
(cherry picked from commit f8bbe69)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs backport to 3.15 pre-release feature fixes, bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants