Tim Peters [Sat, 8 Apr 2006 12:05:15 +0000 (12:05 +0000)]
test_timeout(): This test was added during Bug Day, but disabled
soon after because the gmail address it connects to started timing
out on all the buildbot slaves. Rewrote the test to produce a
warning message (instead of failing) when the address times out.
Also removed the special case for Windows -- this test started to
work on Windows as soon as bug 1462352 was fixed.
Thomas Heller [Thu, 6 Apr 2006 15:23:16 +0000 (15:23 +0000)]
Expose RTLD_LOCAL and RTLD_GLOBAL always from the _ctypes extension module.
If RTLD_LOCAL is not #defined in any header file (Windows), set it to 0.
If RTLD_GLOBAL is not #defined, set it equal to RTLD_LOCAL.
Anthony Baxter [Thu, 6 Apr 2006 07:12:39 +0000 (07:12 +0000)]
In some environments (under screen, in a chroot) curses doesn't support
mouse events. This makes the test fail. Catch that case and don't run
the tests. Should make the debian/ubuntu buildbots that run in a chroot
work again.
Tim Peters [Tue, 4 Apr 2006 19:12:51 +0000 (19:12 +0000)]
The part checking for the sqlite DLL was looking at, and
copying to, a wrong location (it copied the DLL under the
Python directory, and gave it name 'PCbuild').
The Windows buildbots other than mine are probably hung
now, waiting for someone to press "OK" on a popup box
informing them that sqlite3.dll couldn't be found.
Walter Dörwald [Tue, 4 Apr 2006 17:32:49 +0000 (17:32 +0000)]
Change the example classes UnicodeReader and UnicodeWriter so
that they work with all encodings. For UnicodeReader the real
input stream is wrapped in a line iterator that reencodes the
input to UTF-8. For UnicodeWriter the UTF-8 encoded output is
written to a queue for where it is reencoded to the target
encoding and written to the real output stream.
Thomas Wouters [Tue, 4 Apr 2006 17:28:12 +0000 (17:28 +0000)]
Make xrange more Py_ssize_t aware, by assuming a Py_ssize_t is always at
least as big as a long. I believe this to be a safe assumption that is being
made in many parts of CPython, but a check could be added.
len(xrange(sys.maxint)) works now, so fix the testsuite's odd exception for
64-bit platforms too. It also fixes 'zip(xrange(sys.maxint), it)' as a
portable-ish (if expensive) alternative to enumerate(it); since zip() now
calls len(), this was breaking on (real) 64-bit platforms. No additional
test was added for that behaviour.
Anthony Baxter [Tue, 4 Apr 2006 15:52:00 +0000 (15:52 +0000)]
Fix test_platform on cygwin. When running from build area, sys.executable
is 'python'. But 'python' is actually a directory, 'python.exe' is the
executable.
Jeremy Hylton [Tue, 4 Apr 2006 14:26:39 +0000 (14:26 +0000)]
Generate line number table entries for except handlers.
Re-enable all the tests in test_trace.py except one. Still not sure that these tests test what they used to test, but they pass. One failing test seems to be caused by undocumented line number table behavior in Python 2.4.
Martin's change 43604 broke the Mac builds apparently due to an autoconf
bug. I don't understand this at all, but Darwin/[78].* gets converted
to Darwin/78.* which is not correct. Maybe I'm just clueless or overworked.
I can't see why in the original checkin this should have changed.
This hack gets the Mac build working again. If someone figures out the
real problem, please revert this and fix for real.
Anthony is telling me that AC_PROG_CXX_WORKS which we use is broken.
I have no idea if that's related.
Jeremy Hylton [Tue, 4 Apr 2006 04:00:23 +0000 (04:00 +0000)]
Add lineno, col_offset to excephandler to enable future fix for
tracing/line number table in except blocks.
Reflow long lines introduced by col_offset changes. Update test_ast
to handle new fields in excepthandler.
As note in Python.asdl says, we might want to rethink how attributes
are handled. Perhaps they should be the same as other fields, with
the primary difference being how they are defined for all types within
a sum.
Also fix asdl_c so that constructors with int fields don't fail when
passed a zero value.