Fred Drake [Tue, 4 Feb 2003 15:13:25 +0000 (15:13 +0000)]
Update to better reflect the usage of struct_time instances throughout;
continuing to call these "time tuples" is misleading at best.
Closes SF bug #671731; backported from rev 1.55.
Neal Norwitz [Sun, 2 Feb 2003 19:59:59 +0000 (19:59 +0000)]
backport:
revision 2.196
date: 2002/12/07 21:39:16; author: tim_one; state: Exp; lines: +27 -28
slot_nb_nonzero(): Another leak uncovered by the sandbox datetime
tests. I found the logic too confusing to follow here, so rewrote more
than was likely absolutely necessary.
Neal Norwitz [Sun, 2 Feb 2003 19:37:32 +0000 (19:37 +0000)]
backport:
revision 2.164
date: 2002/10/29 18:36:40; author: gvanrossum; state: Exp; lines: +12 -13
Since properties are supported here, is possible that
instance_getattr2() raises an exception. Fix all code that made this
assumption.
revision 1.13
date: 2002/12/20 20:13:35; author: theller; state: Exp; lines: +1 -1
Fix an error message in the _winreg module. The error message referred
to a constant in the 'win32con' module, but this constant is also
defined in the _winreg module itself.
Neal Norwitz [Sun, 2 Feb 2003 19:24:38 +0000 (19:24 +0000)]
backport:
revision 1.29
date: 2002/11/21 21:08:39; author: gvanrossum; state: Exp; lines: +14 -8
The _Event class should be more careful with releasing its lock when
interrupted. A try/finally will do nicely. Maybe other classes need
this too, but since they manipulate more state it's less clear that
that is always the right thing, and I'm in a hurry.
revision 1.125
date: 2002/12/17 01:08:06; author: nnorwitz; state: Exp; lines: +6 -1
Fix SF # 641111, Undocumented side effect of eval
Try to clear up confusion about the current globals being copied
into a globals dict passed to eval(). This wording (more or less)
was suggested in bug report. It should probably be made clearer.
revision 1.124
date: 2002/12/17 01:02:57; author: nnorwitz; state: Exp; lines: +78 -0
Fix SF #642742, property() builtin not documented
Added doc for functions new to 2.2: classmethod property staticmethod super
Taken from docstrings. Could use review.
Hope there wasn't a reason why these shouldn't have been added.
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.