backport jackjansen's checkin of
revision 1.211 of socketmodule.c
Due to interaction between the MSL C library and the GUSI I/O library I can get reads from sockets to work consistently either for unbuffered binary files or for buffered binary files, but not for both:-(
The workaround is to force socket.makefile() to disable buffering for binary files.
backport akuchling's checkin of
revision 1.14 of netrc.py
[Bug #532115] netrc module was broken
* 'macdef' (macro definition) wasn't parsed correctly
* account value not reset for a subsequent 'default' line
* typo: 'whitepace' -> 'whitespace'
backport tim_one's checkin of
revision 2.55 of complexobject.c
SF bug 533198: Complex power underflow raises exception.
Konrad was too kind. Not only did it raise an exception, the specific
exception it raised made no sense. These are old bugs in complex_pow()
and friends:
1. Raising 0 to a negative power isn't a range error, it's a domain
error, so changed c_pow() to set errno to EDOM in that case instead
of ERANGE.
2. Changed complex_pow() to:
A. Used the Py_ADJUST_ERANGE2 macro to try to clear errno of a spurious
ERANGE error due to underflow in the libm pow() called by c_pow().
B. Produced different exceptions depending on the errno value:
i) For errno==EDOM, raise ZeroDivisionError instead of ValueError.
This is for consistency with the non-complex cases 0.0**-2 and
0**-2 and 0L**-2.
ii) For errno==ERANGE, raise OverflowError.
Jack Jansen [Mon, 25 Mar 2002 12:33:48 +0000 (12:33 +0000)]
Backport of 1.27, 1.29 and 1.30:
CodeWarrior includes Waste and Internet Config nowadays, obviating the need for separate downloads.
- Weaklink InterfaceLib in _Res module
- forgot to pass libraryflags and stdlibraryflags on to ppc/carbon
project generation.
First half of fix to 531398.
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, inShould finally fix 531398. 2.2.1 candidate.se an exception.
backport akuchling's checkin of
revision 1.47 of httplib.py
[Bug #531616] Make HTTPS work again by adding a sendall method to the
FakeSocket class. Without it, the sendall() call got the method on
the underlying socket object, and that messed up SSL.
Does httplib use other methods of sockets that FakeSocket doesn't support?
Someone should take a look... (I'll try to give it a once-over.)
Jack Jansen [Mon, 25 Mar 2002 12:24:50 +0000 (12:24 +0000)]
Backport of _Cmmodule.c 1.8 and cmsupport.py 1.6:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
backport bwarsaw's checkin of
revision 4.8 of python-mode.el
(py-temp-directory): Add /var/tmp to the list of directories this
searches. This is added after /tmp. Closes SF bug #505488, except
that /var/tmp comes after /tmp instead of the patch's suggestion of
putting it before /usr/tmp.
Jack Jansen [Mon, 25 Mar 2002 12:20:43 +0000 (12:20 +0000)]
Backport of _Qdmodule.c 1.8, qdsupport.py 1.38:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 12:17:28 +0000 (12:17 +0000)]
Backport of _Dragmodule.c 1.8, dragsupport.py 1.10:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 11:14:28 +0000 (11:14 +0000)]
Backport of _Evtmodule.c 1.6, evtsupport.py 1.15:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 10:56:59 +0000 (10:56 +0000)]
Backport of _Fmmodule.c 1.6 and fmsupport.py 1.6:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 10:45:21 +0000 (10:45 +0000)]
Backport of _Icnmodule.c 1.5, icnsupport.py 1.7:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 10:43:35 +0000 (10:43 +0000)]
Backport of _Qdoffsmodule.c 1.7, qdoffssupport.py 1.8:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 10:41:18 +0000 (10:41 +0000)]
Backport of _TEmodule.c 1.8, tesupport.py 1.10:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 10:38:57 +0000 (10:38 +0000)]
Backport of _Qtmocule.c 1.7, qtsupport.py 1.19:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 10:30:36 +0000 (10:30 +0000)]
Backport of _Appmodule.c 1.10, appsupport.py 1.14:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 10:25:56 +0000 (10:25 +0000)]
Backport of 1.20:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Should finally fix 531398. 2.2.1 candidate.
Also blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 10:23:56 +0000 (10:23 +0000)]
Backport of 1.7:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, inAlso blacklisted some constants with definitions that were not Python-compatible.
Jack Jansen [Mon, 25 Mar 2002 10:21:42 +0000 (10:21 +0000)]
Backport of _AEmodule.c 1.10 and aesupport.py 1.26:
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, inAlso blacklisted some constants with definitions that were not Python-compatible.
Fred Drake [Fri, 22 Mar 2002 17:23:03 +0000 (17:23 +0000)]
Fix broken HTML in the head; this was reported by a user as causing Opera 6.01
to crash. The user has reported the problem to Opera, but we still should
generate something that passes for HTML.
Barry Warsaw [Fri, 22 Mar 2002 16:21:56 +0000 (16:21 +0000)]
_handle_multipart(): Fixes for SF bug #531966. Specifically two
situations are handled now: a multipart/* containing no payload
(i.e. never set), and a multipart/* containing a scalar payload
(i.e. Message.add_payload() having been called exactly once, not
passing in a sequence object).
_make_boundary(): Fixed bogus cut-n-paste error (self as first arg).
I will merge these changes into the standalone email package and
Python 2.3 separately.
Barry Warsaw [Fri, 22 Mar 2002 16:19:30 +0000 (16:19 +0000)]
test_no_parts_in_a_multipart(): A test for the layout of a
multipart/mixed message with no attachments.
test_one_part_in_a_multipart(): A test for the layout of a
multipart/mixed message with a single attachment.
test_seq_parts_in_a_multipart(): A test for the layout of a
multipart/mixed message with a single attachment that happens to be a
sequence of length one.
These tests ensure no regressions on the fix for SF bug #531966.
I will merge these into the standalone email package and Python 2.3
trunk separately.
Jack Jansen [Fri, 22 Mar 2002 15:48:44 +0000 (15:48 +0000)]
Backport of _Resmodule.c 1.10 and ressupport.py 1.21:
Generate with weaklink stubs, so missing routines (on MacOS 8.6 and earlier)
don't cause import failure.
Fred Drake [Tue, 19 Mar 2002 03:33:14 +0000 (03:33 +0000)]
Clarify that copy_reg.pickle() is not intended for use with "classic" classes.
This was stated before, but a minor grammatical error made it difficult to be
sure of the meaning.
This closes SF bug #530143.
Jack Jansen [Mon, 18 Mar 2002 15:54:29 +0000 (15:54 +0000)]
Backport of _CFmodule.c 1.11 and _Winmodule 1.8:
Lurking bug found by patch for 531291: FSSpecs should be passed to
Py_BuildValue by address, not by value.
Jack Jansen [Mon, 18 Mar 2002 15:38:24 +0000 (15:38 +0000)]
Backport of _Resmodule.c 1.10 and ressupport.py 1.20:
Some of the newer routines return an OSErr, like most toolbox calls,
in stead of depending on ResError(). Second half of fix for #531291.
Guido van Rossum [Mon, 18 Mar 2002 03:05:36 +0000 (03:05 +0000)]
Fix for SF bug 528132 (Armin Rigo): classmethod().__get__() segfault
The proper fix is not quite what was submitted; it's really better to
take the class of the object passed rather than calling PyMethod_New
with NULL pointer args, because that can then cause other core dumps
later.
I also added a testcase for the fix to classmethods() in test_descr.py.
update text to refer to ServerProxy class in preference to Server, which is
only retained for backward compatibility with older versions of the library.
So there is some merit in slogging through ~4800 lines of cvs log.
Bring tempfile.py up to date from the trunk. There have been three
checkins (all by Tim):
SF bug #509805 tempfile.gettempdir not threadsafe
This is an ancient race when multiple threads call gettempdir() (or
anything relying on it) for the first time.
Fixed x-platform via the Big Hammer of rearranging the code to serialize
the first calls. Subsequent calls are as fast as before.
Note that the Python test suite can't provoke this bug: it requires
setting up multiple threads making the very first calls into tempfile,
but the test suite uses tempfile several times before getting to
test_threadedtempfile.
Bugfix candidate.
[and]
New TemporaryFile implementation for Windows: this doesn't need a
TemproraryFileWrapper wrapper anymore, and should be immune from the
problem that a temp file inherited by a spawned process caused an
attempt to close the temp file in the spawning process to blow
up (the unlink in TemporaryFileWrapper.close() blew up with a
"Permission denied" error because, despite that the temp file got
closed in the spawning process, the spawned process still had it open
by virtue of C-level file descriptor inheritance). In context,
that bug took days to figure out <wink/sigh>.
[and]
Thanks to Detlef Lannert for pointing out a typo in the code that
uses _DummyMutex on platforms without threads.
The first and third of these are pretty clearly bugfixes; I think the
second is too.
backport bwarsaw's checkin of
revision 4.7 of python-mode.el
(py-honor-comment-indentation, py-compute-indentation): Fix the
implementation to match the documentation for
py-honor-comment-indentation w.r.t. not nil or t value. In that case
it should still ignore ## for indentation purposes. Closes SF bug
#523825, w/ patch provided by Christian Stork (mod'd by Barry).
backport montanaro's checkin of
revision 1.24 of calendar.py
make _localized_name instances work more like the tuples they replaced. In
particular, negative indexes work and they are limited by the actual length
of the names they represent (weekday and month names). This closes bug
#503202.
[and then]
Corrected _localized_name.__getitem__ based on code in patch 503202 (which I
thought was just a bug report, so didn't notice - doh!). This handles
slicing, which v 1.23 didn't.
backport gvanrossum's checkin of
revision 1.121 of test_descr.py
"Fix" for SF bug #520644: __slots__ are not pickled.
As promised in my response to the bug report, I'm not really fixing
it; in fact, one could argule over what the proper fix should do.
Instead, I'm adding a little magic that raises TypeError if you try to
pickle an instance of a class that has __slots__ but doesn't define or
override __getstate__. This is done by adding a bozo __getstate__
that always raises TypeError.
Bugfix candidate (also the checkin to typeobject.c, of course).
backport gvanrossum's checkin of
revision 2.129 of typeobject.c
"Fix" for SF bug #520644: __slots__ are not pickled.
As promised in my response to the bug report, I'm not really fixing
it; in fact, one could argule over what the proper fix should do.
Instead, I'm adding a little magic that raises TypeError if you try to
pickle an instance of a class that has __slots__ but doesn't define or
override __getstate__. This is done by adding a bozo __getstate__
that always raises TypeError.
Fred Drake [Sat, 16 Mar 2002 05:10:22 +0000 (05:10 +0000)]
Clarify the descriptions of the positive and negative lookbehind assertions.
Added examples of positive lookbehind assertions.
This closes SF bug #529708.
Fred Drake [Sat, 16 Mar 2002 04:52:55 +0000 (04:52 +0000)]
pdfTeX 0.13 and 0.14 do not agree on the name of the macro, and I will not
change the installed version on either of the machines I use to format the
docs. Instead, use a compatibility hack to support both versions. This is
also better for external users of the Python styles.
Fred Drake [Fri, 15 Mar 2002 23:18:05 +0000 (23:18 +0000)]
Revise the markup related to the grammar productions to increase the
level of predictability. This is not really "good" markup, but is arguably
better than we had before.
This closes SF bug #523117.