Skip to content

[3.12] gh-111460: Restore ncurses widechar support on macOS (GH-111878) #112034

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 14, 2023
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
:mod:`curses`: restore wide character support (including
:func:`curses.unget_wch` and :meth:`~curses.window.get_wch`) on macOS, which
was unavailable due to a regression in Python 3.12.
2 changes: 1 addition & 1 deletion configure

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

6 changes: 4 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -6439,9 +6439,11 @@ dnl remove _XOPEN_SOURCE macro from curses cflags. pyconfig.h sets
dnl the macro to 700.
CURSES_CFLAGS=$(echo $CURSES_CFLAGS | sed 's/-D_XOPEN_SOURCE=600//g')

if test "$have_curses" = no -a "$ac_sys_system" = "Darwin"; then
if test "$have_curses" != no -a "$ac_sys_system" = "Darwin"; then
dnl On macOS, there is no separate /usr/lib/libncursesw nor libpanelw.
dnl If we are here, we found a locally-supplied version of libncursesw.
dnl System-supplied ncurses combines libncurses/libpanel and supports wide
dnl characters, so we can use it like ncursesw.
dnl If a locally-supplied version of libncursesw is found, we will use that.
dnl There should also be a libpanelw.
dnl _XOPEN_SOURCE defines are usually excluded for macOS, but we need
dnl _XOPEN_SOURCE_EXTENDED here for ncurses wide char support.
Expand Down