GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test_curses failures on Python 3.16.0a1 with ncurses 6.6 on openSUSE · Issue #159579 · python/cpython

test_curses failures on Python 3.16.0a1 with ncurses 6.6 on openSUSE #159579

New issue
Copy link
New issue
Copy link
Open
Open
test_curses failures on Python 3.16.0a1 with ncurses 6.6 on openSUSE#159579
Copy link
Assignees
serhiy-storchaka
Labels
OS-linuxbuildThe build process and cross-buildThe build process and cross-buildextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-cursestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@mcepl
mcepl
opened on Oct 16, 2026
Issue body actions

Bug report

Description

Building Python 3.16.0a1 as an openSUSE RPM fails during the test suite because of failures in test_curses. The failures occur both in the initial run and when the test runner reruns the failed tests.

Environment

  • Python 3.16.0a1, built from Python-3.16.0a1.tar.xz
  • openSUSE OBS build environment, Linux x86_64
  • ncurses package version 6.6.20260926-115.1
  • TERM=linux
  • _curses compiled with -I/usr/include/ncursesw and linked with -lncursesw
  • Distribution patches applied. I have not yet reproduced this with an unpatched upstream checkout.

The tests report:

ncurses_version = curses.ncurses_version(major=6, minor=6, patch=20260926)

How the tests were run

The RPM's %check step runs make test with options including:

-u curses,-network -v -i test_freeze_simple_script --timeout=5400

The invocation also excludes some distribution-selected tests.

Failures

The failures fall into several groups. I do not know whether they share a cause.

Input and input pushback

test_get_wstr returns an empty string instead of the queued input:

FAIL: test_get_wstr (test.test_curses.TestCurses.test_get_wstr) (s='Lorem')
  File "Lib/test/test_curses.py", line 1352, in test_get_wstr
    self.assertEqual(win.get_wstr(0, 0), s)
AssertionError: '' != 'Lorem'

test_getstr fails while pushing input:

ERROR: test_getstr (test.test_curses.TestCurses.test_getstr)
  File "Lib/test/test_curses.py", line 1324, in test_getstr
    curses.ungetch(c)
curses.error: unget_wch() (called by ungetch()) returned ERR

The source routes string arguments to ungetch() through unget_wch(), while test_getch pushes strings and reads them using getch(). Could this contribute to these failures?

On the rerun, textbox input tests also fail with:

curses.error: wget_wch() (called by get_wch()): no input

Some input failures may be secondary to unread input left by earlier failed tests.

Textbox lower-right cell

The final character is missing in several textbox tests:

test_textbox_fill_last_cell:
AssertionError: 'abc ' != 'abcd'

test_textbox_fill_last_cell_insert_mode:
AssertionError: 'abc ' != 'abcd'

test_textbox_fill_last_cell_multiline:
AssertionError: 'abc\nde \n' != 'abc\ndef\n'

test_textbox_fill_last_cell_scrollok:
AssertionError: 'abc\nde \n' != 'abc\ndef\n'

Textbox._insert_printable_char() uses insch() for the lower-right cell.

WACS constants

test_wacs_in_cell_methods fails when reading back WACS_DIAMOND:

  File "Lib/test/test_curses.py", line 617, in test_wacs_in_cell_methods
    self.assertEqual(stdscr.in_wch(1, 0), curses.WACS_DIAMOND)
AssertionError: curses.complexchar('E', attr=1162149888, pair=69) != <curses.complexchar object at 0x7f4252bc49c0>

On the rerun, test_wacs_line_constants also raises the following for D_TTEE, T_ULCORNER, and T_URCORNER:

curses.error: getcchar() returned ERR

Overall result

1 test failed:
    test_curses

467 tests OK.

Total tests: run=51,162 (filtered) failures=29 skipped=2,517
Total test files: run=541/549 (filtered) failed=1 skipped=72 resource_denied=9 rerun=1
Result: FAILURE

Related feature work includes #152233 and #155863. I have not found an existing report matching these failures.

CPython versions tested on:

3.16

Operating systems tested on:

Linux

Activity

  1. mcepl
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Oct 16, 2026
  2. picnixz
    added
    buildThe build process and cross-buildThe build process and cross-build
    OS-linux
    topic-curses
    extension-modulesC modules in the Modules dirC modules in the Modules dir
    and removed
    buildThe build process and cross-buildThe build process and cross-build
    OS-linux
    topic-curses
    on Oct 16, 2026
  3. picnixz commented on Oct 16, 2026

    @picnixz
    picnixz
    on Oct 16, 2026
    Member
    More actions

    cc @serhiy-storchaka

  4. serhiy-storchaka
    self-assigned this
    on Oct 16, 2026
  5. serhiy-storchaka
    added this to Curses issueson Oct 18, 2026
  6. serhiy-storchaka commented on Oct 18, 2026

    @serhiy-storchaka
    serhiy-storchaka
    on Oct 18, 2026
    Member
    More actions

    Thank you for the detailed report, @mcepl. I reproduced all of these on openSUSE Tumbleweed with libncurses6-6.6.20260926-115.1. None of them is a bug in Python; there are three separate causes:

    • The lower-right Textbox cell (test_textbox_fill_last_cell*): a regression in ncurses 6.6-20260815, still present in 20261017. insch() and ins_wch() in the last column of a line insert nothing and return OK, and Textbox writes its lower-right cell with insch(). Reported in https://lists.gnu.org/archive/html/bug-ncurses/2026-10/msg00007.html.
    • The WACS constants (test_wacs_*): since ncurses 6.6-20260523, only the first screen gets a table of wide ACS characters, and it is freed with that screen. In a reentrant build like openSUSE's, the WACS_* constants then point to freed memory; in other builds they become NULL. Reported in https://lists.gnu.org/archive/html/bug-ncurses/2026-10/msg00008.html.
    • The input tests (test_getch, test_getstr, test_get_wstr, the Textbox editing tests), which fail only in UTF-8 locales: openSUSE's FORTIFY_SOURCE_3-fix.patch makes unget_wch() push back MB_CUR_MAX bytes per character, so each character is followed by five uninitialized bytes. The failures on rerun follow from the garbage left in the input queue. Reported in https://bugzilla.opensuse.org/show_bug.cgi?id=1285901.

    On the current main branch, test_resizeterm can also fail after the soft-label tests. That is an older ncurses bug, which is now visible because curses.LINES is taken from the size of stdscr. Reported in https://lists.gnu.org/archive/html/bug-ncurses/2026-10/msg00009.html.

  7. kevinprimeraquecreo-stack
    added this to Project_VKand Project_VKon Oct 18, 2026
  8. github-project-automation
    moved this to Todo in Project_VKon Oct 18, 2026
  9. mcepl commented on Oct 23, 2026

    @mcepl
    mcepl
    on Oct 23, 2026
    ContributorAuthor
    More actions

    @serhiy-storchaka thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @serhiy-storchaka
    serhiy-storchaka

Labels

OS-linuxbuildThe build process and cross-buildThe build process and cross-buildextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-cursestype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Projects

  • Curses issues
    Status
    No status
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.