-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-33944: Add site.py debugging via PYTHONSITEDEBUG #12107
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
8aeb858
to
afb7cf1
Compare
Co-Authored-By: Inada Naoki <[email protected]>
afb7cf1
to
e26e98a
Compare
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.
This PR piggybacks on BPO 33944. IMO it needs a separate BPO and a more thorough discussion.
@@ -74,6 +74,11 @@ | |||
import builtins | |||
import _sitebuiltins | |||
|
|||
|
|||
if os.environ.get("PYTHONSITEDEBUG", ""): |
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.
Any PYTHON env var must be ignored when ignore environment is set.
if os.environ.get("PYTHONSITEDEBUG", ""): | |
if not sys.flags.ignore_environment and os.environ.get("PYTHONSITEDEBUG"): |
at the start of the :mod:`site` module. | ||
This is useful to diagnose issues in 3rd-party code that runs at startup. | ||
|
||
.. versionadded:: 3.8 |
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.
.. versionadded:: 3.8 | |
.. versionadded:: 3.10 |
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 |
Closed as per #12107 (review) |
https://bugs.python.org/issue33944