]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-152325: Gate curses.has_mouse() on the ncurses patch level (GH-152652)
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 30 Jun 2026 09:09:09 +0000 (12:09 +0300)
committerGitHub <noreply@github.com>
Tue, 30 Jun 2026 09:09:09 +0000 (09:09 +0000)
commit11d42bd269788a0dd9ff954b63d7fd7139c3e46f
tree0c1916142086165bf748d1774664b1a747afd3ec
parent77181570da2d6d8f7bfca39f438ef0a893a30567
gh-152325: Gate curses.has_mouse() on the ncurses patch level (GH-152652)

has_mouse() was added to ncurses after the 5.7 release, but the binding
guarded it only with NCURSES_MOUSE_VERSION, which 5.7 already defines, so
the module failed to compile against ncurses 5.7 (such as the system
curses on macOS).  Gate it additionally on NCURSES_EXT_FUNCS, which holds
the library's patch date.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Doc/library/curses.rst
Modules/_cursesmodule.c
Modules/clinic/_cursesmodule.c.h