]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-46927: Prevent readline from overriding environment variables (GH-153184)
authorMathieu Dubois-Briand <mathieu.dubois-briand@hyprua.org>
Wed, 8 Jul 2026 16:45:15 +0000 (18:45 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Jul 2026 16:45:15 +0000 (16:45 +0000)
commitc9687b484102ca6dbc3489fe1e5773e0cefa8f51
tree8a77d1e9044595409c09f418f9ca48dd5d8a97a9
parentfc19ad7b8b08c43667c9087d89f32f08830544ce
gh-46927: Prevent readline from overriding environment variables (GH-153184)

Readline sets COLUMNS and LINES to the terminal size at initialization, and
ncurses prefers those stale variables over an ioctl() query, breaking resize
handling. Set rl_change_environment to 0, when available, so importing
readline no longer modifies the environment.

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Lib/test/test_readline.py
Misc/NEWS.d/next/Library/2025-05-07-18-31-31.gh-issue-46927.sF02gj.rst [new file with mode: 0644]
Modules/readline.c
configure
configure.ac
pyconfig.h.in