https://github.com/python/cpython/commit/a202e5ce1ce9e1266208887bad990dd5b92180d8 commit: a202e5ce1ce9e1266208887bad990dd5b92180d8 branch: main author: Serhiy Storchaka <[email protected]> committer: serhiy-storchaka <[email protected]> date: 2026-07-18T19:33:03+03:00 summary:
gh-153395: Fix test_complexchar on narrow curses builds (GH-154005) On a narrow build, complexchar() of a multibyte character raises OverflowError, not ValueError. Co-authored-by: Claude Opus 4.8 <[email protected]> files: M Lib/test/test_curses.py diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index 3ba79be789cf3e..915eae5ec233d5 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -2799,9 +2799,11 @@ def test_complexchar(self): # its single character. A narrow build just forms fewer cells. cc = curses.complexchar def storable(s): + # ValueError if s has combining marks on a narrow build. + # OverflowError if s is a multibyte character on a narrow build. try: cc(s) - except ValueError: + except (ValueError, OverflowError): return False return True _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
