[Patches] [ python-Patches-537536 ] bug 535444 super() broken w/classmethods
noreply@sourceforge.net
noreply@sourceforge.net
Tue, 02 Apr 2002 11:04:49 -0800
Patches item #537536, was opened at 2002-03-31 18:12
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=537536&group_id=5470
Category: Core (C code)
Group: Python 2.2.x
>Status: Closed
Resolution: Accepted
Priority: 5
Submitted By: Phillip J. Eby (pje)
Assigned to: Guido van Rossum (gvanrossum)
Summary: bug 535444 super() broken w/classmethods
Initial Comment:
This patch fixes bug #535444. It is against the
current CVS version of Python, and addresses the
problem by adding a 'starttype' variable to
'super_getattro', which works the same as 'starttype'
in the pure-Python version of super in the descriptor
tutorial. This variable is then passed to the
descriptor __get__ function, ala
'descriptor.__get__(self.__obj__,starttype)'.
This patch does not correct the pure-Python version of
'super' in the descriptor tutorial; I don't know where
that file is or how to submit a patch for it.
This patch also does not include a regression test for
the bug. I do not know what would be considered the
appropriate test script to place this in.
Thanks.
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2002-04-02 14:04
Message:
Logged In: YES
user_id=6380
Committed to the trunk. I'll leave it to Michael to commit
it to 2.2.1.
----------------------------------------------------------------------
Comment By: Guido van Rossum (gvanrossum)
Date: 2002-04-01 23:11
Message:
Logged In: YES
user_id=6380
Accepted, also as bugfix for 2.2.1 (assuming it works there,
not tested).
I can check this in in the morning.
Thanks all!
----------------------------------------------------------------------
Comment By: Phillip J. Eby (pje)
Date: 2002-04-01 14:41
Message:
Logged In: YES
user_id=56214
Here's the regression test. It asserts 6 things, 5 of which
will fail without the typeobject.c patch to super() in
place. Thanks.
----------------------------------------------------------------------
Comment By: Martin v. Löwis (loewis)
Date: 2002-04-01 06:55
Message:
Logged In: YES
user_id=21627
Please put tests for this stuff into test_descr.py.
----------------------------------------------------------------------
Comment By: Michael Hudson (mwh)
Date: 2002-04-01 04:38
Message:
Logged In: YES
user_id=6656
Guido gets the fix too.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=537536&group_id=5470