summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmaury Forgeot d'Arc <amauryfa@gmail.com>2009-07-09 23:20:02 (GMT)
committerAmaury Forgeot d'Arc <amauryfa@gmail.com>2009-07-09 23:20:02 (GMT)
commitd31d4f2cc4dbe882fb75a2ee5dde473b8216d73a (patch)
tree627d7fdab5719b26bc588bb5dbddfc6d700c3c7e
parent28a6001a021452bf26f58463be33ed4868cd1902 (diff)
downloadcpython-d31d4f2cc4dbe882fb75a2ee5dde473b8216d73a.zip
cpython-d31d4f2cc4dbe882fb75a2ee5dde473b8216d73a.tar.gz
cpython-d31d4f2cc4dbe882fb75a2ee5dde473b8216d73a.tar.bz2
Merged revisions 73918-73919 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r73918 | amaury.forgeotdarc | 2009-07-10 01:00:40 +0200 (ven., 10 juil. 2009) | 9 lines #6323: pdb doesn't deal well with SyntaxErrors. It seems necessary to keep two layers of 'exec' (one in Bdb.run, one in Pdb._runscript); this allows the tracing function to be active when the inner 'exec' runs and tries to compile the real code. This partially revert r58127, the net effet of the two changes is to replace "exec('%s')" with "exec(%r)". ........ r73919 | amaury.forgeotdarc | 2009-07-10 01:07:52 +0200 (ven., 10 juil. 2009) | 2 lines NEWS entry for r73918. ........
-rwxr-xr-xLib/pdb.py2
-rw-r--r--Misc/NEWS3
2 files changed, 4 insertions, 1 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index 23bc6df..d379d1a 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -1211,7 +1211,7 @@ see no sign that the breakpoint was reached.
self.mainpyfile = self.canonic(filename)
self._user_requested_quit = 0
with open(filename) as fp:
- statement = fp.read()
+ statement = "exec(%r)" % (fp.read(),)
self.run(statement)
# Simplified interface
diff --git a/Misc/NEWS b/Misc/NEWS
index b37f18e..e650b33 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -34,6 +34,9 @@ C-API
Library
-------
+- Issue #6323: The pdb debugger did not exit when running a script with a
+ syntax error.
+
- Issue #6369: Fix an RLE decompression bug in the binhex module.
- Issue #6344: Fixed a crash of mmap.read() when passed a negative argument.