[New-bugs-announce] [issue39468] .python_history write permission improvements

Aurora report at bugs.python.org
Mon Jan 27 14:46:52 EST 2020


New submission from Aurora <auroralanes at pm.me>:

On a typical Linux system, if you run 'chattr +i /home/user/.python_history', and then run python, then exit, the following error message will be printed out:
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site.py", line 446, in write_history
    readline.write_history_file(history)
OSError: [Errno -1] Unknown error -1


With a simple improvement, the site module can check and suggest the user to run 'chattr -i' on the .python_history file.

Additionaly, I don't know if it's a good idea to automatically run 'chattr -i' in such a situation or not.

----------
components: Library (Lib)
messages: 360790
nosy: opensource-assist
priority: normal
severity: normal
status: open
title: .python_history write permission improvements
type: enhancement
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39468>
_______________________________________


More information about the New-bugs-announce mailing list