[Patches] [ python-Patches-537536 ] bug 535444 super() broken w/classmethods

noreply@sourceforge.net noreply@sourceforge.net
Mon, 01 Apr 2002 11:41:18 -0800


Patches item #537536, was opened at 2002-03-31 23: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: Open
Resolution: None
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: Phillip J. Eby (pje)
Date: 2002-04-01 19: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 11: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 09: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