Fix asyncore issues 8573 and 8483: _strerror might throw ValueError; asyncore.__getattr__ cheap inheritance caused confusing error messages when accessing undefined class attributes; added an alias for __str__ which now is used as a fallback for __repr__
R. David Murray [Thu, 6 May 2010 00:59:04 +0000 (00:59 +0000)]
Have the serve.py script announce the directory it is
serving and which port it is serving it on (I can
never remember the default port number it uses...)
Brett Cannon [Wed, 5 May 2010 20:30:30 +0000 (20:30 +0000)]
Remove two unneeded branches to an 'if' statement by applying De Morgan's Law
and creating a single 'if' statement along with a NULL default value for a
variable.
Ronald Oussoren [Wed, 5 May 2010 19:09:31 +0000 (19:09 +0000)]
In a number of places code still revers
to "sys.platform == 'mac'" and that is
dead code because it refers to a platform
that is no longer supported (and hasn't been
supported for several releases).
R. David Murray [Wed, 5 May 2010 17:31:03 +0000 (17:31 +0000)]
Issue #7472: remove unused code from email.encoders.encode_7or8bit.
Yukihiro Nakadaira noticed a typo in encode_7or8bit that was trying
to special case iso-2022 codecs. It turns out that the code in
question is never used, because whereas it was designed to trigger
if the payload encoding was eight bit but its output encoding was
7 bit, in practice the payload is always converted to the 7bit
encoding before encode_7or8bit is called. Patch by Shawat Anand.
Barry Warsaw [Wed, 5 May 2010 16:15:09 +0000 (16:15 +0000)]
Bug 7755: audiotest.au is arguably copyrighted material, but definitely makes
Debian unhappy. The actual contents of the audio clip are unimportant, so
replace it with something that we know is okay. Guido likes woodpeckers.
Thomas Heller [Tue, 4 May 2010 18:44:42 +0000 (18:44 +0000)]
On Windows, ctypes does no longer check the stack before and after
calling a foreign function. This allows to use the unmodified libffi
library.
Remove most files from _ctypes/libffi_msvc, only two include files
stay (updated from _ctypes/libffi/...). Other files are used in the
cross-platform _ctypes/libffi directory.
Mark Dickinson [Tue, 4 May 2010 16:18:25 +0000 (16:18 +0000)]
Issue #1533: fix inconsistency in range function argument processing:
any non-float non-integer argument is now converted to an integer (if
possible) using its __int__ method. Previously, only small arguments
were treated this way; larger arguments (those whose __int__ was
outside the range of a C long) would produce a TypeError.
Patch by Alexander Belopolsky (with minor modifications).
Mark Dickinson [Tue, 4 May 2010 14:25:50 +0000 (14:25 +0000)]
Issue #8567: Fix incorrect precedence of signals in Decimal module.
When a Decimal operation raises multiple signals and more than one of
those signals is trapped, the specification determines the order in
which the signals should be handled. In many cases this order wasn't
being followed, leading to the wrong Python exception being raised.
This commit fixes those cases, and adds extra tests. The tests are
only enabled when EXTENDEDERRORTESTS is True, since they involve
rerunning each Decimal testcase several times.
Brett Cannon [Tue, 4 May 2010 00:52:41 +0000 (00:52 +0000)]
Strip out extraneous whitespace, cast a some `const char *` to `void *` when
passed to free() and make a `char *` to a `const char *` as found by Clang's
static analyzer.
Antoine Pitrou [Mon, 3 May 2010 16:25:33 +0000 (16:25 +0000)]
Issue #7865: The close() method of :mod:`io` objects should not swallow
exceptions raised by the implicit flush(). Also ensure that calling
close() several times is supported. Patch by Pascal Chambon.
Only override the AC_PROG_CC determined CFLAGS if they were set by the user.
This restores the default behavior in the common case of not having CFLAGS
defined when running configure.
Ronald Oussoren [Fri, 30 Apr 2010 11:20:14 +0000 (11:20 +0000)]
Fix for issue #3646: with this patch it is possible to do a
framework install of Python in your home directory (on OSX):
$ configure --enable-framework=${HOME}/Library/Frameworks
$ make && make install
Without this patch the framework would get installed just fine,
but 'make install' would try to install the application bundles
and command-line tools outside the user's home, which doesn't work
for non-admin users (and is bad form anyway).