Fred Drake [Sat, 10 Jun 2006 20:01:34 +0000 (20:01 +0000)]
SF patch #1303595: improve description of __builtins__, explaining how it
varies between __main__ and other modules, and strongly suggest not touching
it but using __builtin__ if absolutely necessary
Thomas Heller [Sat, 10 Jun 2006 19:55:36 +0000 (19:55 +0000)]
Upgrade to ctypes version 0.9.9.7.
Summary of changes:
- support for 'variable sized' data
- support for anonymous structure/union fields
- fix severe bug with certain arrays or structures containing more than 256 fields
Thomas Heller [Sat, 10 Jun 2006 19:51:46 +0000 (19:51 +0000)]
Upgrade to ctypes version 0.9.9.7.
Summary of changes:
- support for 'variable sized' data
- support for anonymous structure/union fields
- fix severe bug with certain arrays or structures containing more than 256 fields
Martin v. Löwis [Sat, 10 Jun 2006 12:23:46 +0000 (12:23 +0000)]
Patch #1495999: Part two of Windows CE changes.
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
Brett Cannon [Fri, 9 Jun 2006 22:31:23 +0000 (22:31 +0000)]
An object with __call__ as an attribute, when called, will have that attribute checked for __call__ itself, and will continue to look until it finds an object without the attribute. This can lead to an infinite recursion.
Tim Peters [Fri, 9 Jun 2006 19:24:44 +0000 (19:24 +0000)]
Implementing a happy idea from Georg Brandl: make runtest() try to
clean up files and directories the tests often leave behind by
mistake. This is the first time in history I don't have a bogus
"db_home" directory after running the tests ;-)
Also worked on runtest's docstring, to say something about all the
arguments, and to document the non-obvious return values.
New functions runtest_inner() and cleanup_test_droppings() in
support of the above.
Turn off warning about deprecated CRT functions on for VisualStudio .NET 2005.
Make the definition #ARRAYSIZE conditional. VisualStudio .NET 2005 already has it defined using a better gimmick.
Tim Peters [Fri, 9 Jun 2006 05:12:40 +0000 (05:12 +0000)]
Remove the temporary hack to force test_optparse to
run immediately after test_file. At least 8 buildbot
boxes passed since the underlying problem got fixed,
and they all failed before the fix, so there's no point
to this anymore.
Tim Peters [Fri, 9 Jun 2006 04:02:06 +0000 (04:02 +0000)]
testUnicodeOpen(): I have no idea why, but making this
test clean up after itself appears to fix the test failures
when test_optparse follows test_file.
test_main(): Get rid of TESTFN no matter what. That's
also enough to fix the mystery failures. Doesn't hurt
to fix them twice :-)
Tim Peters [Fri, 9 Jun 2006 03:09:42 +0000 (03:09 +0000)]
To boost morale :-), force test_optparse to run immediately
after test_file until we can figure out how to fix it.
(See python-dev; at the moment we don't even know which checkin
caused the problem.)
Tim Peters [Fri, 9 Jun 2006 02:11:02 +0000 (02:11 +0000)]
Whitespace normalization.
Since test_file is implicated in mysterious test failures
when followed by test_optparse, if I had any brains I'd
look at the checkin that last changed test_file ;-)
Brett Cannon [Thu, 8 Jun 2006 17:00:45 +0000 (17:00 +0000)]
Buffer objects would return the read or write buffer for a wrapped object when
the char buffer was requested. Now it actually returns the char buffer if
available or raises a TypeError if it isn't (as is raised for the other buffer
types if they are not present but requested).
Not a backport candidate since it does change semantics of the buffer object
(although it could be argued this is enough of a bug to bother backporting).
Give a consistent behavior for comparison and hashing of method objects
(both user- and built-in methods). Now compares the 'self' recursively.
The hash was already asking for the hash of 'self'.
- bsddb: the bsddb.dbtables Modify method now raises the proper error and
aborts the db transaction safely when a modifier callback fails.
Fixes SF python patch/bug #1408584.
Also cleans up the bsddb.dbtables docstrings since thats the only
documentation that exists for that unadvertised module. (people
really should really just use sqlite3)
Ronald Oussoren [Wed, 7 Jun 2006 20:18:44 +0000 (20:18 +0000)]
* If BuildApplet.py is used as an applet it starts with a version of
sys.exutable that isn't usuable on an #!-line. That results in generated
applets that don't actually work. Work around this problem by resetting
sys.executable.
* argvemulator.py didn't work on intel macs. This patch fixes this
(bug #1491468)
Ronald Oussoren [Wed, 7 Jun 2006 19:38:53 +0000 (19:38 +0000)]
- Patch the correct version of python in the Info.plists at build time, instead
of relying on a maintainer to update them before releases.
- Remove the now empty Mac/OSX directory
Tim Peters [Wed, 7 Jun 2006 06:57:51 +0000 (06:57 +0000)]
SF patch 1501987: Remove randomness from test_exceptions,
from ?iga Seilnacht (sorry about the name, but Firefox
on my box can't display the first character of the name --
the SF "Unix name" is zseil).
This appears to cure the oddball intermittent leaks across
runs when running test_exceptions under -R. I'm not sure
why, but I'm too sleepy to care ;-)
The thrust of the SF patch was to remove randomness in the
pickle protocol used. I changed the patch to use
range(pickle.HIGHEST_PROTOCOL + 1), to try both pickle and
cPickle, and randomly mucked with other test lines to put
statements on their own lines.
Not a bugfix candidate (this is fiddling new-in-2.5 code).
Ronald Oussoren [Tue, 6 Jun 2006 19:50:24 +0000 (19:50 +0000)]
* Ensure that "make altinstall" works when the tree was configured
with --enable-framework
* Also for --enable-framework: allow users to use --prefix to specify
the location of the compatibility symlinks (such as /usr/local/bin/python)
Tim Peters [Tue, 6 Jun 2006 15:50:17 +0000 (15:50 +0000)]
BSequence_set_range(): Rev 46688 ("Fix a bunch of
parameter strings") changed this function's signature
seemingly by mistake, which is causing buildbots to fail
test_bsddb3. Restored the pre-46688 signature.
Martin Blais [Tue, 6 Jun 2006 12:46:55 +0000 (12:46 +0000)]
Normalized a few cases of whitespace in function declarations.
Found them using::
find . -name '*.py' | while read i ; do grep 'def[^(]*( ' $i /dev/null ; done
find . -name '*.py' | while read i ; do grep ' ):' $i /dev/null ; done
(I was doing this all over my own code anyway, because I'd been using spaces in
all defs, so I thought I'd make a run on the Python code as well. If you need
to do such fixes in your own code, you can use xx-rename or parenregu.el within
emacs.)
Thomas Heller [Tue, 6 Jun 2006 11:34:33 +0000 (11:34 +0000)]
Convert CFieldObject tp_members to tp_getset, since there is no
structmember typecode for Py_ssize_t fields. This should fix some of
the errors on the PPC64 debian machine (64-bit, big endian).
Assigning to readonly fields now raises AttributeError instead of
TypeError, so the testcase has to be changed as well.
Tim Peters [Tue, 6 Jun 2006 00:25:07 +0000 (00:25 +0000)]
_PySys_Init(): It's rarely a good idea to size a buffer to the
exact maximum size someone guesses is needed. In this case, if
we're really worried about extreme integers, then "cp%d" can
actually need 14 bytes (2 for "cp" + 1 for \0 at the end +
11 for -(2**31-1)). So reserve 128 bytes instead -- nothing is
actually saved by making a stack-local buffer tiny.
- bsddb: the __len__ method of a DB object has been fixed to return correct
results. It could previously incorrectly return 0 in some cases.
Fixes SF bug 1493322 (pybsddb bug 1184012).
Tim Peters [Mon, 5 Jun 2006 20:48:49 +0000 (20:48 +0000)]
Access _struct attributes directly instead of mucking with getattr.
string_reverse(): Simplify.
assertRaises(): Raise TestFailed on failure.
test_unpack_from(), test_pack_into(), test_pack_into_fn(): never
use `assert` to test for an expected result (it doesn't test anything
when Python is run with -O).