ebin123456 / py-amqplib

Automatically exported from code.google.com/p/py-amqplib
GNU Lesser General Public License v2.1
0 stars 0 forks source link

Message object are not pickable #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Which version of amqplib are you using?

0.6.1

Have you checked to see if there is a newer version in the "Featured
Downloads" section of the front page of this project?

yes

Which broker are you using (RabbitMQ?) which version?

rabbitmq 1.7.1

Which version of Python?

2.5.4

What steps will reproduce the problem?

>>> import amqplib.client_0_8 as amqp
>>> import cPickle
>>> msg = amqp.Message("hello")
>>> cPickle.loads(cPickle.dumps(msg))

What is the expected output? What do you see instead?

  File "build/bdist.macosx-10.5-
i386/egg/amqplib/client_0_8/serialization.py", line 447, in __getattr__
RuntimeError: maximum recursion depth exceeded

Please provide any additional information below.

In GenericContent.__getattr__ check for __setstate__

        if name == '__setstate__':
            raise AttributeError('__setstate__ not found')

Original issue reported on code.google.com by Paolo.Losi on 23 Feb 2010 at 3:20

GoogleCodeExporter commented 9 years ago
Thanks, fixed in revision 071fb36881f2

Original comment by barry.pe...@gmail.com on 28 Mar 2011 at 9:23