Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic_consume returns a tuple instead of a consumer_tag #239

Closed
xordoquy opened this issue Jan 14, 2019 · 6 comments · Fixed by #240
Closed

basic_consume returns a tuple instead of a consumer_tag #239

xordoquy opened this issue Jan 14, 2019 · 6 comments · Fixed by #240

Comments

@xordoquy
Copy link

Hi,

Since 2.4, I notice the call to basic_consume without consumer_tag nor nowait now returns a tuple with a consumer_tag instead of the consumer_tag itself as was the case in the previous release.
It is not clear to me whether it's intended or not.

@thedrow
Copy link
Member

thedrow commented Jan 14, 2019

I believe it was intended.
#221

@xordoquy
Copy link
Author

xordoquy commented Jan 14, 2019

I saw that PR but fail to understand whether or not the change in the returned value was intended.
@matusvalo, any idea about ?

edit: I mean, the change in the returned value from basic_consume that is.

@matusvalo
Copy link
Member

@thedrow @xordoquy unfortunately it was not intentional. I missed returning p :-(. There is no need of returning tuple. It is slightly pain with return values in py-amqp because they are often not documented. Of course the fix is easy... I can fix it and update unittests with proper tests if you like.

@thedrow
Copy link
Member

thedrow commented Jan 14, 2019

Please do and I'll release a bug fix version.

@matusvalo
Copy link
Member

Done. I have also added issue for improving API of basic_consume() - #241.

@matusvalo matusvalo changed the title basic_publish returns a tuple instead of a consumer_tag basic_consume returns a tuple instead of a consumer_tag Jan 18, 2019
@pquentin
Copy link
Contributor

@thedrow a bug fix release would be nice! We currently need this workaround in our code:

if isinstance(consumer_tag, tuple):
    consumer_tag = self.consumer_tag[0]

Thank you for your work on py-amqp!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants