django-sql-dashboard
django-sql-dashboard copied to clipboard
Update to python3.12, django4.2 and psycopg3
trafficstars
why
- 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) - Users of
django-sql-dashboardtrying to update to psycopg3 will get a module not found error caused by the following import inviews.py:
from psycopg2.extensions import quote_ident
(which is also unused, I think :smile:)
what this PR aims to improve
addoptsinpytest.ini: When I ran the tests for the first time (in docker) there was a problem with the import ofpytest_use_postgresqlso 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.