Victor Stinner [Wed, 1 Jun 2011 11:19:07 +0000 (13:19 +0200)]
(Merge 3.2) Close #12230: Mac OS X Tiger (10.4) has a kernel bug: sometimes,
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).
Victor Stinner [Wed, 1 Jun 2011 11:13:04 +0000 (13:13 +0200)]
Close #12230: Mac OS X Tiger (10.4) has a kernel bug: sometimes, 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.
Add also requires_mac_ver() decorator to test.support.
Victor Stinner [Tue, 31 May 2011 22:58:57 +0000 (00:58 +0200)]
(Merge 3.2) Close #12085: Fix an attribute error in subprocess.Popen destructor
if the constructor has failed, e.g. because of an undeclared keyword argument.
Patch written by Oleg Oshmyan.
Victor Stinner [Tue, 31 May 2011 22:57:47 +0000 (00:57 +0200)]
Close #12085: Fix an attribute error in subprocess.Popen destructor if the
constructor has failed, e.g. because of an undeclared keyword argument. Patch
written by Oleg Oshmyan.
Ralf Schmitt [Tue, 31 May 2011 22:10:03 +0000 (17:10 -0500)]
disable ASDLGEN if hg won't work, or if python is not installed.
This change makes configure check for
- the existence of a hg repository
- the hg executable itself
- the python executable
Running $(srcdir)/Parser/asdl_c.py (i.e. ASDLGEN) will fail if any of
the above prerequisites is missing, so we now disable it instead.
Victor Stinner [Mon, 30 May 2011 21:47:01 +0000 (23:47 +0200)]
(Merge 3.2) Issue #12016: my_fgets() now always clears errors before calling
fgets(). Fix the following case: sys.stdin.read() stopped with CTRL+d (end of
file), raw_input() interrupted by CTRL+c.
Victor Stinner [Mon, 30 May 2011 21:46:00 +0000 (23:46 +0200)]
Issue #12016: my_fgets() now always clears errors before calling fgets(). Fix
the following case: sys.stdin.read() stopped with CTRL+d (end of file),
raw_input() interrupted by CTRL+c.
Tarek Ziade [Mon, 30 May 2011 10:07:49 +0000 (12:07 +0200)]
Cleaned up the installer output behavior.
This change also makes sure the logger handlers are not alterated after an
installation. That also fixes the remaining environment alteration issue in
test_packaging.
Nadeem Vawda [Sun, 29 May 2011 23:44:45 +0000 (01:44 +0200)]
Remove unused data from test_bz2.
DATA_CRLF was used to test BZ2File's universal newline logic, which was removed
in changeset ce63a5dcb0af. The tests themselves were removed in fbabdb0d7dd2.
Nadeem Vawda [Sun, 29 May 2011 23:12:24 +0000 (01:12 +0200)]
Miscellaneous cleanups to bz2 and test_bz2 following issue #1625.
* In bz2.decompress(), concatenate partial results in a way that should
be more friendly to other Python implementations
* Remove redundant comments in test_bz2
* Use 'while True:' instead of 'while 1:'
Ned Deily [Sun, 29 May 2011 09:16:36 +0000 (02:16 -0700)]
Null merge to record previous incorrecly merged changeset from 3.2 branch:
changeset: 70465:4f248dd34dd9
branch: 3.2
parent: 70463:7f2e3c466d57
user: Gregory P. Smith <greg@krypto.org>
date: Sat May 28 09:06:02 2011 -0700
files: Lib/test/test_subprocess.py
description:
Fix ProcessTestCasePOSIXPurePython to test the module from import when
changeset: 70466:2c91045d16a6
parent: 70464:2936e8f12e4f
user: Gregory P. Smith <greg@krypto.org>
date: Sat May 28 09:06:02 2011 -0700
files: Lib/test/test_subprocess.py
description:
Fix ProcessTestCasePOSIXPurePython to test the module from import when
Gregory P. Smith [Sat, 28 May 2011 17:00:14 +0000 (10:00 -0700)]
follow on to the last commit, remove the final POSIXPurePythonTestCase
reference. (the difference between running test_subprocess.py
directly rather than via regrtest.py)
Gregory P. Smith [Sat, 28 May 2011 16:32:39 +0000 (09:32 -0700)]
The _posixsubprocess module is now required on POSIX.
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.
Gregory P. Smith [Sat, 28 May 2011 16:06:02 +0000 (09:06 -0700)]
Fix ProcessTestCasePOSIXPurePython to test the module from import when
_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.
Gregory P. Smith [Sat, 28 May 2011 16:06:02 +0000 (09:06 -0700)]
Fix ProcessTestCasePOSIXPurePython to test the module from import when
_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.
Ned Deily [Sat, 28 May 2011 13:04:02 +0000 (06:04 -0700)]
Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
ensure "make install" creates symlinks in --prefix bin for the "-32"
files in the framework bin directory like the installer does.
Ned Deily [Sat, 28 May 2011 12:59:55 +0000 (05:59 -0700)]
Issue #11217: For 64-bit/32-bit Mac OS X universal framework builds,
ensure "make install" creates symlinks in --prefix bin for the "-32"
files in the framework bin directory like the installer does.
Ned Deily [Sat, 28 May 2011 07:45:52 +0000 (00:45 -0700)]
Issue #9670: Increase the default stack size for secondary threads on
Mac OS X and FreeBSD to reduce the chances of a crash instead of a
"maximum recursion depth" RuntimeError exception.
(patch by Ronald Oussoren)