Message3809

Author cgroves
Recipients MrMeanie, cgroves, fwierzbicki, zyasoft
Date 2008-11-22.23:53:13
SpamBayes Score 3.6604053e-13
Marked as misclassified No
Message-id <1227397994.23.0.729435234919.issue1148@psf.upfronthosting.co.za>
In-reply-to
Content
Unfortunately CollectionProxy is going to go away in the
newstyle-java-type branch.  Rather than creating a CollectionProxy for
each wrapped Java object as necessary, PyJavaType fills in __len__,
__get__ and so on in its type dict with individual proxy methods as
appropriate.  All of the Proxy classes towards the end of PyJavaType are
bridges for various collections methods.  It's not complete yet, but it
gets the bulk of what CollectionProxy currently does.

That handles a couple of the issues you solved here: not picking up the
correct exposing method for List vs Vector and not using a Python
implementation of __get__ or so on if its first in the lookup order
before the Java version.  Since the individual proxy methods are just
part of the type, they go through the normal mro lookup.

However, all of the nice new features you've added aren't in the new
proxy methods.  I definitely want to pick all of those up, so we have a
couple ways to do that:

1. You could check out the branch and modify the methods in PyJavaType
to have your collections modification.  That would be a nice sanity
check of my copying of the original CollectionProxy.  I will warn you
that the branch isn't close to completion, so it could blow up in all
sorts of interesting ways as we depend heavily on Java integration.  I
think it's stable enough now that you could work on it though.

2.  If you don't feel like adapting this or walking through the
minefield of a halfway completed branch, I'll go through your patches
and update the new proxy methods.

Feel free to respond here or to jump on #jython on irc.freenode.net for
more discussion.  I'm groves in there.
History
Date User Action Args
2008-11-22 23:53:14cgrovessetmessageid: <1227397994.23.0.729435234919.issue1148@psf.upfronthosting.co.za>
2008-11-22 23:53:14cgrovessetrecipients: + cgroves, fwierzbicki, zyasoft, MrMeanie
2008-11-22 23:53:14cgroveslinkissue1148 messages
2008-11-22 23:53:13cgrovescreate