Opened 5 hours ago

Last modified 4 hours ago

#36637 closed Bug

Django 5.0.2 and psycopg3 — at Initial Version

Reported by: marcosng716 Owned by:
Component: Uncategorized Version: 5.0
Severity: Normal Keywords: psycopg, postgres
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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/

Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top