[Python-checkins] r83269 - in python/branches/py3k: Lib/pdb.py Misc/NEWS

georg.brandl python-checkins at python.org
Fri Jul 30 11:43:00 CEST 2010


Author: georg.brandl
Date: Fri Jul 30 11:43:00 2010
New Revision: 83269

Log:
#6719: In pdb, do not stop somewhere in the encodings machinery if the source file to be debugged is in a non-builtin encoding.

Modified:
   python/branches/py3k/Lib/pdb.py
   python/branches/py3k/Misc/NEWS

Modified: python/branches/py3k/Lib/pdb.py
==============================================================================
--- python/branches/py3k/Lib/pdb.py	(original)
+++ python/branches/py3k/Lib/pdb.py	Fri Jul 30 11:43:00 2010
@@ -413,6 +413,8 @@
 
     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 @@
     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__

Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Fri Jul 30 11:43:00 2010
@@ -475,6 +475,9 @@
 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.
 


More information about the Python-checkins mailing list