You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory
Possible cause
This is likely due to how GNU readline commits history information to file. As of GNU readline v8.2 (used in Python 3.10 and 3.12 among others), it creates a temporary file in the parent directory of the history file, write to that temporary file, and then rename the temporary file to the history file. See history_tempfile in histfile.c of GNU readline.
GNU readline determines the parent directory from the readlink output of the user-supplied history file path. In this case, since the history file is a symlink with a relative path, the parent directory is resolved to the relative path foo/. If foo/ doesn't exist in the CWD, history saving fails.
CPython versions tested on:
3.10, 3.12
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered:
Bug report
Bug description:
To reproduce the issue
$HOME
Possible cause
This is likely due to how GNU readline commits history information to file. As of GNU readline v8.2 (used in Python 3.10 and 3.12 among others), it creates a temporary file in the parent directory of the history file, write to that temporary file, and then rename the temporary file to the history file. See
history_tempfile
inhistfile.c
of GNU readline.GNU readline determines the parent directory from the
readlink
output of the user-supplied history file path. In this case, since the history file is a symlink with a relative path, the parent directory is resolved to the relative pathfoo/
. Iffoo/
doesn't exist in the CWD, history saving fails.CPython versions tested on:
3.10, 3.12
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered: