Brett Cannon [Tue, 13 Jun 2006 21:50:24 +0000 (21:50 +0000)]
Classic class that defined ``def __coerce__(self, other): return other, self``
would infinitely recourse and segfault the interpreter. Now a recursion check
occurs after a coercion.
Tim Peters [Sat, 10 Jun 2006 22:54:19 +0000 (22:54 +0000)]
Merge rev 46840 from trunk.
shuffle() doscstring: Removed warning about sequence length
versus generator period. While this was a real weakness of the
older WH generator for lists with just a few dozen elements,
and so could potentially bite the naive ;-), the Twister should
show excellent behavior up to at least 600 elements.
Fred Drake [Sat, 10 Jun 2006 20:04:06 +0000 (20:04 +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
Georg Brandl [Thu, 8 Jun 2006 13:31:14 +0000 (13:31 +0000)]
Argh. "integer" is a very confusing word ;)
Actually, checking for INT_MAX and INT_MIN is correct since
the format code explicitly handles a C "int".
(backport from rev. 46746)
- Bug #1493322: 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).
fix potential use of uninitialized char ** to construct a list if log_archive
is called with the (unsupported and unexported in this version) flag DB_ARCH_REMOVE.
also fix a log_list memory leak on error return in the event that python can't create
a new list object.
Armin Rigo [Sun, 28 May 2006 18:15:43 +0000 (18:15 +0000)]
Remove various dependencies on dictionary order in the standard library
tests, and one (clearly an oversight, potentially critical) in the
standard library itself - base64.py.
test_extcall is an output test which still needs to be fixed somehow.
George Yoshida [Fri, 12 May 2006 17:26:56 +0000 (17:26 +0000)]
Duplicated description about the illegal continue usage can be found in nearly the same place.
They are same, so keep the original one and remove the later-added one.
(backport r45978)
Thomas Wouters [Fri, 5 May 2006 10:52:43 +0000 (10:52 +0000)]
Backport SF bug/patch #1433877: string parameter to ioctl not null terminated
The new char-array used in ioctl calls wasn't explicitly NUL-terminated;
quite probably the cause for the test_pty failures on Solaris that we
circumvented earlier.
Barry Warsaw [Sun, 30 Apr 2006 21:26:41 +0000 (21:26 +0000)]
Patch #1464708 from William McVey: fixed handling of nested comments in mail
addresses. E.g.
"Foo ((Foo Bar)) <foo@example.com>"
Fixes for both rfc822.py and email package. This patch needs to be back
ported to Python 2.3 for email 2.5 and forward ported to Python 2.5 for email
4.0. (I'll do both soon)
Backport r45774:
Try to really fix the slow buildbots this time.
Printing to stdout, doesn't mean the data was actually written.
It depends on the buffering, so we need to flush. This will hopefully
really fix the buildbots getting killed due to no output on the slow bots.
Georg Brandl [Fri, 28 Apr 2006 16:58:56 +0000 (16:58 +0000)]
Bug #1478326: don't allow '/' in distutils.util.get_platform machine names
since this value is used to name the build directory.
(backport from rev. 45786)
Thomas Wouters [Tue, 25 Apr 2006 15:33:48 +0000 (15:33 +0000)]
Backport trunk's r45715:
Define MAXPATHLEN to be at least PATH_MAX, if that's defined. Python uses
MAXPATHLEN-sized buffers for various output-buffers (like to realpath()),
and that's correct on BSD platforms, but not Linux (which uses PATH_MAX, and
does not define MAXPATHLEN.) Cursory googling suggests Linux is following a
newer standard than BSD, but in cases like this, who knows. Using the
greater of PATH_MAX and 1024 as a fallback for MAXPATHLEN seems to be the
most portable solution.
Put break at correct level so *all* root HKEYs acutally get checked for
an installed VC6. Otherwise only the first such tree gets checked and this
warning doesn't get displayed.
Python 2.4 changed ntpath.abspath to do an import
inside the function. As a result, due to Python's
import lock, anything calling abspath on Windows
(directly, or indirectly like tempfile.TemporaryFile)
hung when it was called from a thread spawned as a
side effect of importing a module.
This is a depressingly frequent problem, and
deserves a more general fix. I'm settling for
a micro-fix here because this specific one accounts
for a report of Zope Corp's ZEO hanging on Windows,
and it was an odd way to change abspath to begin
with (ntpath needs a different implementation
depending on whether we're actually running on
Windows, and the _obvious_ way to arrange for that
is not to bury a possibly-failing import _inside_
the function).
Note that if/when other micro-fixes of this kind
get made, the new Lib/test/threaded_import_hangers.py
is a convenient place to add tests for them.
Tim Peters [Tue, 18 Apr 2006 03:30:43 +0000 (03:30 +0000)]
Merge rev 45516 from trunk.
Finally figured out why this module did its imports at the
bottom of the file. Restored that, and added a comment
explaining why this is necessary. Hint: on my box, and
yours, it's not :-(
Tim Peters [Mon, 17 Apr 2006 21:15:53 +0000 (21:15 +0000)]
Merge rev 45498 from trunk.
local.__del__(): This didn't actually do anything, because of too
much convolution <0.5 wink>. Simplified to the point that it works,
and test_threading_local no longer reports leaks under -R. Thanks
to Thomas Wouters for initial analysis.
Backport 45338:
test_compile can be really long if we are using -u compiler.
This may be causing the debian sparc buildbot to fail.
Print a little message to let the user ^w buildbot know it's still thinking.
We may want to adjust the time period which is currently 5 minutes.
Anthony Baxter [Thu, 13 Apr 2006 01:29:10 +0000 (01:29 +0000)]
reverting r45322 - "traceback.format_exception_only() now prepends
the exception's module name to non-builtin exceptions, like the
interpreter itself does."
Reverting because:
A - broke tests
B - changed behaviour of 2.4.
Georg Brandl [Wed, 12 Apr 2006 21:14:12 +0000 (21:14 +0000)]
Patch #860326: traceback.format_exception_only() now prepends the
exception's module name to non-builtin exceptions, like the interpreter
itself does.
(backport from rev. 45321)
Tim Peters [Sat, 8 Apr 2006 12:12:56 +0000 (12:12 +0000)]
Merge rev 43734 from the trunk.
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.