Skip to content

curses.complexchar / in_wch() raise "getcchar() returned ERR" on ncurses 6.1 and 6.2 #154525

Description

@serhiy-storchaka

On ncurses 6.1 and 6.2, reading a wide-character cell fails:

>>> import curses
>>> str(curses.complexchar('A'))
curses.error: getcchar() returned ERR

This breaks complexchar.__str__/.attr/.pair, window.in_wch(), window.getbkgrnd(), and -- since gh-153395 -- the curses.ascii predicates that stringify a complexchar, so test_curses fails even headless.

curses_getcchar() passes the color pair through the extended-color opts slot, but getcchar() rejected a non-NULL opts before ncurses 6.3 (patch 20210116). setcchar() is unaffected (construction succeeds). main (3.16) only.

Reported by @itamaro.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    extension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions