From e35ccc8d1164d7856cef9ed2fa378f9be2b94c85 Mon Sep 17 00:00:00 2001 From: Tian Gao Date: Tue, 28 Nov 2023 20:26:56 -0800 Subject: [PATCH 1/3] Remove WITH_APPLE_EDITLINE --- Modules/readline.c | 8 ++------ configure | 17 ----------------- configure.ac | 10 ---------- pyconfig.h.in | 3 --- 4 files changed, 2 insertions(+), 36 deletions(-) diff --git a/Modules/readline.c b/Modules/readline.c index eb9a3d4693ee90..a7e1a26ba240d8 100644 --- a/Modules/readline.c +++ b/Modules/readline.c @@ -1043,10 +1043,8 @@ on_hook(PyObject *func) static int #if defined(_RL_FUNCTION_TYPEDEF) on_startup_hook(void) -#elif defined(WITH_APPLE_EDITLINE) -on_startup_hook(const char *Py_UNUSED(text), int Py_UNUSED(state)) #else -on_startup_hook(void) +on_startup_hook(const char *Py_UNUSED(text), int Py_UNUSED(state)) #endif { int r; @@ -1065,10 +1063,8 @@ on_startup_hook(void) static int #if defined(_RL_FUNCTION_TYPEDEF) on_pre_input_hook(void) -#elif defined(WITH_APPLE_EDITLINE) -on_pre_input_hook(const char *Py_UNUSED(text), int Py_UNUSED(state)) #else -on_pre_input_hook(void) +on_pre_input_hook(const char *Py_UNUSED(text), int Py_UNUSED(state)) #endif { int r; diff --git a/configure b/configure index 319009537f461c..8894122a11e86e 100755 --- a/configure +++ b/configure @@ -23971,7 +23971,6 @@ fi - # Check whether --with-readline was given. if test ${with_readline+y} then : @@ -23994,22 +23993,6 @@ else $as_nop fi -# gh-105323: Need to handle the macOS editline as an alias of readline. -case $ac_sys_system/$ac_sys_release in #( - Darwin/*) : - ac_fn_c_check_type "$LINENO" "Function" "ac_cv_type_Function" "#include -" -if test "x$ac_cv_type_Function" = xyes -then : - printf "%s\n" "#define WITH_APPLE_EDITLINE 1" >>confdefs.h - -fi - ;; #( - *) : - - ;; -esac - if test "x$with_readline" = xreadline then : diff --git a/configure.ac b/configure.ac index b78472e04846b7..1512e6d9e8c42a 100644 --- a/configure.ac +++ b/configure.ac @@ -5914,7 +5914,6 @@ dnl library (tinfo ncursesw ncurses termcap). We now assume that libreadline dnl or readline.pc provide correct linker information. AH_TEMPLATE([WITH_EDITLINE], [Define to build the readline module against libedit.]) -AH_TEMPLATE([WITH_APPLE_EDITLINE], [Define to build the readline module against Apple BSD editline.]) AC_ARG_WITH( [readline], @@ -5931,15 +5930,6 @@ AC_ARG_WITH( [with_readline=readline] ) -# gh-105323: Need to handle the macOS editline as an alias of readline. -AS_CASE([$ac_sys_system/$ac_sys_release], - [Darwin/*], [AC_CHECK_TYPE([Function], - [AC_DEFINE([WITH_APPLE_EDITLINE])], - [], - [@%:@include ])], - [] -) - AS_VAR_IF([with_readline], [readline], [ PKG_CHECK_MODULES([LIBREADLINE], [readline], [ LIBREADLINE=readline diff --git a/pyconfig.h.in b/pyconfig.h.in index bf708926e22c43..2978fa2c17301f 100644 --- a/pyconfig.h.in +++ b/pyconfig.h.in @@ -1800,9 +1800,6 @@ /* Define if WINDOW in curses.h offers a field _flags. */ #undef WINDOW_HAS_FLAGS -/* Define to build the readline module against Apple BSD editline. */ -#undef WITH_APPLE_EDITLINE - /* Define if you want build the _decimal module using a coroutine-local rather than a thread-local context */ #undef WITH_DECIMAL_CONTEXTVAR From f6ce4955aff8ff8e60d716662a3568898881dc12 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Wed, 29 Nov 2023 04:43:34 +0000 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/Library/2023-11-29-04-43-32.gh-issue-105323.zelrW9.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/Library/2023-11-29-04-43-32.gh-issue-105323.zelrW9.rst diff --git a/Misc/NEWS.d/next/Library/2023-11-29-04-43-32.gh-issue-105323.zelrW9.rst b/Misc/NEWS.d/next/Library/2023-11-29-04-43-32.gh-issue-105323.zelrW9.rst new file mode 100644 index 00000000000000..b370d7842817bb --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-11-29-04-43-32.gh-issue-105323.zelrW9.rst @@ -0,0 +1 @@ +Remove ``WITH_APPLE_EDITLINE`` to use the same declaration for all ``editline`` From e8e4fc6ce44067d50cde01a738b80ab267996668 Mon Sep 17 00:00:00 2001 From: Tian Gao Date: Tue, 28 Nov 2023 22:46:00 -0800 Subject: [PATCH 3/3] Delete Misc/NEWS.d/next/Library/2023-11-29-04-43-32.gh-issue-105323.zelrW9.rst --- .../next/Library/2023-11-29-04-43-32.gh-issue-105323.zelrW9.rst | 1 - 1 file changed, 1 deletion(-) delete mode 100644 Misc/NEWS.d/next/Library/2023-11-29-04-43-32.gh-issue-105323.zelrW9.rst diff --git a/Misc/NEWS.d/next/Library/2023-11-29-04-43-32.gh-issue-105323.zelrW9.rst b/Misc/NEWS.d/next/Library/2023-11-29-04-43-32.gh-issue-105323.zelrW9.rst deleted file mode 100644 index b370d7842817bb..00000000000000 --- a/Misc/NEWS.d/next/Library/2023-11-29-04-43-32.gh-issue-105323.zelrW9.rst +++ /dev/null @@ -1 +0,0 @@ -Remove ``WITH_APPLE_EDITLINE`` to use the same declaration for all ``editline``