From 912bad7cd7e2c21ffde9013a2deba02cf772dbdc Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Fri, 28 Jun 2013 23:47:40 -0400 Subject: Issue #18081: Back out temporary changeset, 2a9e1eb3719c, to merge new patch. If buildbots run before next push, test_logging will (temporarily) fail. --- Lib/idlelib/PyShell.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Lib/idlelib/PyShell.py') diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py index cde389ad00..d8a5cd2433 100644 --- a/Lib/idlelib/PyShell.py +++ b/Lib/idlelib/PyShell.py @@ -61,6 +61,7 @@ else: 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 @@ else: 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 @@ echo "import sys; print(sys.argv)" | idle - "foobar" def main(): global flist, root, use_subprocess - warnings.showwarning = idle_showwarning - warnings.formatwarning = idle_formatwarning - use_subprocess = True enable_shell = False enable_edit = False -- cgit v1.2.1