Barry Warsaw [Sun, 19 May 2002 23:51:50 +0000 (23:51 +0000)]
I've thought about it some more, and I believe it is proper for the
email package's Parser to handle the three common line endings.
Certain protocols such as IMAP define CRLF line endings and it doesn't
make sense for the client app to have to normalize the line endings
before handing it message off to the Parser.
_parsebody(): Be more flexible in the matching of line endings for
finding the MIME separators. Accept any of \r, \n and \r\n. Note
that we do /not/ change the line endings in the payloads, we just
accept any of those three around MIME boundaries.
Barry Warsaw [Sun, 19 May 2002 23:47:53 +0000 (23:47 +0000)]
Fixed a bug in the splitting of lines, and improved the splitting for
single byte character sets. Also fixed a semantic problem with the
constructor's default arguments. Specifically,
__init__(): Change the maxlinelen argument default to None instead of
MAXLINELEN. The semantics should have been (and now are) that if
maxlinelen is given it is always honored. If it isn't given, but
header_name is given, then the maximum line length is calculated. If
neither are given then the default 76 characters is used.
_split(): If the character set is a single byte character set then we
can split the line at the maxlinelen because we know that encoding the
header won't increase its length. If the charset isn't a single byte
charset then we use the quicker divide-and-conquer line splitting
algorithm as before.
Barry Warsaw [Sun, 19 May 2002 23:44:19 +0000 (23:44 +0000)]
Complete a merge of the mimelib project and the Python cvs codebases
for the email package. The former is now just a shell project that
has some extra files for packaging for independent use (e.g. setup.py
and README).
Added a compatibility layer so that the same API can be used in Python
2.1 and 2.2/2.3 with the major differences shuffled off into helper
modules (_compat21.py and _compat22.py).
Also bumped the package version number to 2.0.3 for some fixes to be
checked in momentarily.
This patch removes a vestige part of the Cygwin make rules
that didn't quite make it over during the flattening of the
Makefiles. In its current form, it creates a def file but
incorrectly calls it libpython$(VERSION).dll.a which
immediately gets overwritten by the next command.
Obviously, this is useless. It appears, it was useless
in the old nested Makefile structure too. :,)
Barry Warsaw [Tue, 14 May 2002 02:13:30 +0000 (02:13 +0000)]
smtp_RCPT(): Removed a somewhat embarrassing debugging line, found by
Scot Stevenson. Could be a bug fix candidate, but probably doesn't
matter much unless a certain blue-nosed cat suddenly becomes corporeal
and starts emailing some stmp.py (sic) fronted mailer.
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.