]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#6719: In pdb, do not stop somewhere in the encodings machinery if the source file...
authorGeorg Brandl <georg@python.org>
Fri, 30 Jul 2010 09:43:00 +0000 (09:43 +0000)
committerGeorg Brandl <georg@python.org>
Fri, 30 Jul 2010 09:43:00 +0000 (09:43 +0000)
Lib/pdb.py
Misc/NEWS

index e62f91368bd8072bd7260c03365f9b1a1795f483..d80a29b689e8a3765cf3b171ac6b1d07c446141b 100755 (executable)
@@ -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__
index dc8b72c8dfb13b06418f12ce49c458ade29cd297..901d21f83205c176196be36f4e04221159790ab1 100644 (file)
--- 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.