From: Marc D. <ma...@op...> - 2009-01-12 22:58:50
|
> > It looks like they're doing some pretty major surgery on the internals > of Jython, so I don't know if this is going to be an easy upgrade. In > addition to the PyJavaInstance stuff you linked, they're wrapping > PyJavaClass, another class that went away. The best way to do this > sort of instrumentation is probably to install a custom > PyObjectAdapter in PySystemState.initialize that recognizes the > classes and instances that grinder would like to wrap and modifies > their PyJavaType to use instrumented __getattr__ and __call__ methods > that do their bidding. I'm having trouble figuring out what the > instrumentation they're doing is for, so I'm not sure if that would > work. What are they changing in wrapping stuff? Would it be possible for you or anybody else to elaborate? Or is there a document I've missed? I, too, have a code-base that was, up until beta 1 dropped, using PyJavaInstance subclasses. In my case I'm already using my own PyObjectAdapter, I just need a sentence or four on how make PyJavaType / PyObjectDerived to that give the appearance of special __findattr__ / __setattr___ etc. to instances as they get 'adapted' from Java to Python. Or maybe any other way of doing it. I'll swap you that for a nasty little corner-case NPE in beta-1's MRO-computation that I'm currently trying to turn into an isolated example... best, Marc. |