Skip to content

Commit

Permalink
Backport PR #506 on branch 3.x (PR: Make glob and loc kwargs of `…
Browse files Browse the repository at this point in the history
…debug_exec`) (#516)
  • Loading branch information
meeseeksmachine authored Oct 7, 2024
1 parent 51fbb9d commit cb12eda
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion spyder_kernels/customize/code_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def _debugger_exec(self, filename, continue_if_has_breakpoints):
debugger.set_remote_filename(filename)
debugger.continue_if_has_breakpoints = continue_if_has_breakpoints

def debug_exec(code, glob, loc):
def debug_exec(code, glob=None, loc=None):
return sys.call_tracing(debugger.run, (code, glob, loc))

# Enter recursive debugger
Expand Down
2 changes: 1 addition & 1 deletion spyder_kernels/customize/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def exec_encapsulate_locals(
exec_fun = exec
if filename is None:
filename = "<stdin>"
exec_fun(compile(code_ast, filename, "exec"), globals)
exec_fun(compile(code_ast, filename, "exec"), globals, None)
finally:
if use_locals_hack:
# Cleanup code
Expand Down

0 comments on commit cb12eda

Please sign in to comment.