Title: New REPL - readline module does not save history with write_history_file · Issue #130938 · python/cpython · GitHub
Open Graph Title: New REPL - readline module does not save history with write_history_file · Issue #130938 · python/cpython
X Title: New REPL - readline module does not save history with write_history_file · Issue #130938 · python/cpython
Description: Bug report Bug description: When using new REPL in Python 13, the readline module does not write history to the files correctly. I have checked this issue on both my host system, as well as python:alpine container from docker. Using PYTH...
Open Graph Description: Bug report Bug description: When using new REPL in Python 13, the readline module does not write history to the files correctly. I have checked this issue on both my host system, as well as python:...
X Description: Bug report Bug description: When using new REPL in Python 13, the readline module does not write history to the files correctly. I have checked this issue on both my host system, as well as python:...
Opengraph URL: https://github.com/python/cpython/issues/130938
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"New REPL - readline module does not save history with write_history_file","articleBody":"# Bug report\n\n### Bug description:\n\nWhen using new REPL in Python 13, the readline module does not write history to the files correctly.\nI have checked this issue on both my host system, as well as python:alpine container from docker.\n\nUsing PYTHON_BASIC_REPL=1 no longer causes this issue.\n\n**Expected**\nhist.txt file contains the saved commands.\n\n**Actual**\nhist.txt file is empty. Note that .python_history file does save and load history correctly.\n\n```\n/ # python -i\nPython 3.13.2 (main, Feb 14 2025, 19:28:41) [GCC 14.2.0] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n>>> import readline\n>>> print('abc')\nabc\n>>> readline.get_current_history_length()\n0\n>>> readline.set_history_length(100)\n>>> readline.get_current_history_length()\n0\n>>> readline.write_history_file('hist.txt')\n>>> \n/ # cat hist.txt \n/ # cat ~/.python_history \nimport readline\nprint('abc')\nreadline.get_current_history_length()\nreadline.set_history_length(100)\nreadline.get_current_history_length()\nreadline.write_history_file('hist.txt')\n/ # \n```\n\n\n### CPython versions tested on:\n\n3.13\n\n### Operating systems tested on:\n\nLinux","author":{"url":"https://github.com/devcode11","@type":"Person","name":"devcode11"},"datePublished":"2025-03-07T06:23:07Z","url":"https://github.com/python/cpython/issues/130938"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ea4d5b2e-f5f1-6d2e-ce45-5141871aa1d6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 82DE:33444D:36329EF:4809AD7:6B0209C8 |
| html-safe-nonce | 70c95c904011b1a87595166435c101d4b8e5750c5d9c1fe7eef46775a52a6084 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MkRFOjMzNDQ0RDozNjMyOUVGOjQ4MDlBRDc6NkIwMjA5QzgiLCJ2aXNpdG9yX2lkIjoiMzg1NjM5NjkzMDA5MTQ1Mjg3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8f0aa7d378fdc277b20f75459fa8198049e658f6ef3930f6d3814d42c2d45cf6 |
| hovercard-subject-tag | issue:2902132148 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/130938/issue_layout |
| twitter:image | https://opengraph.githubassets.com/78f3e7028ddd6baac5d2bebde42c5cbf72510fca1caeb0616232eed4dc6b3a79/python/cpython/issues/130938 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/78f3e7028ddd6baac5d2bebde42c5cbf72510fca1caeb0616232eed4dc6b3a79/python/cpython/issues/130938 |
| og:image:alt | Bug report Bug description: When using new REPL in Python 13, the readline module does not write history to the files correctly. I have checked this issue on both my host system, as well as python:... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | devcode11 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width