]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #11377: platform.popen() emits a DeprecationWarning
authorVictor Stinner <victor.stinner@haypocalc.com>
Mon, 23 May 2011 22:16:16 +0000 (00:16 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Mon, 23 May 2011 22:16:16 +0000 (00:16 +0200)
Lib/platform.py

index 1e4abe64a1c60ae76bbc8801bcdce595c195ed68..e2a74fe13ca974ec0b828000252d78c346cd3471 100755 (executable)
@@ -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=''):