diff options
author | Daniele Varrazzo <daniele.varrazzo@gmail.com> | 2022-12-01 20:23:43 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-12-15 06:17:57 +0100 |
commit | 09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca (patch) | |
tree | 15bb8bb049f9339f30d637e78b340473c2038126 /docs/ref/contrib/gis/install | |
parent | d44ee518c4c110af25bebdbedbbf9fba04d197aa (diff) | |
download | django-09ffc5c1212d4ced58b708cbbf3dfbfb77b782ca.tar.gz |
Fixed #33308 -- Added support for psycopg version 3.
Thanks Simon Charette, Tim Graham, and Adam Johnson for reviews.
Co-authored-by: Florian Apolloner <florian@apolloner.eu>
Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
Diffstat (limited to 'docs/ref/contrib/gis/install')
-rw-r--r-- | docs/ref/contrib/gis/install/index.txt | 10 | ||||
-rw-r--r-- | docs/ref/contrib/gis/install/postgis.txt | 11 |
2 files changed, 13 insertions, 8 deletions
diff --git a/docs/ref/contrib/gis/install/index.txt b/docs/ref/contrib/gis/install/index.txt index 51b3235279..026c64ccd1 100644 --- a/docs/ref/contrib/gis/install/index.txt +++ b/docs/ref/contrib/gis/install/index.txt @@ -429,14 +429,14 @@ Install Django and set up database recommended that you create a :doc:`virtual environment <python:tutorial/venv>` for each project you create. -psycopg2 -~~~~~~~~ +psycopg +~~~~~~~ -The ``psycopg2`` Python module provides the interface between Python and the -PostgreSQL database. ``psycopg2`` can be installed via pip within your Python +The ``psycopg`` Python module provides the interface between Python and the +PostgreSQL database. ``psycopg`` can be installed via pip within your Python virtual environment:: - ...\> py -m pip install psycopg2 + ...\> py -m pip install psycopg .. rubric:: Footnotes .. [#] GeoDjango uses the :func:`~ctypes.util.find_library` routine from diff --git a/docs/ref/contrib/gis/install/postgis.txt b/docs/ref/contrib/gis/install/postgis.txt index 0c7d20ae84..e469ede4d0 100644 --- a/docs/ref/contrib/gis/install/postgis.txt +++ b/docs/ref/contrib/gis/install/postgis.txt @@ -7,20 +7,25 @@ into a spatial database. :ref:`geosbuild`, :ref:`proj4` and :ref:`gdalbuild` should be installed prior to building PostGIS. You might also need additional libraries, see `PostGIS requirements`_. -The `psycopg2`_ module is required for use as the database adapter when using -GeoDjango with PostGIS. +The `psycopg`_ or `psycopg2`_ module is required for use as the database +adapter when using GeoDjango with PostGIS. On Debian/Ubuntu, you are advised to install the following packages: ``postgresql-x``, ``postgresql-x-postgis-3``, ``postgresql-server-dev-x``, -and ``python3-psycopg2`` (x matching the PostgreSQL version you want to +and ``python3-psycopg3`` (x matching the PostgreSQL version you want to install). Alternately, you can `build from source`_. Consult the platform-specific instructions if you are on :ref:`macos` or :ref:`windows`. .. _PostGIS: https://postgis.net/ +.. _psycopg: https://www.psycopg.org/psycopg3/ .. _psycopg2: https://www.psycopg.org/ .. _PostGIS requirements: https://postgis.net/docs/postgis_installation.html#install_requirements .. _build from source: https://postgis.net/docs/postgis_installation.html#install_short_version +.. versionchanged:: 4.2 + + Support for ``psycopg`` 3.1+ was added. + Post-installation ================= |