[3.15] gh-154070: Build the curses module wide by capability, not by name (GH-154071)#154765
Open
serhiy-storchaka wants to merge 2 commits into
Open
[3.15] gh-154070: Build the curses module wide by capability, not by name (GH-154071)#154765serhiy-storchaka wants to merge 2 commits into
serhiy-storchaka wants to merge 2 commits into
Conversation
…ot by name (pythonGH-154071) configure built the module wide (HAVE_NCURSESW) only for a library found under the name ncursesw. Probe for the wide API too, so a widec-built ncurses keeping the plain name (pkgsrc, macOS) is built wide. 3.15 has no --with-curses, so the probe is guarded on curses being found rather than on the selected backend. (cherry picked from commit 2db8ca7) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
serhiy-storchaka
requested review from
AA-Turner,
corona10,
emmatyping and
erlend-aasland
as code owners
July 27, 2026 11:25
This was referenced Jul 27, 2026
Open
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, as on the main branch.
|
🤖 New build scheduled with the buildbot fleet by @serhiy-storchaka for commit 603c80f 🤖 Results will be shown at: https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F154765%2Fmerge If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of GH-154071 to 3.15.
configurebuilt the module wide (HAVE_NCURSESW) only for a library found under the namencursesw. Probe for the wide API too, so a widec-built ncurses keeping the plain name (pkgsrc, macOS) is built wide.Not a clean cherry-pick: 3.15 has no
--with-curses(GH-153992 is main-only), so the probe is guarded onhave_cursesrather than on the selected backend, and it usesWITH_SAVE_ENVinstead of savingCPPFLAGSby hand -- on 3.15 the outerWITH_SAVE_ENVhas already closed at that point.