django-redshift-backend icon indicating copy to clipboard operation
django-redshift-backend copied to clipboard

Add psycopg support (v3) and remove explicit import of optional dep psycopg2

Open fontaineajulien opened this issue 5 months ago • 3 comments

Subject: psycopg2 is an optional dependency but actually imported in base.py

Problem

  • I think psycopg2 was not explicitly imported in 3.0.0 but since 4.0.0 it is imported in base.py

Procedure to reproduce the problem

Install the package without the optional dependency on psycopg2

Error logs / results

Error loading psycopg2 module: No module named 'psycopg2'

Expected results

It would be great to be able to use psycopg (v3) or at least make psycopg2 mandatory

Environment info

  • OS: Linux
  • Python version: Python 3.11.9
  • Django version: Django 4.2
  • Django-Redshift-Backend version: 4.1.1

fontaineajulien avatar Sep 05 '24 08:09 fontaineajulien