altairbow / django-db-connection-pool

Database connection pool component library for Django
https://pypi.python.org/pypi/django-db-connection-pool/
MIT License
181 stars 24 forks source link

Does not detects psycopg[binary]. Tries to install psycopg2[binary]. #58

Open arnab-trameter opened 5 months ago

arnab-trameter commented 5 months ago

Describe the bug I have moved from psycopg2[binary] to psycopg[binary] (Version 3.1.17 - Successor to psycopg2). But this package doesn't detects that. It has a fixed requirement of psycopg2 and therefore the installation fails.

django's backend Switch to django's backend (django.db.backends.xxx), does the problem reproduce? Can't test that as the installation fails.

Environment

Traceback Post traceback here. If you prefer to avoid building psycopg2 from source, please install the PyPI err: 'psycopg2-binary' package instead. Screenshot 2024-01-26 at 9 02 41 AM

Optional: SQL and parameters Post SQL and parameters here, Pay attention to hiding private information. N/A

altairbow commented 2 months ago

This problem should have been fixed in PR54

frobert commented 2 months ago

Same issue here..

stevejalim commented 2 days ago

To clarify, even though the code change in https://github.com/altairbow/django-db-connection-pool/pull/54 supports looking for pyscopg (v3) before falling back to psyopg2, if you specify django-db-connection-pool[postgresql] in your requiremetns, pip still wants to install pyscopg2 even if psycopg==3.* is also present in your requirements.txt file

However, if you spec django-db-connection-pool[psycopg3] then pip won't try to to install psycopg2 and will go for psycopg==3.* instead

cc @frobert