Frank Wierzbicki wrote:
>>I noticed doing some tests that some parts of the new-style classes are
>>not working 100%. You can see that for example by running test_descr.py
>>and some tests do fail.
>>I'd like to give it a shot to fix those but wanted to check if somebody
>>else is doing so already? Samuele perhaps?
> I've looked at test_descr some, but haven't gotten too far yet. It'd
> be great if you took a stab at it. I'm currently busy re-working the
> website, so I wouldn't be getting back to tests for a while. Samuele
> is pretty busy with PyPy, and is playing more of an advisory role with
> Jython these days.
yes, although I may have a few days during the second part of december=20
to spend on Jython, although whether I should work on new-style classes=20
or PyJavaClass cleanups is unclear right now. Probably what people here=20
would like some help most.
new-style classes need:
modifying __class__ and __bases__
pickling and java serialisation support
bugs fixing etc.
Also PyType itself needs a *Derived class, to suppot metaclasses.
Btw, related to PyPy, I would recommend to look how it does some of=20
these things*, Jython and PyPy new-style class implementations=20
co-evolved quite a bit , also some details of how CPython does __slots__=20
and checks makes no sense, being size based, in a Java context.
(especially _buildusercls which plays the role of generating
what in Jython context are *Derived classes, see the
W_TypeObject class is the moral equivalent of PyType,
notice that the role playing in PyPy by instancetypedef is related
to the underlying_class role in Jython.
Something like the get_layout method of W_TypeObject would make sense
in Jython too.
>>If not my approach would be to do the necessary fixes until test_descr
>>passes ok (without breaking other parts of course) and contribute
> That sounds like the right approach.
>>I'd be using the tests from Python 2.2.3 Are you using that version or =
> In the case of test_descr.py, I would say we should try to get the
> Python 2.3 version to work. Jython 2.2 is already a 2.2/2.3 hybrid,
> and since test_descr hits so many internal details, I'd rather go for
> 2.3 compatibility for this one.
yes, Jython new-style classes already implements some details as of 2.3,
like the new C3 MRO, so using test_descr from 2.2 in this case, makes
little sense, it would be even misleading.
> This SF.Net email is sponsored by the JBoss Inc. Get Certified Today
> Register for a JBoss Training Course. Free Certification Exam
> for All Training Attendees Through End of 2005. For more info visit:
> Jython-dev mailing list