Issue #11377: platform.popen() emits a DeprecationWarning

This commit is contained in:
Victor Stinner 2011-05-24 00:16:16 +02:00
parent a9100721e9
commit 25000d4d31
1 changed files with 2 additions and 0 deletions

View File

@ -361,6 +361,8 @@ def popen(cmd, mode='r', bufsize=-1):
""" Portable popen() interface.
"""
import warnings
warnings.warn('use os.popen instead', DeprecationWarning, stacklevel=2)
return os.popen(cmd, mode, bufsize)
def _norm_version(version, build=''):