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.
Anthony Baxter [Mon, 3 Apr 2006 08:05:07 +0000 (08:05 +0000)]
The email module's parsedate_tz function now sets the daylight savings
flag to -1 (unknown) since it can't tell from the date whether it should
be set.
patch from Aldo Cortesi
Fix test_pty on OSF/1 (Tru64). The problem is that the newline gets
converted to CR CR NL. There may be a way to fix this with tcsetattr,
but I couldn't find it. There was a similar problem on IRIX.
Skip the test for sys.stdin.seek(-1) on OSF/1 (Tru64) since it does Bad Things
like cause the interpreter to exit abruptly. If there's a way to fix this,
it would be good to really fix it. It could just be the operation of the
std C library and we just aren't supposed to do that.
When the test case is skipped, we print a message so the user can check
for themselves.
* Fix a refleak of *_attributes.
* Cleanup formatting a bit (add spaces).
* Move static var initialized inside init_types() since that's the only place
it's used.
Anthony Baxter [Sat, 1 Apr 2006 08:36:27 +0000 (08:36 +0000)]
backport r243 from the pysqlite2 svn repository - lowers the required version
of SQLite3 from 3.2.2 to 3.0.8, by providing an alternative to
sqlite3_transfer_bindings. setup.py also handles the common (in debian
and ubuntu, at least) case of a buggy sqlite3.h SQLITE_VERSION_NUMBER.