[Python-checkins] cpython: Issue #18081: Back out temporary changeset, 2a9e1eb3719c, to merge new patch.

terry.reedy python-checkins at python.org
Sat Jun 29 05:48:04 CEST 2013


http://hg.python.org/cpython/rev/2176c1867b34
changeset:   84365:2176c1867b34
user:        Terry Jan Reedy <tjreedy at udel.edu>
date:        Fri Jun 28 23:47:40 2013 -0400
summary:
  Issue #18081: Back out temporary changeset, 2a9e1eb3719c, to merge new patch.
If buildbots run before next push, test_logging will (temporarily) fail.

files:
  Lib/idlelib/PyShell.py |  5 ++---
  Lib/idlelib/run.py     |  4 +---
  2 files changed, 3 insertions(+), 6 deletions(-)


diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -61,6 +61,7 @@
                                               lineno, line=line))
         except OSError:
             pass  ## file (probably __stderr__) is invalid, warning dropped.
+    warnings.showwarning = idle_showwarning
     def idle_formatwarning(message, category, filename, lineno, line=None):
         """Format warnings the IDLE way"""
         s = "\nWarning (from warnings module):\n"
@@ -72,6 +73,7 @@
             s += "    %s\n" % line
         s += "%s: %s\n>>> " % (category.__name__, message)
         return s
+    warnings.formatwarning = idle_formatwarning
 
 def extended_linecache_checkcache(filename=None,
                                   orig_checkcache=linecache.checkcache):
@@ -1423,9 +1425,6 @@
 def main():
     global flist, root, use_subprocess
 
-    warnings.showwarning = idle_showwarning
-    warnings.formatwarning = idle_formatwarning
-
     use_subprocess = True
     enable_shell = False
     enable_edit = False
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -40,6 +40,7 @@
             s += "    %s\n" % line
         s += "%s: %s\n" % (category.__name__, message)
         return s
+    warnings.formatwarning = idle_formatwarning_subproc
 
 
 tcl = tkinter.Tcl()
@@ -81,9 +82,6 @@
     global exit_now
     global quitting
     global no_exitfunc
-
-    warnings.formatwarning = idle_formatwarning_subproc
-
     no_exitfunc = del_exitfunc
     #time.sleep(15) # test subprocess not responding
     try:

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list