Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Preserve command-line history after interpreter crash #127495

Closed
Labels
stdlibStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shelltype-featureA feature request or enhancement
@skirpichev

Description

@skirpichev

When the CPython interpreter crashes - recent history entries are lost. An easy reproducer (on any Linux):

$ ulimit -v $((1024*256))$ pip install -q gmpy2$ python  # started with empty historyPython 3.14.0a2+ (heads/main:e2713409cf, Dec  2 2024, 07:50:36) [GCC 12.2.0] on linuxType "help", "copyright", "credits" or "license" for more information.>>> from gmpy2 import mpz>>> mpz(2222222222222211111111122222222222222)**33322222GNU MP: Cannot allocate memory (size=503998640)Aborted$ python  # history is empty, again :(...

That "works" both in the old repl and in the new repl. Sometimes you even can't recover all session from the terminal screen.

IMO, if it's a feature - it's a misfeature. I would expect, that all entered input will be preserved in the history. Or such behavior can be optionally turned on. BTW, this feature "doesn't work" in the IPython shell.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytopic-replRelated to the interactive shelltype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp