Bug description:
The docs say complexchar stores the color pair separately and without the
color_pair() limit, but on a wide build attr carries the packed pair and saturates
at 255:
>>> curses.complexchar("A", curses.A_BOLD, 1).attr == curses.A_BOLD
False
>>> hex(curses.complexchar("A", 0, 300).attr), curses.complexchar("A", 0, 300).pair
('0xff00', 300)
>>> hex(curses.complexchar("A", 0, 1000).attr)
curses_cell_attr_pair() returns getcchar()'s attrs, which include A_COLOR. Its
narrow branch already masks that out, as GH-154703 did for inch().
complexchar is new in 3.16, so no released version is affected.
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs
Bug description:
The docs say
complexcharstores the color pair separately and without thecolor_pair()limit, but on a wide buildattrcarries the packed pair and saturatesat 255:
curses_cell_attr_pair()returnsgetcchar()'s attrs, which includeA_COLOR. Itsnarrow branch already masks that out, as GH-154703 did for
inch().complexcharis new in 3.16, so no released version is affected.CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux
Linked PRs