[pypy-svn] r73184 - pypy/trunk/pypy/tool
benjamin at codespeak.net
benjamin at codespeak.net
Tue Mar 30 18:36:19 CEST 2010
Author: benjamin
Date: Tue Mar 30 18:36:17 2010
New Revision: 73184
Modified:
pypy/trunk/pypy/tool/runsubprocess.py
Log:
silence popen2 warnings
Modified: pypy/trunk/pypy/tool/runsubprocess.py
==============================================================================
--- pypy/trunk/pypy/tool/runsubprocess.py (original)
+++ pypy/trunk/pypy/tool/runsubprocess.py Tue Mar 30 18:36:17 2010
@@ -3,7 +3,9 @@
if the current process already grew very large.
"""
-import sys, os
+import sys
+import os
+import warnings
from subprocess import PIPE, Popen
def run_subprocess(executable, args, env=None, cwd=None):
@@ -44,6 +46,9 @@
# do this at import-time, when the process is still tiny
_source = os.path.dirname(os.path.abspath(__file__))
_source = os.path.join(_source, 'runsubprocess.py') # and not e.g. '.pyc'
+ # Let's not hear about os.popen2's deprecation.
+ warnings.filterwarnings("ignore", "popen2", DeprecationWarning,
+ "runsubprocess")
_child_stdin, _child_stdout = os.popen2(
"'%s' '%s'" % (sys.executable, _source))
More information about the Pypy-commit
mailing list