Call me anal, but there was a particular phrase that was speading to
comments everywhere that bugged me: /* Foo is inlined */ instead of
/* Inline Foo */. Somehow the "is inlined" phrase always confused me
for half a second (thinking, "No it isn't" until I added the missing
"here"). The new phrase is hopefully unambiguous.
Close SF bug 563740. complex() now finds __complex__() in new style classes.
Made conversion failure error messages consistent between types.
Added related unittests.
Backport 1.61 (note, the actual deprecation is not backported since it
could affect existing code; instead, the documentation of the deprecation
is being backported to provide maximum advance notice):
Patch 543387. Document deprecation of complex %, //,and divmod().
Barry Warsaw [Fri, 4 Oct 2002 17:24:24 +0000 (17:24 +0000)]
Backporting of email 2.4 from Python 2.3. Many newly added modules,
some updated modules, updated documentation, and updated tests. Note
that Lib/test/regrtest.py added test_email_codecs to the expected
skips for all platforms. Also note that test_email_codecs.py differs
slightly from its Python 2.3 counterpart due to the difference in
package location for TestSkipped.
Barry Warsaw [Mon, 30 Sep 2002 14:42:29 +0000 (14:42 +0000)]
Add "runtime_library_dirs = ssl_libs" to the _socket Extension
specification so that the proper runtime ld.so path gets compiled into
the extension. This fixes _socket for Solaris systems with libssl and
libcrypto in non-standard locations and should be fine for other
systems as well. Closes SF bug #565710.
Forward port candidate for Python 2.3 (I'll work on that).
Fred Drake [Thu, 26 Sep 2002 19:37:36 +0000 (19:37 +0000)]
Previous fix depended on the "code cleanup and general bug fix patch" already
being applied. This is portion of that patch that does not add new
functionality.
Fred Drake [Thu, 26 Sep 2002 15:24:41 +0000 (15:24 +0000)]
Fix for PyXML bug #563399, as much as we can implement without relying on
a specific Expat version.
This includes fixing a test that enforced the incorrect result.
Fred Drake [Wed, 25 Sep 2002 22:31:35 +0000 (22:31 +0000)]
The Python 2.2.x version of pyexpat needs more changes to avoid type
issues with varying versions of Expat; this completes the previous fix
for this version. (Not relevant for the trunk.)
backport tim_one's checkin of
revision 2.36 of binascii.c
Another stab at SF 576327: zipfile when sizeof(long) == 8
binascii_crc32(): The previous patch forced this to return the same
result across platforms. This patch deals with that, on a 64-bit box,
the *entry* value may have "unexpected" bits in the high four bytes.
Bugfix candidate.
--------
More whitespace cleanup related conflict removal... sigh.
backport tim_one's checkin of
revision 2.35 of binascii.c
Fix for SF bug #576327: zipfile when sizeof(long) == 8
binascii_crc32(): Make this return a signed 4-byte result across
platforms. The other way to make this platform-independent would be to
make it return an unsigned unbounded int, but the evidence suggests
other code out there treats it like a signed 4-byte int (e.g., existing
code writing the result with struct.pack "l" format).
Revert Raymond H's checkin. That change depends on a new feature in
2.3, support for source code encodings, so it shouldn't be backported
(no matter how attractive the checkin msg sounded).
Please, try to *use* IDLE before committing changes!
Change the version to 2.2.2a0. (Whether we're going to do a 2.2.2
alpha or beta at all isn't clear; but while it's unreleased, I think
a0 is the best indicator we've got.)
Fred Drake [Tue, 24 Sep 2002 16:25:10 +0000 (16:25 +0000)]
Be more careful with the type of the xmlhandlersetter; it takes an
XML_Parser, which happens to be a pointer type, not an XML_Parser*.
This generated warnings when compiled with Expat 1.95.5, which no
longer defines XML_Parser to be void*.
Tim Peters [Tue, 24 Sep 2002 16:21:36 +0000 (16:21 +0000)]
Replaced this with the 2.3 test_mmap, which contains Windows-specific
fixes for the "try to resize it" test (Windows grows the underlying
file then, and that screws up later tests that assume the underlying
file has not changed size, as was true on the box (Linux) the person
who changed this test in 2.2 to begin with tried it on). Without this
change, test_mmap fails on Windows. Now it passes again.
Backport the UTF-8 codec from 2.3 and add a work-around to let the
UTF-8 decoder accept broken UTF-8 sequences which encode lone
high surrogates (the pre-2.2.2 versions forgot to generate the
UTF-8 prefix \xed for these).
Fixes SF bug #610783: Lone surrogates cause bad .pyc files.
backport jhylton's checkin of
revision 2.87 of cPickle.c
Do more robust test of whether global objects are accessible.
PyImport_ImportModule() is not guaranteed to return a module object.
When another type of object was returned, the PyModule_GetDict() call
return NULL and the subsequent GetItem() seg faulted.
Bug fix candidate.
----------
Once again, whitespace chances scuppered automatic backporting, so
I did this by hand. Review probably wise -- but I have run make test!
Also incorporates revision 2.88 which was just removing a now unused
declaration.
backport gvanrossum's checkin of
revision 1.57 of pdb.py
date: 2002/09/10 21:57:14; author: gvanrossum; state: Exp; lines: +7 -1
At Jim Fulton's request, increase the maxstring value of _saferepr to
a more reasonable value.
backport bwarsaw's checkin of
revision 2.101 of abstract.c
abstract_get_bases(): Clarify exactly what the return values and
states can be for this function, and ensure that only AttributeErrors
are masked. Any other exception raised via the equivalent of
getattr(cls, '__bases__') should be propagated up.
abstract_issubclass(): If abstract_get_bases() returns NULL, we must
call PyErr_Occurred() to see if an exception is being propagated, and
return -1 or 0 as appropriate. This is the specific fix for a problem
whereby if getattr(derived, '__bases__') raised an exception, an
"undetected error" would occur (under a debug build). This nasty
situation was uncovered when writing a security proxy extension type
for the Zope3 project, where the security proxy raised a Forbidden
exception on getattr of __bases__.
PyObject_IsInstance(), PyObject_IsSubclass(): After both calls to
abstract_get_bases(), where we're setting the TypeError if the return
value is NULL, we must first check to see if an exception occurred,
and /not/ mask an existing exception.
Neil Schemenauer should double check that these changes don't break
his ExtensionClass examples (there aren't any test cases for those
examples and abstract_get_bases() was added by him in response to
problems with ExtensionClass). Neil, please add test cases if
possible!
I belive this is a bug fix candidate for Python 2.2.2.
----
Whitespace normalization made this a pest to backport...
1.39:
Fix SF bug 610610 (reported by Martijn Pieters, diagnosed by Neal Norwitz).
The switch in Exception__str__ didn't clear the error if
PySequence_Size() raised an exception. Added a case -1 which clears
the error and falls through to the default case.
1.40:
Two more cases of switch(PySequence_Size()) without checking for case -1.
(Same problem as last checkin for SF bug 610610)
Need to clear the error and proceed.