You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python limited history test fails when configured to use editline instead of readline #123018
While testing python3 ptests (i.e. those contained in Lib/test/) in Yocto for 3.12.5, it was noted that test_write_read_limited_history() fails if Python was configured to use libedit/editline (default) instead of readline.
With readline they pass, but due to licensing differences the former is preferred for default use. Ideally, the tests should not fail in this condition, and at minimum should be skipped (if not able to make both cases pass). We'll disable this test for now but would like to enable this test in the future if possible.
changed the title [-]Python tests fail when configured to use editline instead of readline[/-][+]Python limited history test fails when configured to use editline instead of readline[/+]on Aug 14, 2024
» ./python.exe -m test test_readline -v
== CPython 3.12.5 (tags/v3.12.5:ff3bc82f7c9, Aug 15 2024, 14:46:00) [Clang 15.0.0 (clang-1500.3.9.4)]
== macOS-14.5-arm64-arm-64bit little-endian
== Python build: debug
== cwd: /Users/sobolev/Desktop/cpython2/build/test_python_worker_9169æ
== CPU count: 12
== encodings: locale=UTF-8 FS=utf-8
== resources: all test resources are disabled, use -u option to unskip tests
Using random seed: 3936185765
0:00:00 load avg: 4.20 Run 1 test sequentially
0:00:00 load avg: 4.20 [1/1] test_readline
readline version: 0x402
readline runtime version: 0x402
readline library version: 'EditLine wrapper'
use libedit emulation? True
testHistoryUpdates (test.test_readline.TestHistoryManipulation.testHistoryUpdates) ... ok
test_nonascii_history (test.test_readline.TestHistoryManipulation.test_nonascii_history) ... ok
test_write_read_append (test.test_readline.TestHistoryManipulation.test_write_read_append) ... skipped 'append_history not available'
test_write_read_limited_history (test.test_readline.TestHistoryManipulation.test_write_read_limited_history) ... ok
test_auto_history_disabled (test.test_readline.TestReadline.test_auto_history_disabled) ... ok
test_auto_history_enabled (test.test_readline.TestReadline.test_auto_history_enabled) ... ok
test_history_size (test.test_readline.TestReadline.test_history_size) ... skipped 'this readline version does not support history-size'
test_init (test.test_readline.TestReadline.test_init) ... ok
test_nonascii (test.test_readline.TestReadline.test_nonascii) ... ok
test_set_complete_delims (test.test_readline.TestReadline.test_set_complete_delims) ... ok
test_write_read_limited_history (test.test_readline.TestReadline.test_write_read_limited_history) ... ok
----------------------------------------------------------------------
Ran 11 tests in 0.089s
OK (skipped=2)
== Tests result: SUCCESS ==
1 test OK.
Total duration: 136 ms
Total tests: run=11 skipped=2
Total test files: run=1/1
Result: SUCCESS
This is the configure log from my latest test build, if that's helpful. There's a lot of build path info there that might be tricky to parse. Not sure if there's anything obvious in there?
Activity
[-]Python tests fail when configured to use editline instead of readline[/-][+]Python limited history test fails when configured to use editline instead of readline[/+]python3: skip readline limited history tests
sobolevn commentedon Aug 15, 2024
I cannot reproduce on macos with
editline:python3: skip readline limited history tests
python3: skip readline limited history tests
threexc commentedon Aug 15, 2024
python3_configure.txt
This is the configure log from my latest test build, if that's helpful. There's a lot of build path info there that might be tricky to parse. Not sure if there's anything obvious in there?
threexc commentedon Aug 15, 2024
Failure log:
rossburton commentedon Sep 12, 2024
FYI, we've replicated this failure with Python 3.12.6.
python3: skip readline limited history tests
python3: skip readline limited history tests
python3: skip readline limited history tests
python3: skip readline limited history tests
python3: skip readline limited history tests
python3: skip readline limited history tests
python3: skip readline limited history tests
pepoluan commentedon Oct 29, 2024
This also happens with the
dev-lang/python-3.13.0package on Gentoo:USEflags:which resulted in the following
./configureinvocation:Edited to Add:
Specifying
-libeditfor the USE flag resulted in a different./configureinvocation:And the test (
test_readline) no longer fails.gpshead commentedon Sep 8, 2026
macOS libedit contains a patch fixing this. upstream (netbsd) does not appear to have that.
It can be worked around in cpython.
Upstream NetBSD bug https://gnats.netbsd.org/60322
pythongh-123018: Keep the libedit history file header when truncating
pythongh-123018: Keep the libedit history file header when truncating
gh-123018: Keep the libedit history file header when truncating (GH-1…
[3.14] gh-123018: Keep the libedit history file header when truncating (
Merge branch 'main' into tachyon-native-callable
pythongh-123018: Keep the libedit history file header when truncating (…
pythongh-123018: Keep the libedit history file header when truncating (…
[3.15] gh-123018: Keep the libedit history file header when truncating (