Skip to content

gh-151757: Skip curses variation-selector test on older macOS#153344

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-test-vs16-wcwidth
Jul 9, 2026
Merged

gh-151757: Skip curses variation-selector test on older macOS#153344
serhiy-storchaka merged 1 commit into
python:mainfrom
serhiy-storchaka:curses-test-vs16-wcwidth

Conversation

@serhiy-storchaka

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

Copy link
Copy Markdown
Member

Older macOS reports a variation selector as a spacing character (wcwidth() returns 1) instead of a zero-width combining mark, so curses cannot place it in the same cell as its base character and test_addch_emoji raises ValueError.
curses groups cells by wcwidth(), the same as ncurses, so the assertion is only valid where the platform reports the selector as zero-width; skip it elsewhere.

The failure is confirmed on macOS 14.2 (reported in the issue) and gone by macOS 26, which CI runs, so 26 is the conservative cutoff.

🤖 Generated with Claude Code

Older macOS reports a variation selector as a spacing character (wcwidth()
returns 1) instead of a zero-width combining mark, so curses cannot put it in
the same cell as its base.  Skip that assertion there.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@weixlu

weixlu commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Wow, thanks for such a quick fix! I will give it a try tomorrow and get back to you soon.

@weixlu

weixlu commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Hi, I have verified that the fix works for me :)

>>> platform.mac_ver()
('14.2', ('', '', ''), 'arm64')

@serhiy-storchaka serhiy-storchaka merged commit f3fd9dc into python:main Jul 9, 2026
53 of 54 checks passed
@serhiy-storchaka serhiy-storchaka deleted the curses-test-vs16-wcwidth branch July 9, 2026 06:28
@serhiy-storchaka

Copy link
Copy Markdown
Member Author

Thank you for verification.

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