A Django backend for PostgreSQL using Psycopg 3

Поиск
Список
Период
Сортировка
От Daniele Varrazzo
Тема A Django backend for PostgreSQL using Psycopg 3
Дата
Msg-id CA+mi_8Y+Q=VG4TdzNgWRA8C0+wcFVWQeKaEBqzjCNu6h78565w@mail.gmail.com
обсуждение исходный текст
Список psycopg
Hello,

I have implemented a backend to enable Django to use PostgreSQL using Psycopg 3.

The backend is currently implemented as an external module [1]
requiring a few modifications to Django [2] to successfully run the
whole Django test suite. Most of the changes are import-related
(breaking the assumption that "psycopg2" is always present if you are
talking to PostgreSQL); a few changes are more interesting, because
they show the difference in the database behaviour moving from
client-side to server-side parameters passing. I have written an
article explaining the changes needed [3] which you might find useful.

[1] https://github.com/dvarrazzo/django-psycopg3-backend
[2] https://github.com/django/django/compare/stable/3.2.x...dvarrazzo:psycopg3-support
[3] https://www.psycopg.org/articles/2021/08/02/psycopg3-django-driver/

The next step, on this front, will be to liaise with the Django
project and understand if there is interest in accepting the changes
(I hope so) and whether the changes need to be adapted to better suit
the Django project. On the Psycopg 3 front, I would say that
supporting the whole Django test suite is a good maturity test of
which I am very happy. I am completing a final review looking for
missing bits (verifying that the tests in the psycopg2 test suite have
an equivalent in Psycopg 3), after which we can release a package with
hopefully the definitive adapter interface.

Thank you very much for your support. I hope that this work will be
useful for everyone.

-- Daniele



В списке psycopg по дате отправления:

Предыдущее
От: Rich Shepard
Дата:
Сообщение: RE: New user questions
Следующее
От: Daniele Varrazzo
Дата:
Сообщение: Psycopg 3 beta 1 released!