Tim Peters [Tue, 8 Oct 2002 21:01:07 +0000 (21:01 +0000)]
The
list(xrange(sys.maxint / 4))
test. Changed 4 to 2.
The belief is that this test intended to trigger a bit of code in
listobject.c's NRESIZE macro that's looking for arithmetic overflow. As
written, it doesn't achieve that, though, and leaves it up to the platform
realloc() as to whether it wants to allocate 2 gigabytes. Some platforms
say "sure!", although they don't appear to mean it, and disaster ensues.
Changing 4 to 2 (just barely) manages to trigger the arithmetic overflow
test instead, leaving the platform realloc() out of it.
Mark Hammond [Tue, 8 Oct 2002 02:44:31 +0000 (02:44 +0000)]
Add os.path.supports_unicode_filenames for all platforms,
sys.getwindowsversion() on Windows (new enahanced Tim-proof <wink>
version), and fix test_pep277.py in a few minor ways.
Including doc and NEWS entries.
Barry Warsaw [Mon, 7 Oct 2002 17:27:55 +0000 (17:27 +0000)]
openfile(): Go back to opening the files in text mode. This undoes
the change in revision 1.11 (test_email.py) in response to SF bug
#609988. We now think that was the wrong fix and that WinZip was the
real culprit there.
Barry Warsaw [Mon, 7 Oct 2002 17:27:35 +0000 (17:27 +0000)]
_parsebody(): Use get_content_type() instead of the deprecated
get_type(). Also, one of the regular expressions is constant so might
as well make it a module global. And, when splitting up digests,
handle lineseps that are longer than 1 character in length
(e.g. \r\n).
Fred Drake [Mon, 7 Oct 2002 16:28:38 +0000 (16:28 +0000)]
Modified presentation of the grammar for calls to be easier to read
for both HTML and typeset renderings. Corresponds to revision
1.53.4.8 on the r22-maint branch.
Add test_pep277 to the expected skips on Linux. (This test seems to
be skipped everywhere except on Windows NT and descendants, but I'm
only going to add it to the skip list for the platform I can test.)
Tim Peters [Sat, 5 Oct 2002 17:54:56 +0000 (17:54 +0000)]
This test fails on Win98, which is fine, but when it failed it left
a junk directory behind that caused 4 other tests to fail later. Now
it cleans up after itself, and the 4 bogus later failures don't happen.
When looking for an alias, first look for the normalized name (which
still may contain dots), then if that doesn't exist look for the name
with dots replaced by underscores. This is a little more forgiving.
Mark Hammond [Thu, 3 Oct 2002 07:24:48 +0000 (07:24 +0000)]
Trivial fix to the pep277 checkin: ensure that exceptions always have a filename attribute (previously did only when string filenames were passed, but not when unicode)
Fred Drake [Tue, 1 Oct 2002 15:30:56 +0000 (15:30 +0000)]
When the HTML output dir is specified using --dir=~/foo, the tilde
needs to be expanded by mkhowto, since the shell won't touch it except
at the start of the complete argument.
Fred Drake [Tue, 1 Oct 2002 15:20:20 +0000 (15:20 +0000)]
Change the default path to icons so that "mkhowto" does the "right thing" by
default when used for 3rd-party docs. This requires the standard Python docs
to specify a location, but they are a bit of a special case in sharing one set
of icons among several documents.
Fred Drake [Tue, 1 Oct 2002 14:17:10 +0000 (14:17 +0000)]
Split the long email package examples into separate files and use
\verbatiminput instead of the verbatim environment -- this does the "right
thing" regarding page breaks in long examples for the typeset formats, and
has nice benefits for the HTML version as well.
Strangely, two out of three patches there seem already committed; but
the essential one (get rid of the assert in object_filenames in
ccompiler.py) was not yet applied.
This makes the build procedure for Twisted work again.
This is *not* a backport candidate despite the fact that identical
code appears to exist in 2.2.2; Twisted builds fine there, so there
must have been a change elsewhere.
Barry Warsaw [Mon, 30 Sep 2002 15:51:31 +0000 (15:51 +0000)]
With help from Martin v. Loewis, clarification is added for the
semantics of header chunks using byte and Unicode strings.
Specifically,
append(): When the given string is a byte string, charset (whether
specified explicitly in the argument list or implicitly via the
constructor default) is the encoding of the byte string, and a
UnicodeError will be raised if the string cannot be decoded with that
charset. If s is a Unicode string, then charset is a hint specifying
the character set of the characters in the string. In this case, when
producing an RFC 2822 compliant header using RFC 2047 rules, the
Unicode string will be encoded using the following charsets in order:
us-ascii, the charset hint, utf-8.
__init__(): Use the global USASCII Charset instance when the charset
argument is None. Also, clarification in the docstring.
Barry Warsaw [Mon, 30 Sep 2002 15:23:17 +0000 (15:23 +0000)]
The ansi_x3.4_1968 encoding is an alias for ascii, but isn't known in
Python 2.1.3. However it's required by the email tests suite, so poke
it into the encodings aliases if it's missing. The is apparently the
approved API for doing so.
Now we can remove the hexversion shortcircuits in the test suite.
Barry Warsaw [Sat, 28 Sep 2002 21:22:52 +0000 (21:22 +0000)]
Make the tests pass under Python 2.1 but only by cheating. Python 2.1
doesn't know about the ansi-x3.4-1968 charset so skip two tests that
rely on that (msg_32.txt and msg_33.txt).