summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-07-30 09:43:00 (GMT)
committerGeorg Brandl <georg@python.org>2010-07-30 09:43:00 (GMT)
commit34cc0f53be27a453f56f82e0088108a907ead616 (patch)
tree2db7fcb9c03e491788788f64348e25a847b6ecb9
parent25fbb891d86ecea80d7f12d49a8aa298b9312efa (diff)
downloadcpython-34cc0f53be27a453f56f82e0088108a907ead616.zip
cpython-34cc0f53be27a453f56f82e0088108a907ead616.tar.gz
cpython-34cc0f53be27a453f56f82e0088108a907ead616.tar.bz2
#6719: In pdb, do not stop somewhere in the encodings machinery if the source file to be debugged is in a non-builtin encoding.
-rwxr-xr-xLib/pdb.py4
-rw-r--r--Misc/NEWS3
2 files changed, 7 insertions, 0 deletions
diff --git a/Lib/pdb.py b/Lib/pdb.py
index e62f913..d80a29b 100755
--- a/Lib/pdb.py
+++ b/Lib/pdb.py
@@ -413,6 +413,8 @@ class Pdb(bdb.Bdb, cmd.Cmd):
def user_return(self, frame, return_value):
"""This function is called when a return trap is set here."""
+ if self._wait_for_mainpyfile:
+ return
frame.f_locals['__return__'] = return_value
print('--Return--', file=self.stdout)
self.interaction(frame, None)
@@ -420,6 +422,8 @@ class Pdb(bdb.Bdb, cmd.Cmd):
def user_exception(self, frame, exc_info):
"""This function is called if an exception occurs,
but only if we are to stop at or just below this level."""
+ if self._wait_for_mainpyfile:
+ return
exc_type, exc_value, exc_traceback = exc_info
frame.f_locals['__exception__'] = exc_type, exc_value
exc_type_name = exc_type.__name__
diff --git a/Misc/NEWS b/Misc/NEWS
index dc8b72c..901d21f 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -475,6 +475,9 @@ C-API
Library
-------
+- Issue #6719: In pdb, do not stop somewhere in the encodings machinery
+ if the source file to be debugged is in a non-builtin encoding.
+
- Issue #8048: Prevent doctests from failing when sys.displayhook has
been reassigned.