Gregory P. Smith [Mon, 17 Mar 2008 18:48:05 +0000 (18:48 +0000)]
Force zlib.crc32 and zlib.adler32 to return a signed integer on all platforms
regardless of the native sizeof(long) used in the integer object.
This somewhat odd behavior of returning a signed is maintained in 2.x for
compatibility reasons of always returning an integer rather than a long object.
Eric Smith [Mon, 17 Mar 2008 17:32:20 +0000 (17:32 +0000)]
Finished backporting PEP 3127, Integer Literal Support and Syntax.
Added 0b and 0o literals to tokenizer.
Modified PyOS_strtoul to support 0b and 0o inputs.
Modified PyLong_FromString to support guessing 0b and 0o inputs.
Renamed test_hexoct.py to test_int_literal.py and added binary tests.
Added upper and lower case 0b, 0O, and 0X tests to test_int_literal.py
Jeffrey Yasskin [Mon, 17 Mar 2008 14:40:53 +0000 (14:40 +0000)]
Allow Gnu gcc's to build python on OSX by removing -Wno-long-double,
-no-cpp-precomp, and -mno-fused-madd from configure.
* r22183 added -no-cpp-precomp, which
http://gcc.gnu.org/ml/gcc/2005-12/msg00368.html claims hasn't been
needed since gcc-3.1.
* r25607 added -Wno-long-double to avoid a warning in
Include/objimpl.h (issue 525481). The long double is still there,
but OSX 10.4's gcc no longer warns about it.
* r33666 fixed issue 775892 on OSX 10.3 by adding -mno-fused-madd,
which changed the sign of some float 0s. Tim Peters said it wasn't
a real issue anyway, and it no longer causes test failures.
Fixes issue #1779871.
Eric Smith [Mon, 17 Mar 2008 11:01:01 +0000 (11:01 +0000)]
Issue 2264: empty float presentation type needs to have at least one digit past the decimal point.
Added "Z" format_char to PyOS_ascii_formatd to support empty float presentation type.
Renamed buf_size in PyOS_ascii_formatd to more accurately reflect it's meaning.
Modified format.__float__ to use the new "Z" format as the default.
Added test cases.
Mark Summerfield [Mon, 17 Mar 2008 08:28:15 +0000 (08:28 +0000)]
Added a footnote to each pointing out that for XML output if an encoding
string is given it should conform to the appropriate XML standards---for
example, "UTF-8" is okay, but "UTF8" is not.
Removed Exact/Inexact after discussion with Yasskin.
Unlike Scheme where exactness is implemented as taints, the Python
implementation associated exactness with data types. This created
inheritance issues (making an exact subclass of floats would result
in the subclass having both an explicit Exact registration and an
inherited Inexact registration). This was a problem for the
decimal module which was designed to span both exact and inexact
arithmetic. There was also a question of use cases and no examples
were found where ABCs for exactness could be used to improve code.
One other issue was having separate tags for both the affirmative
and negative cases. This is at odds with the approach taken
elsewhere in the Python (i.e. we don't have an ABC both Hashable
and Unhashable).
Mark Dickinson [Fri, 14 Mar 2008 14:23:37 +0000 (14:23 +0000)]
Issue 705836: Fix struct.pack(">f", 1e40) to behave consistently
across platforms: it should now raise OverflowError on all
platforms. (Previously it raised OverflowError only on
non IEEE 754 platforms.)
Also fix the (already existing) test for this behaviour
so that it actually raises TestFailed instead of just
referencing it.
Neal Norwitz [Sun, 9 Mar 2008 19:03:42 +0000 (19:03 +0000)]
Introduce a lock to fix a race condition which caused an exception in the test.
Some buildbots were consistently failing (e.g., amd64).
Also remove a couple of semi-colons.
Jeffrey Yasskin [Fri, 7 Mar 2008 06:22:15 +0000 (06:22 +0000)]
Progress on issue #1193577 by adding a polling .shutdown() method to
SocketServers. The core of the patch was written by Pedro Werneck, but any bugs
are mine. I've also rearranged the code for timeouts in order to avoid
interfering with the shutdown poll.
Neal Norwitz [Wed, 5 Mar 2008 05:38:06 +0000 (05:38 +0000)]
Make the timeout longer to give slow machines a chance to pass the test
before timing out. This doesn't change the duration of the test under
normal circumstances. This is targetted at fixing the spurious failures
on the FreeBSD buildbot primarily.
Neal Norwitz [Wed, 5 Mar 2008 05:10:48 +0000 (05:10 +0000)]
Remove the files/dirs after closing the DB so the tests work on Windows.
Patch from Trent Nelson. Also simplified removing a file by using test_support.
Thomas Heller [Tue, 4 Mar 2008 20:09:11 +0000 (20:09 +0000)]
Merged changes from libffi3-branch.
The bundled libffi copy is now in sync with the recently released
libffi3.0.4 version, apart from some small changes to
Modules/_ctypes/libffi/configure.ac.
I gave up on using libffi3 files on os x.
Instead, static configuration with files from pyobjc is used.