Neal Norwitz [Wed, 26 Mar 2008 05:19:41 +0000 (05:19 +0000)]
Ensure that the mailbox is closed to prevent problems on Windows with removing
an open file. This doesn't seem to be a problem in 2.6, but that appears
to be somewhat accidental (specific to reference counting). When this
gets merged to 3.0, it will make the 3.0 code simpler.
Neal Norwitz [Wed, 26 Mar 2008 04:55:51 +0000 (04:55 +0000)]
Try to get this test to be less flaky. It was failing sometimes because
the connect would succeed before the timeout occurred. Try using an
address and port that hopefully doesn't exist to ensure we get no response.
If this doesn't work, we can use a public address close to python.org
and hopefully that address never gets taken.
Mark Dickinson [Tue, 25 Mar 2008 18:47:59 +0000 (18:47 +0000)]
Issue #2482: Make sure that the coefficient of a Decimal
instance is always stored as a str instance, even
when that Decimal has been created from a unicode string.
Gregory P. Smith [Tue, 25 Mar 2008 07:46:07 +0000 (07:46 +0000)]
On platforms without zlib, make this do the right thing and return the python
2.x signed value. Also, don't waste space on a table full of unsigned longs
when all it needs are unsigned ints (incase anyone builds this without zlib on
a 64-bit unix for some strange reason).
tested by forcing it to compile this version on both 32-bit and 64-bit linux.
Neal Norwitz [Tue, 25 Mar 2008 07:00:39 +0000 (07:00 +0000)]
Try to get this test to be more stable:
* disable gc during the test run because we are spawning objects and there
was an exception when calling Popen.__del__
* Always set an alarm handler so the process doesn't exit if the test fails
(should probably add assertions on the value of hndl_called in more places)
* Using a negative time causes Linux to treat it as zero, so disable that test.
Gregory P. Smith [Mon, 24 Mar 2008 00:08:01 +0000 (00:08 +0000)]
Have the binascii module use zlib's optimized crc32() function when available
to reduce our code size (1k data table and tiny bit of code). It falls back
to its own without zlib.
Gregory P. Smith [Sun, 23 Mar 2008 21:04:43 +0000 (21:04 +0000)]
Fix gzip to deal with CRC's being signed values in Python 2.x properly and to
read 32bit values as unsigned to start with rather than applying signedness
fixups allover the place afterwards.
This hopefully fixes the test_tarfile failure on the alpha/tru64 buildbot.
Gregory P. Smith [Sun, 23 Mar 2008 20:31:23 +0000 (20:31 +0000)]
Revert r61779 - It undid correct code and caused test_zlib to fail on all
platforms with a 64-bit long.
The Alpha/Tru64 test problem is a problem in either tarfile or test_tarfile,
not zlib.
crc32 and adler32 return 32-bit values. by using a long thats larger than
32-bits in these functions they were prevented from wrapping around to their
signed 32-bit value that we want them to return in python 2.x.
#1477: ur'\U0010FFFF' raised in narrow unicode builds.
Corrected the raw-unicode-escape codec to use UTF-16 surrogates in
this case, just like the unicode-escape codec.
Neal Norwitz [Sun, 23 Mar 2008 06:19:57 +0000 (06:19 +0000)]
Remove compiler warnings (on Alpha at least) about using chars as
array subscripts. Using chars are dangerous b/c they are signed
on some platforms and unsigned on others.
Neal Norwitz [Sun, 23 Mar 2008 06:13:25 +0000 (06:13 +0000)]
Move itertools before future_builtins since the latter depends on the former.
From a clean build importing future_builtins would fail since itertools
wasn't built yet.
Neal Norwitz [Sun, 23 Mar 2008 05:08:37 +0000 (05:08 +0000)]
Fix test_tarfile failures on Alpha (Tru64). The problem was caused in r61449
which made the return value signed. On the Alpha that also lost data
since sizeof(int) != sizeof(long) and apparently adler32/crc32 return
64 bits of data. This change keeps the signedness and continues to store the
data in a long rather than an int as was the case before r61449.
Neal Norwitz [Sun, 23 Mar 2008 03:43:33 +0000 (03:43 +0000)]
Try to make this test a little more robust and not fail with:
timeout (10.0025) is more than 2 seconds more than expected (0.001)
I'm assuming this problem is caused by DNS lookup. This change
does a DNS lookup of the hostname before trying to connect, so the time
is not included.
Georg Brandl [Sat, 22 Mar 2008 10:07:29 +0000 (10:07 +0000)]
#1918: document that weak references *to* an object are
cleared before the object's __del__ is called, to ensure that the weak
reference callback (if any) finds the object healthy.
Added fixer for implicit local imports. See #2414.
........
r61628 | david.wolever | 2008-03-19 17:57:43 +0100 (Mi, 19 Mär 2008) | 1 line
Added a class for tests which should not run if a particular import is found.
........
r61629 | collin.winter | 2008-03-19 17:58:19 +0100 (Mi, 19 Mär 2008) | 1 line
Two more relative import fixes in pgen2.
........
r61635 | david.wolever | 2008-03-19 20:16:03 +0100 (Mi, 19 Mär 2008) | 1 line
Fixed print fixer so it will do the Right Thing when it encounters __future__.print_function. 2to3 gets upset, though, so the tests have been commented out.
........
r61637 | david.wolever | 2008-03-19 21:37:17 +0100 (Mi, 19 Mär 2008) | 3 lines
Added a fixer for itertools imports (from itertools import imap, ifilterfalse --> from itertools import filterfalse)
........
r61645 | david.wolever | 2008-03-19 23:22:35 +0100 (Mi, 19 Mär 2008) | 1 line
SVN is happier when you add the files you create... -_-'
........
r61654 | david.wolever | 2008-03-20 01:09:56 +0100 (Do, 20 Mär 2008) | 1 line
Added an explicit sort order to fixers -- fixes problems like #2427
........
r61664 | david.wolever | 2008-03-20 04:32:40 +0100 (Do, 20 Mär 2008) | 3 lines
Fixes #2428 -- comments are no longer eatten by __future__ fixer.
........
r61673 | david.wolever | 2008-03-20 17:22:40 +0100 (Do, 20 Mär 2008) | 1 line
Christian Heimes [Fri, 21 Mar 2008 23:49:44 +0000 (23:49 +0000)]
Applied patch #1657 epoll and kqueue wrappers for the select module
The patch adds wrappers for the Linux epoll syscalls and the BSD kqueue syscalls. Thanks to Thomas Herve and the Twisted people for their support and help.
TODO: Finish documentation documentation
Jeffrey Yasskin [Fri, 21 Mar 2008 18:48:04 +0000 (18:48 +0000)]
Speed test_threading up from 14s to .5s, and avoid a deadlock on certain
failures. The test for enumerate-after-join is now a little less rigorous, but
the bug it references says the error happened in the first couple iterations,
so 100 iterations should still be enough.
cProfile was useful for identifying the slow tests here.
Jeffrey Yasskin [Fri, 21 Mar 2008 05:51:37 +0000 (05:51 +0000)]
Try to fix test_signal breakages on Linux due to r61687. It appears that at
least two of the linux build bots aren't leaving zombie processes around for
os.waitpid to wait for, causing ECHILD errors. This would be a symptom of a bug
somewhere, but probably not in signal itself.