Repository navigation
Fix runscript leaving its debugger registered after it returns - #766
Merged
Merged
Conversation
inducer
force-pushed
the
runscript-release-debugger
branch
from
November 23, 2026 19:18
1984e24 to
b0f3ad6
Compare
inducer
force-pushed
the
runscript-release-debugger
branch
from
November 23, 2026 19:23
b0f3ad6 to
212fffb
Compare
inducer
enabled auto-merge (rebase)
November 23, 2026 19:23
Owner
|
Thanks! I made a new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #656 (2024.1.2),
runscript()calleddbg.__del__()in itsfinally, which unregisters the debugger and closes thePUDB_TTYfile. "Placate ruff 0.16.5" (d08939c, in 2026.1) turned that intodel dbg, which only drops the local name: the debugger stays inDebugger._current_debugger, and the nextrunscript()in the process reuses it (%pudbcalls it each time). I ran a script that raised, quit, then ran a clean script: it opened in[POST-MORTEM MODE]andnanswered "Post-mortem mode: Can't modify state." WithPUDB_TTYset, the terminal file also stayed open afterrunscript()returned. This restores the call with a ruff suppression and adds a test topudb/test/test_run.py.