Closed fontaineajulien closed 3 weeks ago
psycopg2 is an optional dependency but actually imported in base.py It would be great to be able to use psycopg (v3) or at least make psycopg2 mandatory
Yes, it was not good to make psycopg2 imports mandatory. Previously, it was necessary for users to be able to choose between the psycopg2 and psycopg2-binary packages, but now that it is possible to depend only on psycopg2, I would like to make the dependency mandatory. https://www.psycopg.org/docs/install.html#change-in-binary-packages-between-psycopg-2-7-and-2-8
Regarding psycopg3 support, it is not currently possible to adopt it due to the fact that django-redshift-backend depends on the django 4.0 code base ( https://github.com/jazzband/django-redshift-backend/issues/116#issuecomment-2233119734 ).
I have created a pull request to fix this problem. https://github.com/jazzband/django-redshift-backend/pull/150 @fontaineajulien If you have time, I would appreciate it if you could check to see if this will solve the problem.
Looks good to me ! Thanks for the quick response, I hope you can support psycopg 3 soon
Is this still accurate? The 4.0.0 release added Django 4.2 support - https://github.com/jazzband/django-redshift-backend/releases/tag/4.0.0
Regarding psycopg3 support, it is not currently possible to adopt it due to the fact that django-redshift-backend depends on the django 4.0 code base ( https://github.com/jazzband/django-redshift-backend/issues/116#issuecomment-2233119734 ).
Is this still accurate? The 4.0.0 release added Django 4.2 support
Yes. django-redshift-backend contains copy of Django-4.0 code to support django-4.2. https://github.com/jazzband/django-redshift-backend/tree/3697dfe43f1a1162e8e00611fbb0f52a16d80733/django_redshift_backend/_vendor/django40
@fontaineajulien I found that the PR #150 I had you look at before didn't work. I've made a new PR #159, so I'd be happy if you could take a look at it. Thank you.
I will merge and proceed with the release. If there are any problems, please let me know. Thanks!
Subject:
psycopg2
is an optional dependency but actually imported inbase.py
Problem
psycopg2
was not explicitly imported in 3.0.0 but since 4.0.0 it is imported inbase.py
Procedure to reproduce the problem
Install the package without the optional dependency on psycopg2
Error logs / results
Expected results
It would be great to be able to use
psycopg
(v3) or at least makepsycopg2
mandatoryEnvironment info