module: the piped streams can now be properly read from or written to.
(this was broken due to the 2.x to 3.x transition; communicate() support
is still sketchy)
Mac OS X adds __CF_USER_TEXT_ENCODING variable to an empty environment. Fix
also the test on the Py_ENABLE_SHARED config varible: test that the variable is
present, don't check it's value.
Mac OS X adds __CF_USER_TEXT_ENCODING variable to an empty environment. Fix
also the test on the Py_ENABLE_SHARED config varible: test that the variable is
present, don't check it's value.
shared mode
Try also to get more informations about the Mac OS X failure: display the keys
of the environment, instead of just the number of variables.
the file descriptor of a pipe closed in the parent process is valid in the
child process according to fstat(), but the mode of the file descriptor is
invalid, and read or write raise an error.
test.support.requires_mac_ver() is now a decorator, as suggested by Ezio
Melotti, and its docstring is fixed (linux_version => mac_ver).
descriptor of a pipe closed in the parent process is valid in the child process
according to fstat(), but the mode of the file descriptor is invalid, and read
or write raise an error.
Add also requires_mac_ver() decorator to test.support.
Remove the pure Python POSIX subprocess implementation.
If non-CPython VMs (are there any for 3.x yet?) were somehow depending
on this, they already have the exact same set of problems with Python
code being executed after os.fork() that _posixsubprocess was written
to deal with. They should implement an equivalent outside of Python.
_posixsubprocess doesn't exist rather than simply stubbing it out
after the fact. This adds coverage for the RuntimeWarning as well as
using the pure python _create_pipe instead of using
_posixsubprocess.cloexec_pipe unintentionally with the pure python
code.
Ironically: I don't think any platform should ever actually _use_ the
pure Python subprocess code on POSIX platforms anymore. This at least
tests it properly in this stable branch. The pure python code for
this is likely to be removed in 3.3.
_posixsubprocess doesn't exist rather than simply stubbing it out
after the fact. This adds coverage for the RuntimeWarning as well as
using the pure python _create_pipe instead of using
_posixsubprocess.cloexec_pipe unintentionally with the pure python
code.
Ironically: I don't think any platform should ever actually _use_ the
pure Python subprocess code on POSIX platforms anymore. This at least
tests it properly in this stable branch. The pure python code for
this is likely to be removed in 3.3.
This was the original intention, but it wasn't threaded all the way through due
to 'endtime'. Also added a trivial assertion to get coverage of __str__.
If the timeout expires before the subprocess exits, the wait method and the
communicate method will raise a subprocess.TimeoutExpired exception. When used
with communicate, it is possible to catch the exception, kill the process, and
retry the communicate and receive any output written to stdout or stderr.
'latin-1' and 'utf-8'.
These are optimized in the Python Unicode implementation
to result in more direct processing, bypassing the codec
registry.
Also see issue11303.
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r88484 | antoine.pitrou | 2011-02-21 22:55:48 +0100 (lun., 21 févr. 2011) | 4 lines
Issue #10826: Prevent sporadic failure in test_subprocess on Solaris due
to open door files.
........
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87695 | antoine.pitrou | 2011-01-03 19:23:55 +0100 (lun., 03 janv. 2011) | 5 lines
Issue #10806, issue #9905: Fix subprocess pipes when some of the standard
file descriptors (0, 1, 2) are closed in the parent process. Initial
patch by Ross Lagerwall.
........
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r87233 | gregory.p.smith | 2010-12-14 06:38:00 -0800 (Tue, 14 Dec 2010) | 4 lines
Issue #1731717: Fixed the problem where subprocess.wait() could cause an
OSError exception when The OS had been told to ignore SIGCLD in our process
or otherwise not wait for exiting child processes.
........
Issue #7213: Change the close_fds default on Windows to better match the new
default on POSIX. True when possible (False if stdin/stdout/stderr are
supplied).
Update the documentation to reflect all of the above.
platform basis. It remains False on Windows and changes to True on all
other platforms (POSIX). Based on python-dev discussion and
http://bugs.python.org/issue7213.
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)
Added a few common Popen uses to the tests like we've done for a few other
instances of adding context managers. Eventually the entire test suite
could be converted to use the context manager format.
test_args_string() and test_call_string() create shell scripts including the
path to the Python executable: use surrogateescape to encode paths including
surrogate characters.