Skip to content

Conversation

@encukou
Copy link
Member

@encukou encukou commented Jul 21, 2025

_pyrepl.terminfo's terminfo parsing follows ncurses and does a bunch of unnecessary (and untested) work. It can be simplified:

  • Don't parse names, booleans, and numbers. (I hope I left enough code & comments to make it easy to add these if needed.)
  • Don't store the strings as a list; populate the dict directly.
  • Use struct.iter_unpack and string_table.find instead of for loops

@ambv ambv merged commit 28153fe into python:main Jul 21, 2025
52 checks passed
@ambv ambv added the needs backport to 3.14 bugs and security fixes label Jul 21, 2025
@miss-islington-app
Copy link

Thanks @encukou for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 21, 2025
(cherry picked from commit 28153fe)

Co-authored-by: Petr Viktorin <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Jul 21, 2025

GH-136925 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 Jul 21, 2025
taegyunkim pushed a commit to taegyunkim/cpython that referenced this pull request Aug 4, 2025
Agent-Hellboy pushed a commit to Agent-Hellboy/cpython that referenced this pull request Aug 19, 2025
kumaraditya303 pushed a commit to miss-islington/cpython that referenced this pull request Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants