New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-29779: New environment variable PYTHONHISTORY #13208
base: main
Are you sure you want to change the base?
bpo-29779: New environment variable PYTHONHISTORY #13208
Conversation
It can be used to set the location of a .python_history file. Co-Authored-By: Levi Sabah <0xl3vi@gmail.com>
Misc/python.man
Outdated
@@ -502,6 +502,9 @@ show how long each import takes. This is exactly equivalent to setting | |||
.IP PYTHONBREAKPOINT | |||
If this environment variable is set to 0, it disables the default debugger. It | |||
can be set to the callable of your debugger of choice. | |||
.IP PYTHONHISTORY | |||
This environment variable can be used to set the location of a history file | |||
(it is \fI~/.python_history\fP by default). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, add the windows default as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be frank, I'm not sure if the Windows default should be mentioned in the man page...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is nothing wrong with mentioning Windows ops in man
pages.
There are few other places in Docs where hardcoded value of
|
@tirkarthi The first three cases mention The fourth case mentions |
By the way, on Windows, |
The new env var does not obey the sys.flags.ignore_environment
flag. Please add a test that the new env var is ignored with -E
or -I
mode.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Could you please reword to explain what the history file actually does? It's non-obvious to users that are not familiar with readline module internals. |
I have made the requested changes; please review again. |
Thanks for making the requested changes! @tiran: please review the changes made to this pull request. |
Reword what? |
Can this be merged? It seems fairly obvious what |
Thanks for this! Please make sure there will be no problem with paths with subdirectories that might not be created. E.g. |
Any way to help get this through? It looks like it's been ready for a while. |
I'd like to see this merged as well; if there's anything I can do, I'd be happy to help. |
I would like this feature very much. @tiran and @pablogsal, please review this soon. |
What is the holdup for this merge? |
Looks like there are conflicts now which need to be resolved, and probably rebased. |
Guys, why on earth are you I was sincerely expecting to find an internal built-in variable named something like While at the same time being met with: readline.write_history_file.__doc__
# 'Save a readline history file. The default filename is ~/.history.' |
It can be used to set the location of a .python_history file.
Co-Authored-By: Levi Sabah 0xl3vi@gmail.com
https://bugs.python.org/issue29779