#36637: Django 5.0.2 and psycopg3
-------------------------------------+-------------------------------------
Reporter: marcosng716 | Type: Bug
Status: new | Component:
| Uncategorized
Version: 5.0 | Severity: Normal
Keywords: psycopg, postgres | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
I am running a Django project with Postgres 17. When running tests using
''pytest'' I notice random inestabilities.
Doing some research I found psql17 is not fully supported by psycopg2, so
I tried moving from psycopg2-binary==2.9.9 to psycopg-binary==3.2.1.
Deleted old env, created new one and I get errors everywhere.
Apparently Django still requires psycopg2 internally even tho I am setting
my settings.py file to use psycopg3:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': os.getenv('DB_NAME', 'name'),
'USER': os.getenv('DB_USER', 'user'),
'PASSWORD': os.getenv('DB_PASS', 'pass'),
'HOST': os.getenv('DB_HOST', '127.0.0.1'),
'PORT': '5432'
}
}
---
Am I doing something wrong? Or this doc is tricky?
https://docs.djangoproject.com/en/5.0/ref/databases/
--
Ticket URL: <
https://code.djangoproject.com/ticket/36637>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.