issue7213 + issue2320: Cause a DeprecationWarning if the close_fds argument is
not passed to subprocess.Popen as the default value will be changing in a
future Python to the safer and more often desired value of True.
DeprecationWarnings that show up in a lot of existing code are controversial
and have caused pain in the past. I'd like to leave this on for 3.2 beta1 and
see how things go. We can remove the warning if it is deemed too noisy during
any betas. (case study: the md5 and sha module DeprecationWarnings are loathed
around the world as those modules were never going to be removed in 2.x and
2to3 has a fixer for code that uses them)
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index e0bb163..a346d98 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -153,10 +153,15 @@
If *close_fds* is true, all file descriptors except :const:`0`, :const:`1` and
:const:`2` will be closed before the child process is executed. (Unix only).
- Or, on Windows, if *close_fds* is true then no handles will be inherited by the
+ The recommended value for this argument is True.
+ On Windows, if *close_fds* is true then no handles will be inherited by the
child process. Note that on Windows, you cannot set *close_fds* to true and
also redirect the standard handles by setting *stdin*, *stdout* or *stderr*.
+.. versionchanged:: 3.2
+ Callers should always specify a *close_fds* to avoid a DeprecationWarning.
+ The default value for this argument will be changing in Python 3.3.
+
If *shell* is :const:`True`, the specified command will be executed through the
shell.