summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-04-25 15:11:29 (GMT)
committerGeorg Brandl <georg@python.org>2009-04-25 15:11:29 (GMT)
commit208b00d03fcd16d71dc3942daa9e3a2c7b092322 (patch)
tree832d236a32aec8ac7d47ac02ddd7c05f91b7713b /Lib
parentcf5608df8180875528f09afff00e9f898cc85cc0 (diff)
downloadcpython-208b00d03fcd16d71dc3942daa9e3a2c7b092322.zip
cpython-208b00d03fcd16d71dc3942daa9e3a2c7b092322.tar.gz
cpython-208b00d03fcd16d71dc3942daa9e3a2c7b092322.tar.bz2
#5841: add deprecation py3k warning and notice in the docs for commands module.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/commands.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/commands.py b/Lib/commands.py
index 287aa27..ccaaaee 100644
--- a/Lib/commands.py
+++ b/Lib/commands.py
@@ -18,6 +18,10 @@ Encapsulates the basic operation:
[Note: it would be nice to add functions to interpret the exit status.]
"""
+from warnings import warnpy3k
+warnpy3k("the commands module has been removed in Python 3.0; "
+ "use the subprocess module instead", stacklevel=2)
+del warnpy3k
__all__ = ["getstatusoutput","getoutput","getstatus"]
@@ -63,8 +67,6 @@ def getstatusoutput(cmd):
# Make command argument from directory and pathname (prefix space, add quotes).
#
def mk2arg(head, x):
- from warnings import warnpy3k
- warnpy3k("In 3.x, mk2arg has been removed.")
import os
return mkarg(os.path.join(head, x))
@@ -77,8 +79,6 @@ def mk2arg(head, x):
# with backslash.
#
def mkarg(x):
- from warnings import warnpy3k
- warnpy3k("in 3.x, mkarg has been removed.")
if '\'' not in x:
return ' \'' + x + '\''
s = ' "'