irmen / Pyrolite

Java and .NET client interface for Pyro5 protocol
MIT License
177 stars 47 forks source link

support Serpent serialization #1

Closed irmen closed 11 years ago

irmen commented 11 years ago

Pyrolite can only deal with pickle... Support Serpent as well. (optional dependency?)

tarelli commented 11 years ago

This seems to explain why I am getting this error

Matteos-MacBook-Pro:Development matteocantarelli$ python -Wignore -m Pyro4.naming
Not starting broadcast server for localhost.
NS running on localhost:9090 (127.0.0.1)
URI = PYRO:Pyro.NameServer@localhost:9090
Exception in thread Pyro-Worker-4493396560 :
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/Library/Python/2.7/site-packages/Pyro4/tpjobqueue.py", line 62, in run
    self.job()
  File "/Library/Python/2.7/site-packages/Pyro4/socketserver/threadpoolserver.py", line 32, in __call__
    self.daemon.handleRequest(self.csock)
  File "/Library/Python/2.7/site-packages/Pyro4/core.py", line 781, in handleRequest
    msgType, flags, seq, data = MessageFactory.getMessage(conn, MessageFactory.MSG_INVOKE)
  File "/Library/Python/2.7/site-packages/Pyro4/core.py", line 587, in getMessage
    msgType, flags, seq, datalen, datahmac = cls.parseMessageHeader(headerdata)
  File "/Library/Python/2.7/site-packages/Pyro4/core.py", line 579, in parseMessageHeader
    raise errors.ProtocolError("invalid data or unsupported protocol version")
ProtocolError: invalid data or unsupported protocol version

Any timeline for when 45 will be supported by pyrolite?

tarelli commented 11 years ago

Looks like it is possible to run Pyro using pickle until this is implemented but I don't find the argument to pass to do so...

irmen commented 11 years ago

You tell Pyro what serializer to use by setting the SERIALIZER config item. Set it to 'pickle' to switch back to pickle. (see http://pythonhosted.org/Pyro4/config.html) Alternatively, use Pyro <= 4.19 if you're using Pyrolite, until this issue is fixed

irmen commented 11 years ago

This is going to be implemented for protocol level 46 (pyro 4.22+) only. Also, this requires Pyrolite to be updated from a 3.5 to a .NET 4.0 assembly because Serpent is that as well.

irmen commented 11 years ago

has been implemented in release 2.0