[Python-checkins] cpython: Issue #11377: platform.popen() emits a DeprecationWarning

victor.stinner python-checkins at python.org
Tue May 24 00:17:00 CEST 2011


http://hg.python.org/cpython/rev/e44b851d0a2b
changeset: 70323:e44b851d0a2b
parent: 70321:202d973e8bf5
user: Victor Stinner <victor.stinner at haypocalc.com>
date: Tue May 24 00:16:16 2011 +0200
summary:
 Issue #11377: platform.popen() emits a DeprecationWarning
files:
 Lib/platform.py | 2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Lib/platform.py b/Lib/platform.py
--- a/Lib/platform.py
+++ b/Lib/platform.py
@@ -361,6 +361,8 @@
 
 """ 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=''):
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /