Skip to content

gh-132859: Run debugger scripts in their own namespaces #132860

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

Merged
merged 1 commit into from
Apr 23, 2025

Conversation

godlygeek
Copy link
Contributor

@godlygeek godlygeek commented Apr 23, 2025

Previously scripts injected by sys.remote_exec were run with the globals of the __main__ module. Instead, run each injected script with an empty set of globals. If someone really wants to use the __main__ module's namespace, they can always import __main__.

Previously scripts injected by `sys.remote_exec` were run with the
globals of the `__main__` module. Instead, run each injected script
with an empty set of globals. If someone really wants to use the
`__main__` module's namespace, they can always `import __main__`.
@godlygeek
Copy link
Contributor Author

CC @pablogsal

@pablogsal pablogsal enabled auto-merge (squash) April 23, 2025 23:24
@pablogsal pablogsal merged commit a94c752 into python:main Apr 23, 2025
49 checks passed
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 Arch Linux Asan Debug 3.x (no tier) has failed when building commit a94c752.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/585/builds/6830) and take a look at the build logs.
  4. Check if the failure is related to this commit (a94c752) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/585/builds/6830

Failed tests:

  • test_subprocess
  • test_math

Summary of the results of the build (if available):

==

Click to see traceback logs
Note: switching to 'a94c7528b596e9ec234f12ebeeb45fc731412b18'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at a94c7528b59 gh-132859: Run debugger scripts in their own namespaces (#132860)
Switched to and reset branch 'main'

make: *** [Makefile:2449: buildbottest] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants