Neal Norwitz [Thu, 7 Nov 2002 00:28:54 +0000 (00:28 +0000)]
Backport 1.72:
SF bug 630824: pydoc Helper keywords missing 'yield'
Wow, what a brittle subsystem! Fixed, maybe, provided Fred doesn't
shuffle the docs around.
Fred Drake [Fri, 1 Nov 2002 21:34:39 +0000 (21:34 +0000)]
Update example for the type() function to use the currently accepted
preference of using "is" instead of "==" to compare types, use
built-in names where available, and point to the isinstance()
function.
Closes SF bug #632196.
Fred Drake [Wed, 30 Oct 2002 18:18:08 +0000 (18:18 +0000)]
Add notes to the asctime() and ctime() descriptions to make it
explicit that locale information is not used. There wasn't anything
that implied it was, but this has confused users.
Fred Drake [Mon, 28 Oct 2002 19:30:45 +0000 (19:30 +0000)]
Chapter titles that get split over multiple lines in the typeset
formats can't have whitespace after the last non-blank character (bug
in LaTeX?); fix up a couple of instances of this.
Jack Jansen [Fri, 25 Oct 2002 20:36:53 +0000 (20:36 +0000)]
Backport of 1.5:
Under Jaguar it seems that 'errn' return value keyword parameters don't
(or don't always?) show up with missed(). I think this is a bug in
Jaguar, but as it is a potential dangerous problem (the OSA event has
failed, but the Python code isn't told about this and happily continues)
this is a quick workaround.
Fred Drake [Thu, 24 Oct 2002 19:36:41 +0000 (19:36 +0000)]
Update an example to use the DOM implementation object. Explain that
the parse() and parseString() functions use a separate parser, not
actually implement a parser. (This is a common question.)
Fred Drake [Wed, 23 Oct 2002 20:24:46 +0000 (20:24 +0000)]
Deal with a FAQ:
Explain that the "xml" package requires that at least one
SAX-compliant XML parser be installed, and why this may not be
available by default. Point to the PyXML package as an extended
version of the "xml" package that can provide this fuctionality.
Note that the docs for the xml.dom and xml.sax packages are the
definitiona of the Python bindings for the DOM and SAX interfaces.
Barry Warsaw [Mon, 14 Oct 2002 18:21:49 +0000 (18:21 +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:13:24 +0000 (18:13 +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:03:04 +0000 (18:03 +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.
Guido van Rossum [Fri, 11 Oct 2002 20:37:58 +0000 (20:37 +0000)]
Backport 2.193:
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:38:20 +0000 (18:38 +0000)]
SF bug 621507: python22.dll incorrect "File version".
The MS resource compiler can't do arithmetic. Fixed it by hand. Note
that the new PCbuild\field3.py was added to help with this, and injects
another manual step into the Python Windows release process.
Tim Peters [Fri, 11 Oct 2002 18:29:54 +0000 (18:29 +0000)]
Backporting a new file from 2.3 needed to worm around that MS's
resource compiler can't do correct arithmetic. The 3rd 16-bit int
in the "binary file version" we produce on Windows has been nonsense
as a result. I'll fix that next.
Guido van Rossum [Fri, 11 Oct 2002 00:47:20 +0000 (00:47 +0000)]
Backport stringobject.c 2.194 and unicodeobject.c 2.172:
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.
Guido van Rossum [Fri, 11 Oct 2002 00:22:22 +0000 (00:22 +0000)]
New in 2.2.2!
In inherit_slots(), get rid of the COPYSLOT(tp_dictoffset). Copying
the offset from a non-dominant base makes no sense: either the
non-dominant base has a nonzero tp_dictoffset, and then we should have
already copied it from the dominant base (at the very end of
inherit_special()), or the non-dominant base has no tp_dictoffset and
for some reason type_new() decided not to add one. The tp_dictoffset
from a non-dominant base is likely to conflict with the instance
layout of the dominant base, so copying the tp_dictoffset from the
non-dominant base would be a really bad idea in that case. This bug
can only be triggered by multiple inheritance from an extension class
that doesn't set tp_dictoffset and a new-style user-level class that
does have one. There are no such extension classes in the
distribution, but there are 3rd party ones. (Zope3 now has one,
that's how I found this. :-)
I've asked a few heavy users of new-style classes, extension classes
and metaclasses (David Abrahams and Kevin Jacobs), and neither of them
found any problems in their test suite after applying this fix, so I
assume it's safe.
Guido van Rossum [Fri, 11 Oct 2002 00:09:51 +0000 (00:09 +0000)]
Backport the relevant part of 2.192:
The string formatting code has a test to switch to Unicode when %s
sees a Unicode argument. Unfortunately this test was also executed
for %r, because %s and %r share almost all of their code. This meant
that, if u is a unicode object while repr(u) is an 8-bit string
containing ASCII characters, '%r' % u is a *unicode* string containing
only ASCII characters!
Barry Warsaw [Thu, 10 Oct 2002 00:59:16 +0000 (00:59 +0000)]
detect_modules(): Be more conservative about adding
runtime_library_dirs (i.e. -R flags) when building the _socket.so
module. Whitelist only the platforms we know need the flags, which
are only sunos (aka Solaris) platforms at the moment. Tested on
RH7.3, OSX 10.2, and Solaris 8.