]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-152470: Make wide-character curses functions work on a narrow build (GH-152476)
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 28 Jun 2026 09:35:37 +0000 (12:35 +0300)
committerGitHub <noreply@github.com>
Sun, 28 Jun 2026 09:35:37 +0000 (12:35 +0300)
commit286b51257a60cbb29ccf3e1cd80db54497b88a10
tree032835aeb162dd4e2920ae12e626a8f5148bad9c
parent95bfaffd522675287dc176d75a4d23e708435e6d
gh-152470: Make wide-character curses functions work on a narrow build (GH-152476)

curses.window.get_wch, curses.window.get_wstr, curses.unget_wch,
curses.erasewchar, curses.killwchar and curses.wunctrl now also work when
Python is built against a non-wide curses library, on an 8-bit locale, where
each character is a single byte in the relevant encoding.  curses.ungetch now
also accepts a one-character string, like curses.unget_wch.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Doc/library/curses.rst
Doc/whatsnew/3.16.rst
Lib/test/test_curses.py
Misc/NEWS.d/next/Library/2026-06-20-02-14-55.gh-issue-151757.TP9A2x.rst
Misc/NEWS.d/next/Library/2026-06-28-12-00-00.gh-issue-152470.Wn7Kp3.rst [new file with mode: 0644]
Modules/_cursesmodule.c
Modules/clinic/_cursesmodule.c.h