This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author doraeric
Recipients doraeric
Date 2021-10-27.17:24:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635355461.27.0.071759404055.issue45632@roundup.psfhosted.org>
In-reply-to
Content
I noticed that in site.py, it saves history to a hard-coded location if the current history length is 0. The history is considered as not loaded if the length is 0, but it may be actually loaded from a empty file. In this case, the history is save to hard-coded ~/.python_history, and maybe another user-defined location in PYTHONSTARTUP file.

I think a better solution is to export some config or functions from site.py, so users can explicitly disable the atexit callback from site.py.

---
[site.py] https://github.com/python/cpython/blob/b9cdd0fb9c463c2503a4d854bb6529a9db58fe1b/Lib/site.py#L470-L491
History
Date User Action Args
2021-10-27 17:24:21doraericsetrecipients: + doraeric
2021-10-27 17:24:21doraericsetmessageid: <1635355461.27.0.071759404055.issue45632@roundup.psfhosted.org>
2021-10-27 17:24:21doraericlinkissue45632 messages
2021-10-27 17:24:21doraericcreate