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

Stop automatically converting the amqp:// prefix to librabbitmq:// + refactored test #1226

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Alireza2n
Copy link

Based on issue #4693 on celery repo, librabbitmq is no longer the recommended package, but the code in kombu does not follow this recommendation.
It's also been discussed in PR #5873.
This PR removes the code where kombu.Connection()'s __init__() method automatically converts the amqp:// prefix to librabbitmq://.
Also test_prefer_librabbitmq_over_amqp_when_available() was rewritten to test_stop_converting_amqp_to_librabbitmq_when_available().

…stop_converting_amqp_to_librabbitmq_when_available(), making sure kombu.Connection() does automatically convert amqp:// prefix to librabbitmq://
Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is flake8 issue to address

@Alireza2n Alireza2n marked this pull request as draft July 25, 2020 06:36
@Alireza2n
Copy link
Author

there is flake8 issue to address

Done. It was caused by an unused import.

@Alireza2n Alireza2n marked this pull request as ready for review July 25, 2020 09:09
Copy link
Member

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AttributeError: <module 'kombu.connection' from '/home/travis/build/celery/kombu/kombu/connection.py'> does not have the attribute 'supports_librabbitmq'

@thedrow
Copy link
Member

thedrow commented Jul 28, 2020

@auvipy We're almost ready for Celery 5.
I think we should keep this for that release since this is a breaking change.

Removing the recommendation is a step in the right direction for Celery 4.x.

@Alireza2n What do you think?

@auvipy
Copy link
Member

auvipy commented Jul 28, 2020

yup removing recommendation could be the first move

@Alireza2n
Copy link
Author

@auvipy We're almost ready for Celery 5.
I think we should keep this for that release since this is a breaking change.

Removing the recommendation is a step in the right direction for Celery 4.x.

@Alireza2n What do you think?

@thedrow Hi!
Use of librabbitmq as an optimization recommendation is already removed from celery documentation.
I'm not sure if this is a breaking change, I'm hoping to get the test and flak8 fixed this weekend.

@thedrow
Copy link
Member

thedrow commented Jul 28, 2020

Why isn't this a breaking change?
If people upgrade and they still use librabbitmq they still expect to use it afterwards.

@Alireza2n
Copy link
Author

Why isn't this a breaking change?
If people upgrade and they still use librabbitmq they still expect to use it afterwards.

Well, the existing code switched automatically to librabbitmq, I've removed this behavior and it seems it does not break anything (at least in automatic tests), users still can manually specify their library I believe.

@thedrow
Copy link
Member

thedrow commented Jul 28, 2020

Yes but it shouldn't switch without a major version bump.

@Alireza2n
Copy link
Author

Yes but it shouldn't switch without a major version bump.

Got it.
I'll try to fix it, then you can decide on release and other details. :)

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 this pull request may close these issues.

3 participants