Commit d07ac640 authored by Georg Brandl's avatar Georg Brandl

#6126: fix pdb stepping and breakpoints by giving the executed code the...

#6126: fix pdb stepping and breakpoints by giving the executed code the correct filename; this used execfile() in 2.x which did this automatically.
parent 019f3617
...@@ -1210,8 +1210,9 @@ see no sign that the breakpoint was reached. ...@@ -1210,8 +1210,9 @@ see no sign that the breakpoint was reached.
self._wait_for_mainpyfile = 1 self._wait_for_mainpyfile = 1
self.mainpyfile = self.canonic(filename) self.mainpyfile = self.canonic(filename)
self._user_requested_quit = 0 self._user_requested_quit = 0
with open(filename) as fp: with open(filename, "rb") as fp:
statement = "exec(%r)" % (fp.read(),) statement = "exec(compile(%r, %r, 'exec'))" % \
(fp.read(), self.mainpyfile)
self.run(statement) self.run(statement)
# Simplified interface # Simplified interface
......
...@@ -169,6 +169,8 @@ Core and Builtins ...@@ -169,6 +169,8 @@ Core and Builtins
Library Library
------- -------
- Issue #6126: Fixed pdb command-line usage.
- Issue #6314: logging: performs extra checks on the "level" argument. - Issue #6314: logging: performs extra checks on the "level" argument.
- Issue #6274: Fixed possible file descriptors leak in subprocess.py - Issue #6274: Fixed possible file descriptors leak in subprocess.py
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment