Skip to content

dvarrazzo/django-psycopg3-backend

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

A Django backend for PostgreSQL using Psycopg > 2

The backend passes the entire Django test suite, but it needs a few modifications to Django and to its test suite. These changes will be proposed to the Django project in a series of merge requests. A writeup explains the changes in more details.

The modifications required (targeting the main branch at the time of writing) are available in the psycopg3-4.1 Django branch. This is the list of changes.

Approximative instructions

Create and activate a virtualenv any way you like:

python3 -m venv .venv
source .venv/bin/activate

Install Django, from a branch supporting Psycopg 3. Clone the repos to get the test suite too. Example:

git clone -b psycopg3-4.1 https://github.com/dvarrazzo/django.git
pip install -e ./django

Install Psycopg 3 from the master branch:

git clone https://github.com/psycopg/psycopg.git
pip install -e ./psycopg/psycopg

Install the backend (this project):

pip install -e .

Customise the test config module if necessary:

vim configs/test_psycopg3.py
# hack hack
# :wq

Run the django test suite:

python django/tests/runtests.py --settings=configs.test_psycopg3 -v2 --parallel=1 --noinput

A configs.test_psycopg2 module is also available to run the same tests with psycopg2 and check for regressions.

About

A Django backed for PostgreSQL using Psycopg 3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages