[Python-checkins] r63725 - in python/trunk: Doc/library/commands.rst Lib/commands.py

benjamin.peterson python-checkins at python.org
Mon May 26 22:41:46 CEST 2008


Author: benjamin.peterson
Date: Mon May 26 22:41:45 2008
New Revision: 63725

Log:
take Brett's advice on a few warnings


Modified:
   python/trunk/Doc/library/commands.rst
   python/trunk/Lib/commands.py

Modified: python/trunk/Doc/library/commands.rst
==============================================================================
--- python/trunk/Doc/library/commands.rst	(original)
+++ python/trunk/Doc/library/commands.rst	Mon May 26 22:41:45 2008
@@ -16,6 +16,12 @@
 processes and retrieving their results.  Using the :mod:`subprocess` module is
 preferable to using the :mod:`commands` module.
 
+.. warning::
+
+   In 3.x, :func:`getstatus` and two undocumented functions (:func:`mk2arg` and
+   :func:`mkarg`) have been removed.  Also, :func:`getstatusoutput` and
+   :func:`getoutput` have been moved to the :mod:`subprocess` module.
+
 The :mod:`commands` module defines the following functions:
 
 
@@ -42,12 +48,7 @@
 
    .. deprecated:: 2.6
       This function is nonobvious and useless, also the name is misleading in the
-      presence of :func:`getstatusoutput`.  It is removed in 3.x.
-
-.. warning::
-
-   Two undocumented functions in this module, :func:`mk2arg` and :func:`mkargs`
-   are removed in 3.x.
+      presence of :func:`getstatusoutput`.
 
 
 Example::

Modified: python/trunk/Lib/commands.py
==============================================================================
--- python/trunk/Lib/commands.py	(original)
+++ python/trunk/Lib/commands.py	Mon May 26 22:41:45 2008
@@ -64,7 +64,7 @@
 #
 def mk2arg(head, x):
     from warnings import warnpy3k
-    warnpy3k("In 3.x, mk2arg is removed.")
+    warnpy3k("In 3.x, mk2arg has been removed.")
     import os
     return mkarg(os.path.join(head, x))
 
@@ -78,7 +78,7 @@
 #
 def mkarg(x):
     from warnings import warnpy3k
-    warnpy3k("in 3.x, mkarg is remove.")
+    warnpy3k("in 3.x, mkarg has been removed.")
     if '\'' not in x:
         return ' \'' + x + '\''
     s = ' "'


More information about the Python-checkins mailing list