#36637 closed Bug (invalid)

Django 5.0.2 and psycopg3

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 (last modified by marcosng716)

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:

Code highlighting:

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 (2)

comment:1 by marcosng716, 81 minutes ago

Description: modified (diff)

comment:2 by Jacob Walls, 71 minutes ago

Resolution: invalid
Status: newclosed

Hello,

This report seems better suited to be a support request. The best place to get answers to your issue is using any of the user support channels from this link.

Since the goal of this issue tracker is to track issues about Django itself, and your issue seems, at first, to be located in your custom code, I'll be closing this ticket as invalid following the ticket triaging process. If, after debugging, you find out that this is indeed a bug in Django, please re-open with the specific details and please be sure to include a small Django project to reproduce or a failing test case.

Thank you!

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