summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_subprocess.py
Commit message (Collapse)AuthorAgeFilesLines
* Add some more outputAntoine Pitrou2011-01-031-0/+3
|
* Temporary debug output for intermittent failures in test_subprocessAntoine Pitrou2011-01-031-0/+4
|
* Add a subprocess test of remapping standard file descriptors (issue #1187).Antoine Pitrou2011-01-031-0/+48
|
* Issue #10806, issue #9905: Fix subprocess pipes when some of the standardAntoine Pitrou2011-01-031-0/+52
| | | | | file descriptors (0, 1, 2) are closed in the parent process. Initial patch by Ross Lagerwall.
* test_subprocess: close pipes at the end of test_pipe_cloexec_real_tools()Victor Stinner2011-01-031-0/+3
|
* Issue #10763: subprocess.communicate() closes stdout and stderr if both areVictor Stinner2010-12-251-14/+20
| | | | | | pipes (bug specific to Windows). Improve also the unit test: write a portable unit test.
* Fix "BytesWarning: str() on a bytes instance"Gregory P. Smith2010-12-141-1/+2
|
* Issue #1731717: Fixed the problem where subprocess.wait() could cause anGregory P. Smith2010-12-141-0/+10
| | | | | OSError exception when The OS had been told to ignore SIGCLD in our process or otherwise not wait for exiting child processes.
* Issue #6559: fix the subprocess.Popen pass_fds implementation. Add a unittest.Gregory P. Smith2010-12-141-0/+31
| | | | | | | | 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.
* issue7213: Open the pipes used by subprocesses with the FD_CLOEXEC flag fromGregory P. Smith2010-12-131-0/+78
| | | | | the C code, using pipe2() when available. Adds unittests for close_fds and cloexec behaviors.
* Get rid of the close_fds DeprecationWarning. Changes the default on a perGregory P. Smith2010-12-131-18/+1
| | | | | | 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.
* refactor the warning test.Gregory P. Smith2010-12-041-23/+11
|
* issue7213 + issue2320: Cause a DeprecationWarning if the close_fds argument isGregory P. Smith2010-12-041-1/+31
| | | | | | | | | | | | 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)
* Fix #10554. Added context manager support to Popen objects.Brian Curtin2010-12-031-1/+43
| | | | | | 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.
* #9424: Replace deprecated assert* methods in the Python test suite.Ezio Melotti2010-11-201-6/+6
|
* add filename to ENOENT message #4925Benjamin Peterson2010-11-201-0/+1
|
* Fix a number of ResourceWarnings on Windows due to open pipes.Brian Curtin2010-11-051-0/+17
|
* Add cleanups to stdout/stderr pipes to remove ResourceWarnings.Brian Curtin2010-11-051-0/+16
|
* close some more filesBenjamin Peterson2010-10-311-0/+7
|
* test_subprocess: use surrogateescape error handler to write shell scriptsVictor Stinner2010-10-161-2/+2
| | | | | | 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.
* test_subprocess doesn't need to C locale to test os.environbVictor Stinner2010-10-141-3/+3
| | | | Improve also the comment to explain why C locale is needed to test os.environ.
* test_subprocess: use C locale to get ascii locale encodingVictor Stinner2010-10-141-0/+4
|
* Issue #9992: Remove PYTHONFSENCODING environment variable.Victor Stinner2010-10-131-4/+0
|
* Make _kill_process more robust under Windows too (see issue #8432)Antoine Pitrou2010-09-241-20/+14
|
* Try a more robust implementation of _kill_processAntoine Pitrou2010-09-201-20/+14
|
* Try to fix buildbot failure (#9902)Antoine Pitrou2010-09-201-0/+4
|
* Try to make signal-sending tests in test_subprocess more robust on slow machinesAntoine Pitrou2010-09-191-2/+4
|
* Try to fix test_subprocess on "x86 debian parallel 3.x" buildbotAntoine Pitrou2010-09-191-4/+4
|
* Issue #9895: speed up test_subprocessAntoine Pitrou2010-09-181-13/+32
|
* Issue #9894: Do not hardcode ENOENT in test_subprocess.Antoine Pitrou2010-09-181-1/+1
| | | | (GNU/Hurd is not dead)
* Fix #9588. Add sys.executable to two shell=True tests.Brian Curtin2010-08-131-2/+3
|
* #2304: fix incorporating Eric Smith's .format suggestion and tested on ↵Tim Golden2010-08-111-1/+43
| | | | Ubuntu as well as Windows
* revert r83830, breaks tests on unixesBenjamin Peterson2010-08-081-42/+0
|
* Issue #2304: Add additional quotes when using cmd shell on Windows. Original ↵Tim Golden2010-08-081-0/+42
| | | | patch from Gabriel Genellina
* Issue #3210: Ensure stdio handles are closed if CreateProcess failsTim Golden2010-08-061-0/+20
|
* Factor out stripping of interpreter debug output in ↵Antoine Pitrou2010-08-041-1/+1
| | | | test.support.strip_python_stderr()
* Workaround for issue 4047: in some configurations ofRonald Oussoren2010-07-231-0/+15
| | | | | | | | | the Crash Reporter on OSX test_subprocess will trigger the reporter. This patch prints a warning when the Crash Reporter will get triggered intentionally, which should avoid confusing people.
* Issue #9265: Incorrect name passed as arg[0] when shell=TrueStefan Krah2010-07-191-0/+19
| | | | and executable specified.
* Merged revisions 82075 via svnmerge fromJean-Paul Calderone2010-06-181-2/+0
| | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r82075 | jean-paul.calderone | 2010-06-18 16:00:17 -0400 (Fri, 18 Jun 2010) | 12 lines Revert r60115 This revision introduced quoting for strings containing | based on a misunderstanding of the commonly used quoting rules used on Windows. | is interpreted by cmd.exe, not by the MS C runtime argv initializer. It only needs to be quoted if it is part of an argument passed through cmd.exe. See issue1300, issue7839, and issue8972. ........
* Issue #8780: Fix a regression introduced by r78946 in subprocess on WindowsVictor Stinner2010-05-211-0/+11
| | | | | Ensure that stdout / stderr is inherited from the parent if stdout=PIPE / stderr=PIPE is not used.
* Issue #8513: os.get_exec_path() supports b'PATH' key and bytes value.Victor Stinner2010-05-181-0/+21
| | | | | | subprocess.Popen() and os._execvpe() support bytes program name. Add os.supports_bytes_environ flag: True if the native OS type of the environment is bytes (eg. False on Windows).
* Issue #8603: Create a bytes version of os.environ for UnixVictor Stinner2010-05-061-5/+3
| | | | | | | Create os.environb mapping and os.getenvb() function, os.unsetenv() encodes str argument to the file system encoding with the surrogateescape error handler (instead of utf8/strict) and accepts bytes, and posix.environ keys and values are bytes.
* Fix test_undecodable_env of test_subproces for non-ASCII directoryVictor Stinner2010-04-231-2/+6
| | | | | | | | | | | | | This test was introduced by r80421 (issue #8391). The fix: copy the environment variables instead of starting Python in an empty environement. In an empty environment, the locale is C and Python uses ASCII for the default file system encoding. The non-ASCII directory will be encoded using surrogates, but Python3 is unable to load a module or package with a filename using surrogates. See issue #8242 for more information about running Python3 with a non-ascii directory in an empty environement.
* Issue #8391: os.execvpe() and os.getenv() supports unicode with surrogates andVictor Stinner2010-04-231-1/+23
| | | | bytes strings for environment keys and values
* Issue #8467: Pure Python implementation of subprocess encodes the error messageVictor Stinner2010-04-231-0/+19
| | | | using surrogatepass error handler to support surrogates in the message
* Merged revisions 79344,79346,79350 via svnmerge fromFlorent Xicluna2010-03-271-25/+16
| | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r79344 | florent.xicluna | 2010-03-23 15:36:45 +0100 (mar, 23 mar 2010) | 2 lines Silence test_subprocess. ........ r79346 | florent.xicluna | 2010-03-23 16:05:30 +0100 (mar, 23 mar 2010) | 2 lines The standard error should be empty when the signal is killed, except on SIGINT. ........ r79350 | florent.xicluna | 2010-03-23 20:19:16 +0100 (mar, 23 mar 2010) | 2 lines The SIGINT signal may happen earlier, during site.py initialization. ........
* * Fix a refleak when a preexec_fn was supplied (preexec_fn_args_tuple was notGregory P. Smith2010-03-191-0/+42
| | | | | | | | being defref'ed). * Fixes another potential refleak of a reference to the gc module in the unlikely odd case where gc module isenabled or disable calls fail. * Adds a unittest for the above case to verify behavior and lack of leaks.
* * Replaces the internals of the subprocess module from fork through exec onGregory P. Smith2010-03-141-6/+79
| | | | | | | | | | | | | | | POSIX systems with a C extension module. This is required in order for the subprocess module to be made thread safe. The pure python implementation is retained so that it can continue to be used if for some reason the _posixsubprocess extension module is not available. The unittest executes tests on both code paths to guarantee compatibility. * Moves PyLong_FromPid and PyLong_AsPid from posixmodule.c into longobject.h. Code reviewed by jeffrey.yasskin at http://codereview.appspot.com/223077/show
* Merged revisions 78833 via svnmerge fromFlorent Xicluna2010-03-111-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78833 | florent.xicluna | 2010-03-11 02:50:48 +0100 (jeu, 11 mar 2010) | 2 lines Revert r78830: realpath() should really be applied to sys.executable. ........
* Merged revisions 78830 via svnmerge fromFlorent Xicluna2010-03-111-1/+1
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r78830 | florent.xicluna | 2010-03-11 01:56:59 +0100 (jeu, 11 mar 2010) | 3 lines Fix the test_subprocess failure when sys.executable is meaningless: '' or a directory. It does not fix #7774. ........