[3.15] gh-123018: Keep the libedit history file header when truncating (GH-157165) by miss-islington · Pull Request #157172 · python/cpython · GitHub
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions Lib/test/test_readline.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Fix :func:`readline.write_history_file` and
:func:`readline.append_history_file` producing a history file that
:func:`readline.read_history_file` could not load when a limit was set with
:func:`readline.set_history_length` and Python was built against
``libedit``. This works around `NetBSD PR 60322
<https://gnats.netbsd.org/60322>`_.
185 changes: 183 additions & 2 deletions Modules/readline.c
Loading