Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#35190 closed Bug (duplicate)

django with postgresql is incompatible with pypy

Reported by: Владимир Owned by: nobody
Component: Core (Other) Version: dev
Severity: Normal Keywords: pypy postgresql
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

When using django 4.2 and higher with pypy, it is impossible to use postgresql. Versions below require psycopg2cffi, and perfectly work with it, but once I switched to django.4.2, I faced following exception:

File "/opt/pypy/lib/pypy3.10/site-packages/django/db/backends/postgresql/base.py", line 47, in <module>

from .psycopg_any import IsolationLevel, is_psycopg3 # NOQA isort:skip

File "/opt/pypy/lib/pypy3.10/site-packages/django/db/backends/postgresql/psycopg_any.py", line 77, in <module>

from psycopg2 import errors, extensions, sql # NOQA

Change History (3)

comment:1 by Владимир, 5 months ago

Type: UncategorizedBug

comment:2 by Natalia Bidart, 5 months ago

Component: Database layer (models, ORM)Core (Other)
Resolution: invalid
Status: newclosed
Version: 4.2dev

Hello Владимир, thank you for your report.

Support for Django using PyPy3.10 was confirmed when #34986 was fixed. See scheduled tests runs showing passing runs for latest Django, Postgresql and PyPy3.10:

https://github.com/django/django/actions/runs/7881024587/job/21503974819

...
2024-02-13T02:44:21.6498968Z Complete job name: Ubuntu, PostgreSQL, PyPy3.10
...
2024-02-13T02:44:26.5855397Z Status: Downloaded newer image for postgres:13-alpine
2024-02-13T02:44:26.5869670Z docker.io/library/postgres:13-alpine
2024-02-13T02:44:26.5970128Z ##[command]/usr/bin/docker create --name 9705ff7849d54424b276eb457c41eb91_postgres13alpine_c2c9a3 --label 149869 --network github_network_aef26d97bf734bdd832322cc2f43c1d6 --network-alias postgres -p 5432:5432 --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 -e "POSTGRES_DB=django" -e "POSTGRES_USER=user" -e "POSTGRES_PASSWORD=postgres" -e GITHUB_ACTIONS=true -e CI=true postgres:13-alpine
...
2024-02-13T02:44:41.0532390Z postgres service is healthy.
...
2024-02-13T02:59:31.9557002Z ----------------------------------------------------------------------
2024-02-13T02:59:31.9557502Z Ran 16838 tests in 577.079s
2024-02-13T02:59:31.9557727Z 
2024-02-13T02:59:31.9557854Z OK (skipped=594, expected failures=7)
...

I'll be closing this issue as invalid, but if you are still having problems after trying latest Django and PyPy3.10, you can reach out to any of the user support channels from this link.

comment:3 by Mariusz Felisiak, 5 months ago

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