#36637: Django 5.0.2 and psycopg3
-----------------------------------+--------------------------------------
     Reporter:  marcosng716        |                    Owner:  (none)
         Type:  Bug                |                   Status:  new
    Component:  Uncategorized      |                  Version:  5.0
     Severity:  Normal             |               Resolution:
     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
-----------------------------------+--------------------------------------
Description changed by marcosng716:

Old 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/

New 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:

 {{{#!div style="font-size: 80%"
 Code highlighting:
   {{{#!python

 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#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/01070199aa767bbd-03f27d65-ae5e-49a7-a97b-3b38f9a1ddae-000000%40eu-central-1.amazonses.com.

Reply via email to