Skip to content

gh-153395: Fix test_complexchar on narrow curses builds#154005

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-ascii-narrow-test
Jul 18, 2026
Merged

gh-153395: Fix test_complexchar on narrow curses builds#154005
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-ascii-narrow-test

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

test_complexchar errors on narrow curses builds under a multibyte (e.g. UTF-8) locale: complexchar('\xe9') raises OverflowError (the character has no single-byte cell) rather than ValueError, which the storable() helper did not catch, so the non-ASCII assertions raised instead of being skipped.

This surfaced as buildbot failures on Debian root and macOS after gh-153395; the OverflowError itself is long-standing behaviour of PyCurses_ConvertToChtype, not new.

On a narrow build, complexchar() of a multibyte character raises
OverflowError, not ValueError.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@serhiy-storchaka
serhiy-storchaka merged commit a202e5c into python:main Jul 18, 2026
58 checks passed
@serhiy-storchaka
serhiy-storchaka deleted the curses-ascii-narrow-test branch July 18, 2026 16:33
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.

2 participants