django-sql-dashboard icon indicating copy to clipboard operation
django-sql-dashboard copied to clipboard

Update to python3.12, django4.2 and psycopg3

Open radudum10 opened this issue 1 year ago • 0 comments
trafficstars

why

  1. Django 4.2 introduced support for psycopg3 and also a deprecation note: Support for psycopg2 is likely to be deprecated and removed at some point in the future. (https://django.readthedocs.io/en/latest/releases/4.2.html#psycopg-3-support)
  2. Users of django-sql-dashboard trying to update to psycopg3 will get a module not found error caused by the following import in views.py:
from psycopg2.extensions import quote_ident

(which is also unused, I think :smile:)

what this PR aims to improve

  • addopts in pytest.ini: When I ran the tests for the first time (in docker) there was a problem with the import of pytest_use_postgresql so I've modify it.
  • Python version update to 3.12 in Docker.
  • The test packages: Django >= 4.2, psycopg >= 3.0, required python >= 3.8 (check https://www.psycopg.org/psycopg3/docs/basic/install.html#supported-systems).
  • Deleted unused imports from views.py.

Thanks for this repo!

radudum10 avatar Mar 06 '24 14:03 radudum10