gh-154070: Build the curses module wide by capability, not by name - #154071
Conversation
configure built the module wide (HAVE_NCURSESW) only for a backend named ncursesw. Probe for the wide API in the ncurses and auto backends too, so a widec-built ncurses keeping the plain name (pkgsrc, macOS) is built wide. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…r build The wide-character probe ran inside a nested WITH_SAVE_ENV, whose single CPPFLAGS save slot is not reentrant, so the outer restore leaked $CURSES_CFLAGS and $PANEL_CFLAGS (-D_XOPEN_SOURCE=600) into CONFIGURE_CPPFLAGS and thus into every translation unit, producing a '_XOPEN_SOURCE' redefined warning against pyconfig.h on every file. Save and restore CPPFLAGS with a dedicated variable around the probe. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
!buildbot "ARM64 MacOS M1 NoGIL" |
|
The regex '"ARM64 MacOS M1 NoGIL"' did not match any buildbot builder. Is the requested builder in the list of stable builders? |
|
!buildbot ARM64 MacOS M1 NoGIL |
|
🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit 9d58138 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F154071%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
|
!buildbot x86-64 macOS |
|
🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit 9d58138 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F154071%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
|
!buildbot AMD64 Debian root |
|
🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit 9d58138 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F154071%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
|
!buildbot x86-64 macOS PR |
|
🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit 9d58138 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F154071%2Fmerge The command will test the builders whose names match following regular expression: The builders matched are:
|
|
GH-154765 is a backport of this pull request to the 3.15 branch. |
configurechose wide vs narrow (HAVE_NCURSESW) by the pkg-config name —ncurseswwide,ncursesnarrow — but wide support is a property of the library, not its name. A widec-built ncurses that keeps the plainlibncurses/ncurses.pcname (pkgsrc on NetBSD/illumos, macOS system ncurses) was built narrow, losing the wide API and limitingaddch()/getch()/inch()to ASCII in UTF-8 locales.This runs the existing wide-API probe (
setcchar()/add_wch(), added for the nativecursesbackend in gh-136687) for thencurses/autobackends too, definingHAVE_NCURSESWby capability. On macOS, where the locale is UTF-8, this turns a nearly unusable narrow build into a wide one.Validated: Linux
ncurseswstays wide and narrowncurses/cursesstay narrow; OpenIndiana and NetBSD pkgsrc ncurses go narrow → wide (NetBSDtest_curses162 run / 1 skip SUCCESS). macOS cannot be tested locally — the buildbots will.