Guido van Rossum [Mon, 13 Jan 2003 21:21:00 +0000 (21:21 +0000)]
Backport 1.33 from trunk:
Duh. cmdqueue should be an instance variable, not a class variable.
This was introduced in 1998 in rev. 1.13, where I imported extensive
patches that, I am sad to say, I didn't review as carefully as I
should have.
Since the WH generator never produced zero, it wasn't fair to characterize
this as a fix to a long outstanding bug. Instead, it makes sure that the
methods work as documented with any generator.
Steve Holden [Wed, 8 Jan 2003 21:17:35 +0000 (21:17 +0000)]
Retrospectively fix code to handle IE's additional characters on certain
web transactions more gracefully (through a fairly ugly hack). See bugs
430610 and 427345.
Backport typeobject.c revision 2.201 plus associated tests from 2.3:
Add a refinement to SLOT1BINFULL() that fixes the problem reported in
SF bug #623669: only try (e.g.) __rdiv__ before __div__ if the right
class actually overrides it.
Also backport a test for a feature that broke in 2.3 (__dict__ of a
new-style class with a user-defined metaclass should be a proxy).
Backport typeobject.c revision 2.201 plus associated tests from 2.3:
Add a refinement to SLOT1BINFULL() that fixes the problem reported in
SF bug #623669: only try (e.g.) __rdiv__ before __div__ if the right
class actually overrides it.
Correct long standing bugs in the methods for random distributions.
The range of u=random() is [0,1), so log(u) and 1/x can fail.
Fix by setting u=1-random() or by reselecting for a usable value.
Tim Peters [Mon, 23 Dec 2002 16:26:15 +0000 (16:26 +0000)]
Backporting a small part of the socket.py changes from 2.3: get rid
of the socket wrapper __del__ method. It isn't needed, and it prevents
cyclic structures containing socket objects (primarily on Windows, where
the wrapper is used) from getting garbage-collected. People running
ZEO tests in Zope under Windows are acutely aware of this, as the
test driver prints an ever-growing gc.garbage list after each test.
Backport documentation of left-to-right evaluation order.
Highlight the difference for dictionaries and provide Py2.2.3
users which advanced notice that the evaluation order will
change for Py2.3.
Guido van Rossum [Mon, 16 Dec 2002 22:32:46 +0000 (22:32 +0000)]
try_3way_compare() was returning -1 in one case where it should return
-2 (i.e. an exception was set). (This was already fixed in 2.3
through a different refactoring.)
Worth the release of Pyton 2.2.3? Eventually, I guess...
Neal Norwitz [Wed, 20 Nov 2002 23:38:20 +0000 (23:38 +0000)]
Backport fix for SF #640094, on win32 getpass runs into unix_getpass
Make sure we have a UNIX-compatible termios.
Apparently, McMillan Installer made a termios on windows
which caused unix_getpass to be used instead of win_getpass
Backport of rev1.57:
Make the Distribution() constructor forgiving of unknown keyword
arguments, triggering a warning instead of raising an exception. (In
1.5.2/2.0, it will print to stderr.)
Fred Drake [Thu, 14 Nov 2002 22:49:20 +0000 (22:49 +0000)]
The "Up" link should point to index.html, not ./, since these
documents are used from local filesystems as well as through
webservers.
Closes SF bug #624024; not needed on the trunk.
Fred Drake [Wed, 13 Nov 2002 15:33:13 +0000 (15:33 +0000)]
Update: Older versions of Python crashed when calling repr()
(including the implied call using back-ticks) of a recursive object,
but this is no longer the case.
Reported by Manus Hand via email.
Fred Drake [Wed, 13 Nov 2002 15:15:11 +0000 (15:15 +0000)]
Clarify that PyImport_AddModule() and PyImport_ExecCodeModule() don't
add any package support structure even if a dotted-name is passed for
the module.
Closes SF bug #424106.
Fred Drake [Tue, 12 Nov 2002 22:21:01 +0000 (22:21 +0000)]
Handle the Content-Type header a little more appropriately: if it
contains options, drop them to get the major/minor content type.
Modified from the supplied patch to support more whitespace variation.
Closes SF patch #613605.
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.