summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2013-06-29 03:47:40 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2013-06-29 03:47:40 (GMT)
commit912bad7cd7e2c21ffde9013a2deba02cf772dbdc (patch)
tree483bd4cfc189e674c893670d38ca518794157b21 /Lib/idlelib
parente2563462fcef08f0e1ce6f6b02e5a0a6c1d92937 (diff)
downloadcpython-912bad7cd7e2c21ffde9013a2deba02cf772dbdc.zip
cpython-912bad7cd7e2c21ffde9013a2deba02cf772dbdc.tar.gz
cpython-912bad7cd7e2c21ffde9013a2deba02cf772dbdc.tar.bz2
Issue #18081: Back out temporary changeset, 2a9e1eb3719c, to merge new patch.
If buildbots run before next push, test_logging will (temporarily) fail.
Diffstat (limited to 'Lib/idlelib')
-rw-r--r--Lib/idlelib/PyShell.py5
-rw-r--r--Lib/idlelib/run.py4
2 files changed, 3 insertions, 6 deletions
diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
index cde389a..d8a5cd2 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
diff --git a/Lib/idlelib/run.py b/Lib/idlelib/run.py
index 74c1b89..15f4472 100644
--- a/Lib/idlelib/run.py
+++ b/Lib/idlelib/run.py
@@ -40,6 +40,7 @@ else:
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 @@ def main(del_exitfunc=False):
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: