This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: bug 535444 super() broken w/classmethods
Type: Stage:
Components: Interpreter Core Versions: Python 2.2
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: gvanrossum Nosy List: gvanrossum, loewis, mwh, pje
Priority: normal Keywords: patch

Created on 2002-03-31 23:12 by pje, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
superpatch pje, 2002-03-31 23:12
testpatch pje, 2002-04-01 19:41 Patch to test_descr.py to test for bug 535444
Messages (6)
msg39441 - (view) Author: PJ Eby (pje) * (Python committer) Date: 2002-03-31 23:12
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.
msg39442 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2002-04-01 09:38
Logged In: YES 
user_id=6656

Guido gets the fix too.
msg39443 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2002-04-01 11:55
Logged In: YES 
user_id=21627

Please put tests for this stuff into test_descr.py.
msg39444 - (view) Author: PJ Eby (pje) * (Python committer) Date: 2002-04-01 19:41
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.
msg39445 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-04-02 04:11
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!
msg39446 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2002-04-02 19:04
Logged In: YES 
user_id=6380

Committed to the trunk. I'll leave it to Michael to commit
it to 2.2.1.
History
Date User Action Args
2022-04-10 16:05:10adminsetgithub: 36364
2002-03-31 23:12:23pjecreate