Issue1658647

classification
Title: type(x) calls x.__class__.__init__
Type: Severity: normal
Components: Core Versions:
Milestone:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: cgroves, h_eriksson, kzuberi, pedronis
Priority: normal Keywords:

Created on 2007-02-13.06:33:43 by kzuberi, last changed 2007-03-10.03:55:41 by kzuberi.

Messages
msg1427 (view) Author: Khalid Zuberi (kzuberi) Date: 2007-02-13.06:33:43
but shouldn't. This is one of the failures in metaclass() in test_descr. 

The other metaclass related test failure i'm aware of seems to be due to attribute differences (in this case function objects not having __get__) which also show up in the checker22 output, so i assume that problem will get cleaned up as attribute differences are resolved.

For the type(x) problem, i wonder if its more subtle than just special casing the arg signature in PyType.invoke_new_() and not calling dispatch__init__()? 

- kz
msg1428 (view) Author: Henrik Eriksson (h_eriksson) Date: 2007-03-05.20:07:52
I ran into this bug while trying to get CherryPy 3 running. Have you looked closer at the problem? Your simple solution sounds pretty good to me.
msg1429 (view) Author: Khalid Zuberi (kzuberi) Date: 2007-03-07.16:57:48
I tried it out after posting the bug report, but it caused other regressions. I guess i could add some type checks in addition to the arg signature, but it feels a bit kludgy, and i'm wondering if there's a better approach. Suggestions welcome.

- kz
msg1430 (view) Author: Henrik Eriksson (h_eriksson) Date: 2007-03-08.07:03:07
I need this bug fix to be able to take the next step in getting CherryPy3 running on Jython, so I will look into it. I won't be able to dig into the code for a while though...
msg1431 (view) Author: Samuele Pedroni (pedronis) Date: 2007-03-08.10:00:32
I will look into this over the weekend, and indeed it is special cased in CPython.
msg1432 (view) Author: Charlie Groves (cgroves) Date: 2007-03-09.16:43:19
Eric Dobbs was looking at this during the spring.  I've just pinged him to see how far he got.
msg1433 (view) Author: Samuele Pedroni (pedronis) Date: 2007-03-09.22:59:22
this should be fixed in r3140.
msg1434 (view) Author: Khalid Zuberi (kzuberi) Date: 2007-03-10.03:55:41
Verified that fixed the failing test case from test_descr. Also applied to 2.3 in r3142.

- kz
History
Date User Action Args
2007-02-13 06:33:43kzubericreate