Neal Norwitz [Fri, 18 Oct 2002 02:05:47 +0000 (02:05 +0000)]
Try to fix the broken links caused by multiple \ref on the same line.
SF bug #217195.
Not sure if chomp() is correct, but chop() definitely has problems.
This change seems to have no ill effects.
Fred Drake [Thu, 17 Oct 2002 22:09:03 +0000 (22:09 +0000)]
Don't call warnings.resetwarnings(); that does bad things that cause
other tests to generate warning when they didn't before. In
particular, this cancels not only filters set by -W, but also from
test.regrtest.
Guido van Rossum [Wed, 16 Oct 2002 16:52:11 +0000 (16:52 +0000)]
posix_execve(): add missing argument for "et" format in PyArg_Parse()
call. This caused mysterious crashes (hard to debug because it was
happening in a child process).
Guido van Rossum [Tue, 15 Oct 2002 01:01:53 +0000 (01:01 +0000)]
For some reason (probably cut and paste), __ipow__ for new-style
classes was called with three arguments. This makes no sense, there's
no way to pass in the "modulo" 3rd argument as for __pow__, and
classic classes don't do this. [SF bug 620179]
I don't want to backport this to 2.2.2, because it could break
existing code that has developed a work-around. Code in 2.2.2 that
wants to use __ipow__ and wants to be forward compatible with 2.3
should be written like this:
Barry Warsaw [Mon, 14 Oct 2002 18:15:35 +0000 (18:15 +0000)]
I'd forgotten that tcsh was the default for 10.1, but SF's 10.1 system
uses bash and so does my 10.2 system. "limit stacksize 2048" is the
right invocation for tcsh/csh.
Barry Warsaw [Mon, 14 Oct 2002 18:04:39 +0000 (18:04 +0000)]
There was a typo in the MacOSX section regarding the stacksize issue.
There's no limit command near as I can tell. Should be the bash
builtin ulimit command.
Barry Warsaw [Mon, 14 Oct 2002 16:52:41 +0000 (16:52 +0000)]
append(): Fixing the test for convertability after consultation with
Ben. If s is a byte string, make sure it can be converted to unicode
with the input codec, and from unicode with the output codec, or raise
a UnicodeError exception early. Skip this test (and the unicode->byte
string conversion) when the charset is our faux 8bit raw charset.
Barry Warsaw [Mon, 14 Oct 2002 15:13:17 +0000 (15:13 +0000)]
__init__(): Fix an invariant, that the charset item in a chunk tuple
must be a Charset instance, not a string. The bug here was that
self._charset wasn't being converted to a Charset instance so later
.append() calls which used the default charset would break.
_split(): If the charset of the chunk is '8bit', return the chunk
unchanged. We can't safely split it, so this is the avenue of least
harm.
Barry Warsaw [Sun, 13 Oct 2002 04:06:28 +0000 (04:06 +0000)]
_encode_chunks(), encode(): Don't modify self._chunks. As Ben says:
Also, it fixes a really egregious error in Header.encode() (really
in Header._encode_chunks()) that could cause a header to grow and
grow each time encode() was called if output_codec was different
from input_codec.
Guido van Rossum [Fri, 11 Oct 2002 20:37:24 +0000 (20:37 +0000)]
PyObject_Init[Var] is almost always called from the PyObject_NEW[_VAR]
macros. The 'op' argument is then the result from PyObject_MALLOC,
and that can of course be NULL. In that case, PyObject_Init[Var]
would raise a SystemError with "NULL object passed to
PyObject_Init[Var]". But there's nothing the caller of the macro can
do about this. So PyObject_Init[Var] should call just PyErr_NoMemory.
Tim Peters [Fri, 11 Oct 2002 18:25:52 +0000 (18:25 +0000)]
The MS resource compiler simply cannot be convinced to do arithmetic
correctly. So field3.py is a Python program that can. This injects
another manual step into the Python release process for Windows; so
it goes.
Guido van Rossum [Fri, 11 Oct 2002 00:43:48 +0000 (00:43 +0000)]
Fix a nasty endcase reported by Armin Rigo in SF bug 618623:
'%2147483647d' % -123 segfaults. This was because an integer overflow
in a comparison caused the string resize to be skipped. After fixing
the overflow, this could call _PyString_Resize() with a negative size,
so I (1) test for that and raise MemoryError instead; (2) also added a
test for negative newsize to _PyString_Resize(), raising SystemError
as for all bad arguments.
An identical bug existed in unicodeobject.c, of course.
Barry Warsaw [Thu, 10 Oct 2002 15:11:20 +0000 (15:11 +0000)]
__init__(): RFC 2046 $4.1.2 says charsets are not case sensitive.
Coerce the argument to lower case. Also, since body encodings can't
be SHORTEST, default the CHARSETS failobj's second item to BASE64.
Guido van Rossum [Thu, 10 Oct 2002 15:04:04 +0000 (15:04 +0000)]
Add .PHONY targets, to declare targets that aren't real files.
Immediate benefit: when you use "make -t" to avoid a global recompile
after a trivial header file touchup, Make will no longer create files
named all, oldsharedmods, and sharedmods.
(Not sure if I tracked down all such targets. Not sure if I care.)