gmr / rabbitpy

A pure python, thread-safe, minimalistic and pythonic RabbitMQ client library
http://rabbitpy.readthedocs.org
BSD 3-Clause "New" or "Revised" License
242 stars 58 forks source link

feat: migrate to new pamqp #127

Open galuszkak opened 3 years ago

galuszkak commented 3 years ago

Hi @gmr ,

This is half way PR. I can't figure out why integration tests are failing. On Python 3.6 and 3.7 they are hanging. In 3.8 there is an exception which I can't figure out.

Any help appreciated.

This is related to #125

galuszkak commented 3 years ago

Travis is available here: https://travis-ci.org/github/gmr/rabbitpy/builds/736674037

galuszkak commented 3 years ago

I dig a little more and this happens when method self.channel.close()

galuszkak commented 3 years ago

OK I fixed problem with channel and connection closing.

Unfortunetly I don't know how to solve problem with sending messages.

I think something weird is happening in pamqp because if message_id is bytes then:

lib/python3.8/site-packages/pamqp/encode.py", line 352, in _string
    raise TypeError('str required, received {}'.format(type(value)))

But if it's a string:

  File "/Users/galuszkak/Projects/rabbitpy/.tox/py38/lib/python3.8/site-packages/pamqp/frame.py", line 101, in _marshal
    return b''.join([
TypeError: sequence item 1: expected a bytes-like object, str found

So I'm not sure why is that, but in any of cases, this just doesn't work. I think it's pamqp bug, but I'm not entirely sure.

@gmr could you help with this?