-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
gh-73965: New environment variable PYTHON_HISTORY #13208
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
gh-73965: New environment variable PYTHON_HISTORY #13208
Conversation
It can be used to set the location of a .python_history file. Co-Authored-By: Levi Sabah <[email protected]>
Misc/python.man
Outdated
| 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, |
tiran
left a comment
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.
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. |
|
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.' |
This comment was marked as abuse.
This comment was marked as abuse.
hugovk
left a comment
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 resolve the merge conflicts.
Misc/NEWS.d/next/Library/2019-05-08-13-14-11.bpo-29779.jg33dp.rst
Outdated
Show resolved
Hide resolved
|
I've resolved conflicts, renamed to |
|
Thanks Hugo! |
| "PYTHON_COLORS : If this variable is set to 1, the interpreter will" | ||
| " colorize various kinds of output. Setting it to 0 deactivates this behavior.\n" | ||
| "These variables have equivalent command-line parameters (see --help for details):\n" | ||
| "PYTHON_HISTORY: the location of a .python_history file.\n" |
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.
What command line parameter sets it?
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.
It doesn't have one, I compared with PYTHON_COLORS which doesn't either (#112732). Should we add one?
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.
If it doesn't have one, then it is in the wrong section.
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.
Good point, please see PR #113798 to move it to the correct section.
It can be used to set the location of a .python_history file.
Co-Authored-By: Levi Sabah [email protected]