[Python-checkins] cpython: Issue #16123: IDLE - deprecate running without a subprocess.

andrew.svetlov python-checkins at python.org
Fri Oct 5 21:17:05 CEST 2012


http://hg.python.org/cpython/rev/0430986a8c03
changeset:   79497:0430986a8c03
user:        Andrew Svetlov <andrew.svetlov at gmail.com>
date:        Fri Oct 05 22:12:44 2012 +0300
summary:
  Issue #16123: IDLE - deprecate running without a subprocess.

Patch by Roger Serwy

files:
  Lib/idlelib/PyShell.py |  10 ++++++++--
  Lib/idlelib/help.txt   |   2 +-
  2 files changed, 9 insertions(+), 3 deletions(-)


diff --git a/Lib/idlelib/PyShell.py b/Lib/idlelib/PyShell.py
--- a/Lib/idlelib/PyShell.py
+++ b/Lib/idlelib/PyShell.py
@@ -1008,7 +1008,10 @@
                 self.close()
                 return False
         else:
-            nosub = "==== No Subprocess ===="
+            nosub = ("==== No Subprocess ====\n\n" +
+                    "WARNING: Running IDLE without a Subprocess is deprecated\n" + 
+                    "and will be removed in a later version. See Help/IDLE Help\n" +
+                    "for details.\n\n")
             sys.displayhook = rpc.displayhook
 
         self.write("Python %s on %s\n%s\n%s" %
@@ -1295,7 +1298,8 @@
        idle  [-dns] [-t title] - [arg]*
 
   -h         print this help message and exit
-  -n         run IDLE without a subprocess (see Help/IDLE Help for details)
+  -n         run IDLE without a subprocess (DEPRECATED,
+             see Help/IDLE Help for details)
 
 The following options will override the IDLE 'settings' configuration:
 
@@ -1373,6 +1377,8 @@
         if o == '-i':
             enable_shell = True
         if o == '-n':
+            print(" Warning: running IDLE without a subprocess is deprecated.",
+                  file=sys.stderr)
             use_subprocess = False
         if o == '-r':
             script = a
diff --git a/Lib/idlelib/help.txt b/Lib/idlelib/help.txt
--- a/Lib/idlelib/help.txt
+++ b/Lib/idlelib/help.txt
@@ -256,7 +256,7 @@
 
 	Enter idle -h at the command prompt to get a usage message.
 
-Running without a subprocess:
+Running without a subprocess: (DEPRECATED)
 
 	If IDLE is started with the -n command line switch it will run in a
 	single process and will not create the subprocess which runs the RPC

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


More information about the Python-checkins mailing list