Skip to content

gh-154525: Skip ncurses find_pair()/alloc_pair() reuse checks before 6.3#154543

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-dynamic-color-pairs-6.3
Jul 23, 2026
Merged

gh-154525: Skip ncurses find_pair()/alloc_pair() reuse checks before 6.3#154543
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-dynamic-color-pairs-6.3

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Jul 23, 2026

Copy link
Copy Markdown
Member

find_pair() and pair reuse in alloc_pair() were fixed in ncurses 6.3 (patch 20200411). On earlier versions find_pair() returns -1 and alloc_pair() allocates a fresh pair instead of reusing an equal one, so test_dynamic_color_pairs failed on ncurses 6.1 and 6.2.

Gate the reuse and find assertions on ncurses_version >= (6, 3); older versions still exercise free_pair().

Verified on ncursesw 6.1 (previously failing) and 6.6.

Follow-up of #154526.

…efore 6.3

find_pair() and reuse in alloc_pair() were fixed in ncurses 6.3 (patch
20200411).  On earlier versions find_pair() returns -1 and alloc_pair()
allocates a fresh pair instead of reusing an equal one, so
test_dynamic_color_pairs failed on ncurses 6.1 and 6.2.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Jul 23, 2026
@serhiy-storchaka
serhiy-storchaka enabled auto-merge (squash) July 23, 2026 15:05
@serhiy-storchaka
serhiy-storchaka merged commit 22c7970 into python:main Jul 23, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant