Re: metadata and decorators are coming your way (pyro 4.27)

Irmen de Jong <[email protected]> Sun, 13 Jul 2014 21:36:46 +0200
Newsgroups gmane.comp.python.pyro
Message-ID <[email protected]>
Coming in Pyro 4.27, but most of the new metadata and @expose-decorator stuff is now
working already. This includes client side attribute checking, which makes hasattr also
work on proxies.

There are 2 new config items:
METADATA, default True, toggles the metadata mechanism
REQUIRE_EXPOSE, default False, expose everything from a server object or require @expose
decorators to cherry pick the methods/attributes you want to expose remotely
You can also @expose on the class itself to expose every member from it.

One thing that still needs work is direct attribute access (via @property on the server
object). If you try this on a proxy, it will still just return a RemoteMethod instance
and is useless at this time.

I'd appreciate it if people play around with this a bit and letting me know what you
think! (the stuff is available in the master branch on github)

Cheers
Irmen


------------------------------------------------------------------------------