Bug description:
window.getparent() is compiled only when the ncurses extension functions are present
(Modules/_cursesmodule.c:1854 guards the definition at :1875, and :4967 guards the
method table entry), but it calls no curses function:
if (self->orig == NULL) {
Py_RETURN_NONE;
}
return Py_NewRef((PyObject *)self->orig);
orig is set for every window (:1959), so the method works with any backend. Its
block-mates getdelay() and getscrreg() do call wgetdelay()/wgetscrreg() and need the
guard. The documentation states no availability requirement for getparent().
This matters now that curses can be built against the native curses of NetBSD and Solaris
(gh-136687). getparent() is new in 3.16 (gh-151776), so no released version is affected.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
Bug description:
window.getparent()is compiled only when the ncurses extension functions are present(
Modules/_cursesmodule.c:1854guards the definition at:1875, and:4967guards themethod table entry), but it calls no curses function:
origis set for every window (:1959), so the method works with any backend. Itsblock-mates
getdelay()andgetscrreg()do callwgetdelay()/wgetscrreg()and need theguard. The documentation states no availability requirement for
getparent().This matters now that curses can be built against the native curses of NetBSD and Solaris
(gh-136687).
getparent()is new in 3.16 (gh-151776), so no released version is affected.CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs