-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
bpo-32043: Rephrase -X dev documentation #4478
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
Conversation
Doc/using/cmdline.rst
Outdated
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.
Speaking of which, perhaps it would be nice to set those environment variables so that child processes launched using subprocess inherit them?
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.
Or perhaps let people set them themselves if they want to...
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's a deliberate choice to not inherit the "developer mode" to child processes. If someone would like an inherited mode, I would prefer to add a new PYTHONDEVMODE=1 environment variable, since it's more natural to inherit environment modes.
It's the same for -W ignore vs PYTHONWARNINGS=ignore.
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.
Do you think that PYTHONDEVMODE=1 is needed?
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.
Perhaps PYTHONXOPTIONS=dev? That way it would more directly parallel the -W vs PYTHONWARNINGS arrangement.
ncoghlan
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.
Couple of minor suggestions inline, but generally looks good to me.
The PYTHONXOPTIONS/PYTHONDEVMODE question should be split out to a separate tracker issue.
Doc/using/cmdline.rst
Outdated
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.
enable CPython's "developer mode", introducing additional runtime checks which are ...
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.
done
Doc/using/cmdline.rst
Outdated
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.
Typo: isuse -> issue
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.
fixed
* should not be more verbose if the code is correct * enabled checks can be "expensive"
|
I created bpo-32101: Add PYTHONDEVMODE=1 to enable the developer mode. |
https://bugs.python.org/issue32043