Skip to content

Commit 7056185

Browse files
authored
Merge pull request #506 from impact27/fix_loc
Make `glob` and `loc` kwargs of `debug_exec`
2 parents afdcd9f + b0da61d commit 7056185

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spyder_kernels/customize/code_runner.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def _debugger_exec(self, filename, continue_if_has_breakpoints):
247247
debugger.set_remote_filename(filename)
248248
debugger.continue_if_has_breakpoints = continue_if_has_breakpoints
249249

250-
def debug_exec(code, glob, loc):
250+
def debug_exec(code, glob=None, loc=None):
251251
return sys.call_tracing(debugger.run, (code, glob, loc))
252252

253253
# Enter recursive debugger

spyder_kernels/customize/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def exec_encapsulate_locals(
206206
exec_fun = exec
207207
if filename is None:
208208
filename = "<stdin>"
209-
exec_fun(compile(code_ast, filename, "exec"), globals)
209+
exec_fun(compile(code_ast, filename, "exec"), globals, None)
210210
finally:
211211
if use_locals_hack:
212212
# Cleanup code

0 commit comments

Comments
 (0)