Skip to content

test_readline fails with libeditline+musl #159424

Open

Description

@rossburton

Bug report

When building cpython 3.14.8 on Linux with editline (instead of readline) and musl, the test_readline tests fail:

FAIL: test_append_limited_history (test.test_readline.TestHistoryManipulation.test_append_limited_history)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.14/test/test_readline.py", line 208, in test_append_limited_history
    self.assertEqual(readline.get_history_item(1), "second line")
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: '_HiStOrY_V2_' != 'second line'
- _HiStOrY_V2_
+ second line


======================================================================
FAIL: test_write_read_append (test.test_readline.TestHistoryManipulation.test_write_read_append)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.14/test/test_readline.py", line 101, in test_write_read_append
    self.assertEqual(readline.get_current_history_length(), 3)
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 4 != 3

The tests succeed when glibc is used in an otherwise identical configuration, and also worked in 3.14.7. e87da80 feels relevant.

CPython versions tested on:

3.14

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixesOS-unsupportedextension-modulesC modules in the Modules dirtype-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions