Re: Serialization of return value (2)

Irmen de Jong <[email protected]> Fri, 07 Nov 2014 21:21:38 +0100
Newsgroups gmane.comp.python.pyro
Message-ID <[email protected]>
On 7-11-2014 8:48, Borek Patzak wrote:

> 1) From the docs I understood that autoproxy feature affects how
> pyro objects are passed 
> (https://pythonhosted.org/Pyro4/servercode.html#autoproxying).
> In the example I have provided at the beginning this post thread, the 
> class attribute has not been registered, so its not a pyro objects. It 
> is being returned and the return value (copy or proxy) is affected by 
> autoproxy setting. Does this mean that if class is registered then all 
> attributes are registered as well?

It's got nothing to do with attributes. The autoproxy feature only triggers when dealing
with an object that you return from your code which is registered on a deamon, thereby
becoming a pyro object.

If the object is not registered, the autoproxy feature will not do anything.

If you see other behavior, post some runnable example code that exhibits the issue.


> 2) In my speficif case, the autoproxy ON is ok, but in some specific 
> cases I would like to receive a copy instead of proxy object. Could be 
> autoproxy behaviour altered for specific call or what is the suggested 
> way to get a copy?

Return the data itself rather than a Pyro object.
Either by getting the data out of the Pyro object or not using a Pyro object in the
first place as a return value from a remote method.


Irmen


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