Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/test/test_readline.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def test_write_read_limited_history(self):
# So, we've only tested that the read did not fail.
# See TestHistoryManipulation for the full test.

@unittest.skipUnless(sysconfig.get_config_var("HAVE_RL_CHANGE_ENVIRONMENT"),
@unittest.skipUnless(sysconfig.get_config_var("_Py_HAVE_RL_CHANGE_ENVIRONMENT"),
"readline can modify the environment")
def test_environment_is_not_modified(self):
# os.environ contains environment at the time "os" module was loaded, so
Expand Down
2 changes: 1 addition & 1 deletion Modules/readline.c
Original file line number Diff line number Diff line change
Expand Up @@ -1543,7 +1543,7 @@ setup_readline(readlinestate *mod_state)
/* The name must be defined before initialization */
rl_readline_name = "python";

#ifdef HAVE_RL_CHANGE_ENVIRONMENT
#ifdef _Py_HAVE_RL_CHANGE_ENVIRONMENT
/* Prevent readline from setting the LINES and COLUMNS environment
* variables: ncurses prefers them over an ioctl() query, so a stale value
* left after a resize breaks SIGWINCH / KEY_RESIZE handling (gh-46927). */
Expand Down
1 change: 0 additions & 1 deletion Tools/build/check_capi_macros_ignored.txt
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,6 @@ HAVE_RECVFROM
HAVE_RENAMEAT
HAVE_RL_APPEND_HISTORY
HAVE_RL_CATCH_SIGNAL
HAVE_RL_CHANGE_ENVIRONMENT
HAVE_RL_COMPDISP_FUNC_T
HAVE_RL_COMPLETION_APPEND_CHARACTER
HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK
Expand Down
2 changes: 1 addition & 1 deletion configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -7261,7 +7261,7 @@ AS_VAR_IF([with_readline], [no], [
)
])
AS_VAR_IF([ac_cv_readline_rl_change_environment], [yes], [
AC_DEFINE([HAVE_RL_CHANGE_ENVIRONMENT], [1], [Define if you have readline 6.3])
AC_DEFINE([_Py_HAVE_RL_CHANGE_ENVIRONMENT], [1], [Define if you have readline 6.3])
])

# check for readline 4.2
Expand Down
6 changes: 3 additions & 3 deletions pyconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -1143,9 +1143,6 @@
/* Define if you can turn off readline's signal handling. */
#undef HAVE_RL_CATCH_SIGNAL

/* Define if you have readline 6.3 */
#undef HAVE_RL_CHANGE_ENVIRONMENT

/* Define to 1 if the system has the type 'rl_compdisp_func_t'. */
#undef HAVE_RL_COMPDISP_FUNC_T

Expand Down Expand Up @@ -2164,6 +2161,9 @@
/* Define if you have the 'pthread_attr_get_np' function. */
#undef _Py_HAVE_PTHREAD_ATTR_GET_NP

/* Define if you have readline 6.3 */
#undef _Py_HAVE_RL_CHANGE_ENVIRONMENT

/* Define if you have the 'sinpi' function. */
#undef _Py_HAVE_SINPI

Expand Down
Loading