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

Remove hard dependency on psycopg2 #292

Merged
merged 1 commit into from Mar 4, 2022

Conversation

intgr
Copy link
Contributor

@intgr intgr commented Mar 1, 2022

One would reasonably expect django-celery-results to work with other databases without installing psycopg2.

The hard dependency was added in PR #290, probably unintentional without fully understanding this aspect.

One would reasonably expect django-celery-results to work with other databases without installing psycopg2.

The hard dependency was added in commit 28fb1c6, probably unintentional without fully understanding this aspect.
@intgr
Copy link
Contributor Author

intgr commented Mar 2, 2022

As a work-around, I have added psycopg2-binary dependency to my project, so it's not a big deal.

@auvipy
Copy link
Member

auvipy commented Mar 2, 2022

As a work-around, I have added psycopg2-binary dependency to my project, so it's not a big deal.

can we add that to this package as well in this PR?

@abdelwahebmoalla
Copy link

when is this going to be merged and relased ?

@intgr
Copy link
Contributor Author

intgr commented Mar 3, 2022

can we add that to this package as well in this PR?

This PR intends to make the dependency optional.

IMO seems a bit odd if a database-agnostic Django app has a dependency on one particular database driver.

If there's a need to add MariaDB or Oracle driver-specific logic, will this project also add a dependency for their respective drivers?

@auvipy
Copy link
Member

auvipy commented Mar 3, 2022

then the dependency should be removed from requirement as well?

@intgr
Copy link
Contributor Author

intgr commented Mar 3, 2022

Maybe my PR title was a little misleading. psycopg2 is not currently a declared dependency of the package. So django-celery-results fails with an ImportError, it does not install the psycopg2 package. There's nothing to remove.

(The dependency is only in requirements/test.txt, that one should be kept I assume)

@auvipy
Copy link
Member

auvipy commented Mar 4, 2022

what confuses me is the test failures with https://github.com/celery/django-celery-results/pull/294/files

@auvipy auvipy merged commit 5f507c8 into celery:master Mar 4, 2022
@saemideluxe
Copy link

Thanks for fixing this. I just encountered the issue after an upgrade. Any chance that there will soon be a new pip release including the fix?

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.

None yet

4 participants