Guido van Rossum [Mon, 13 May 2002 18:29:46 +0000 (18:29 +0000)]
Jim Fulton reported a segfault in dir(). A heavily proxied object
returned a proxy for __class__ whose __bases__ was also a proxy. The
merge_class_dict() helper for dir() assumed incorrectly that __bases__
would always be a tuple and used the in-line tuple API on the proxy.
Closes SF patch 553277. Per GvR, reverting to original patch -- the way to
test if 'callable' has not been supplied is to test for None instead of
False. The previous correction to 'if callable()' was wrong because an unusable
callback would be ignored rather than raising an exception.
Jack Jansen [Wed, 8 May 2002 22:13:51 +0000 (22:13 +0000)]
Fixed string and dict conversion, and implemented booleans and numbers (int and float). I think we now have enough CFType support to start on plists and CFpreferences!
Transparent handling of unknown CFType objects still TBD.
Martin v. Löwis [Wed, 8 May 2002 08:44:21 +0000 (08:44 +0000)]
Patch #552433: Special-case tuples. Avoid sub-type checking for lists.
Avoid checks for negative indices and duplicate checks for support of
the sequence protocol.
Tim Peters [Sun, 5 May 2002 20:40:00 +0000 (20:40 +0000)]
random.gauss() uses a piece of hidden state used by nothing else,
and the .seed() and .whseed() methods failed to reset it. In other
words, setting the seed didn't completely determine the sequence of
results produced by random.gauss(). It does now. Programs repeatedly
mixing calls to a seed method with calls to gauss() may see different
results now.
Bugfix candidate (random.gauss() has always been broken in this way),
despite that it may change results.
Move all data for a single generation into a structure. The set of
generations is now an array. This cleans up some code and makes it easy
to change the number of generations. Also, implemented a
gc_list_is_empty() function. This makes the logic a little clearer in
places. The performance impact of these changes should be negligible.
One functional change is that allocation/collection counters are always
zeroed at the start of a collection. This should fix SF bug #551915.
This change is too big for back-porting but the minimal patch on SF
looks good for a bugfix release.
Fred Drake [Fri, 3 May 2002 04:50:51 +0000 (04:50 +0000)]
Integrated SF patch #539487 by Matthias Klose:
This patch adds Milan Zamazal's conversion script and
modifies the mkinfo script to build the info doc files
from the LaTeX sources. Currently, the mac, doc and
inst TeX files are not handled.
Explicitly checks for GNU Emacs 21.
Tim Peters [Thu, 2 May 2002 21:59:08 +0000 (21:59 +0000)]
Boost the list of stop words, by merging in the little list Jeremy
just checked into Zope's ZCTextIndex branch. This reduces the size
of the .chm file by about 100KB.
Fred Drake [Thu, 2 May 2002 20:42:30 +0000 (20:42 +0000)]
Work around limitation of Cygwin Perl: To avoid a permission denial, we need
to do the inplace-edit with a backup file. A quick test leads me to
believe this is sufficient to allow building the documentation on Cygwin;
a full test is in progress.
Fred Drake [Thu, 2 May 2002 18:40:31 +0000 (18:40 +0000)]
Remove all tests that rely on deprecated-in-2.2 features of xrange objects.
"What's New in Python 2.2" documented that these would be removed in
Python 2.3.
Fred Drake [Thu, 2 May 2002 16:05:27 +0000 (16:05 +0000)]
Fix attribute access for the xrange objects. The tp_getattr and tp_getattro
handlers were both set, but were not compatible. This change uses only the
tp_getattro handler with a more "modern" approach.
This fixes SF bug #551285.
Fred Drake [Wed, 1 May 2002 17:25:04 +0000 (17:25 +0000)]
list_documented_items(): Basic implementation.
This still does not work well since ctags does not do a good job with the
Python headers, appearantly due to the DL_IMPORT macro. ;-(
Fred Drake [Tue, 30 Apr 2002 02:18:51 +0000 (02:18 +0000)]
Added a missing "|" in the grammar productions used in the reference manual
(reported by François Pinard).
Added some missing "_" characters in the same cluster of productions.
Added missing floor division operator in m_expr production, and mention
floor division in the relevant portion of the text.
Unicode objects are currently taken as binary data by the write()
method. This is not what Unicode users expect, nor what the
StringIO.py code does. Until somebody adds a way to specify binary or
text mode for cStringIO objects, change the format string to use "t#"
instead of "s#", so that it will request the "text buffer" version.
This will try the default encoding for Unicode objects.
This is *not* a 2.2 bugfix (since it *is* a semantic change).
Tim Peters [Mon, 29 Apr 2002 01:37:32 +0000 (01:37 +0000)]
Mostly in SequenceMatcher.{__chain_b, find_longest_match}:
This now does a dynamic analysis of which elements are so frequently
repeated as to constitute noise. The primary benefit is an enormous
speedup in find_longest_match, as the innermost loop can have factors
of 100s less potential matches to worry about, in cases where the
sequences have many duplicate elements. In effect, this zooms in on
sequences of non-ubiquitous elements now.
While I like what I've seen of the effects so far, I still consider
this experimental. Please give it a try!