Plamen Dimitrov | 4 Jul 21:06 2014

Serializing attributes and indexing

Hi Irmen,

Thank you for your last reply - it was all I needed to know about 
customer serialization and the good practice of relying on the automatic 
serialization of the proxy objects themselves.

I wanted to ask you about another thing - serializing object attributes 
and possibly indexing. I have problems serializing cases like

1) params = Pyro4.Proxy("some-uri-here")
      params["some_present_key"]

resulting in an error of the kind "TypeError: 'Proxy' object is 
unsubscriptable".

It might be an edge case so I was also wondering about a far simple case 
when I need to access a simple attribute/field of a remote object:

2) firefox = Pyro4.Proxy("PYRONAME:firefox")
      print firefox.download_location

where the download location is a simple string of the kind

firefox.download_location = "C:\\"

I was thinking about relying on a get() method in the first case 
(params.get("some_present_key")) and properties in the second. Do you 
think there is a more natural solution to this that requires less 
modification of an already existing code?

(Continue reading)

Mayavimmer | 30 Jun 21:25 2014
Picon

Pyro4 Shelve Unicode error

Hi Pyro-core list,

I get an unicode error while reading a shelve object on my recent Rosa 
Linux. The shelve object was working correctly before being Pyroized. I 
read somewhere that old Shelve versions had unicode problems, but that 
was 4-5 years ago. Here is the the last part of the stack trace:

...
   File 
"/usr/lib/python2.7/site-packages/Pyro4-4.25-py2.7.egg/Pyro4/core.py", 
line 163, in __call__
     return self.__send(self.__name, args, kwargs)
   File 
"/usr/lib/python2.7/site-packages/Pyro4-4.25-py2.7.egg/Pyro4/core.py", 
line 327, in _pyroInvoke
     raise data
TypeError: String or Integer object expected for key, unicode found

Mayavimmer

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
Irmen de Jong | 26 Jun 23:19 2014
Picon

Pyro 4.26 released!


Hi,

Pyro 4.26 has just been released!

Get it from Pypi:  http://pypi.python.org/pypi/Pyro4/
Or straight from Github:  https://github.com/irmen/Pyro4
Documentation: http://pythonhosted.org/Pyro4/index.html

Overview of new stuff in this version:

introduced PICKLE_PROTOCOL_VERSION config item
fixed exception handling when dealing with different major Python versions. Using
serpent or json now also properly translates exception objects even if the major
Python version differ
because of the new way Pyro deals with serialized exceptions, the wire protocol
version was updated to 47. You?ll have to update all Pyro4 libraries to 4.26
name server prints a warning if a protocol error occurs (this helps to spot issues
such as serializer protocol mismatches)
more info in documentation about pickle and numpy
improved documentation index

Have fun!

Irmen de Jong
Irmen de Jong | 26 Jun 23:18 2014
Picon

Pyrolite 3.1 released (pyro 4.26 compatibility)


Hi,

I've released a new version (3.1) of Pyrolite, the native-Java and .Net library to
interface with Pyro and Python/pickle.

It got the wire protocol version bumped to that of the latest Pyro release (4.26).

Pyrolite can only speak Pyro wire protocol v47, which is used by Pyro 4.26 and
newer. This Pyrolite release can not be used with older Pyro versions.
Note that the Serpent serializer is used by default, and you will need to include
Serpent version 1.5 or newer in your project for that. You can configure Pyrolite to
use pickle instead though, in which case you don't have to include the Serpent library
in your project.

Get it at: https://github.com/irmen/Pyrolite
Binaries at: http://irmen.home.xs4all.nl/pyrolite/

Have fun,

Irmen de Jong
Plamen Dimitrov | 14 Jun 20:57 2014

Cannot return object copies (autoproxy off)

Hi Irmen,

First off let me say how amazing your Pyro4 is! Achieving such little 
modification of the existing code makes it possible to distribute many 
complex cases, the documentation is great and really informative, and 
the functionality is of course over the top of my expectations. Now 
about the problem I encountered which might be pretty straightforward 
but at least it didn't seem so from the documentation:

I followed the most basic example to register an object and according to 
the documentation if I turn off the autoproxy option (of course it would 
be better on, but I cannot modify the original code I am trying to 
distribute over the network), I should receive a copy of the remotely 
constructed object. However, all I get is

ProtocolError: unsupported serialized class: ...

which is not really true because I have already remotely accessed 
different instances of the same class (!). In a more illustrative example:

I want to share an instance of Dog where remotely calling its method 
bark(), I get back an instance of Sound. I have registered the Dog 
instance and when I call bark(), I get the above error. In a different 
case I have remotely called a method of Sound and had no troubles 
serializing the Sound instance and accessing it remotely. Do you have 
any ideas what am I doing wrong? In the case of AUTOPROXY=True I would 
expect the remotely generated Sound instance and without it I was hoping 
for at least a copy. However, I got the above error (I get the same 
error on far simpler classes with no methods at all like Exception 
subclasses).
(Continue reading)

hjxwho | 29 May 17:21 2014
Picon

Prevent a method from being called

Hello,
Is it possible there is a way to prevent an existing method from being called because this method is only avaliable to the server?
Thank you,
Klaus
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Pyro-core mailing list
Pyro-core@...
https://lists.sourceforge.net/lists/listinfo/pyro-core
hjxwho | 15 May 17:23 2014
Picon

NAT configuration

Hi all,
Does someone have tried to use Pyro4 under NAT? I use vituralbox to set up a server, and the Network setting is NAT. Also, i specific the port forwarding.
Then, in the code, I did this

daemon = Pyro4.Daemon(port=8888,nathost="140.182.27.137", natport=8889)

After this, 
I tried to call this remote on my host computer by using the uri provided by the server.
However, I received 

Pyro4.errors.ConnectionClosedError: receiving: not enough data 

It seems like the server did not receive any data from the client. I checked the port 8889, and it says it’s listening.
Is there any other configuration I need to do ?

Thank you,
Klaus
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Pyro-core mailing list
Pyro-core@...
https://lists.sourceforge.net/lists/listinfo/pyro-core
hjxwho | 16 Apr 09:48 2014
Picon

[Error 111] connection refused

Hi all,
When I tried to test Pyro4 on two separated vitural machines, I got this error:

cannot connect: [Error 111] Connection Refused

My two machines are using the NAT Network. They can ping each other and I also tried a little socket demo to ensure they can talk to each other. Also, I closed both firewalls. 

Can someone give me some advice? I really appreciate that!

Dante
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Pyro-core mailing list
Pyro-core@...
https://lists.sourceforge.net/lists/listinfo/pyro-core
hjxwho | 15 Apr 04:48 2014
Picon

How to make my service public

Hi all,
I know this is a silly question but can someone tell how to make my service public?
I tried to make the name server public and did it in the following way:
1. use ifconfig to find the address
2. then, run the python -m Pyro4.naming -n 10.0.2.15

I tired to ping this server on another virtual machine, and it failed to locate the server.

Can anyone tell me what I should do to make it correct?
Thank you!
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Pyro-core mailing list
Pyro-core@...
https://lists.sourceforge.net/lists/listinfo/pyro-core
Irmen de Jong | 12 Apr 01:17 2014
Picon

Pyro 4.25 released!


Hi,

Pyro 4.25 has just been released!

Get it from Pypi:  http://pypi.python.org/pypi/Pyro4/
Or straight from Github:  https://github.com/irmen/Pyro4
Documentation: http://pythonhosted.org/Pyro4/index.html

Overview of new stuff in this version:

now also puts package name in serpent serialization data for custom class instances
(previously only the class name was used)
requires serpent 1.5 or newer (because of the feature above)
support for (Linux) abstract namespace AF_UNIX sockets (with a 0-byte at the start
of the name)
register_dict_to_class method added on SerializerBase, to be able to deserialize to
particular user defined classes
docs: mention that you may have to install serpent manually (most notably with
alternative Python implementations)
docs: mention the serialization hooks on SerializerBase
added ser_custom example that shows how to use the serialization hooks

Have fun!

Irmen de Jong
madhuri | 10 Mar 05:43 2014
Picon

High Availability of Pyro Servers

Hi All,

I have installed pyro on my machine and able to interact with remote objects
on different machine.

But I have a question regarding availability of Pyro servers. 
For eg. If I have multiple pyro servers(one running as master server at a
time and others as slave servers), is there any way in pyro to invoke slave
servers to run as master in case of any failures?

Thanks, in advance!!

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech

Gmane