summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-17 05:21:53 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-17 08:24:08 +0100
commitc8a76059ff6ff37fb51972fe2ba8b9d9464af769 (patch)
treee0de6f4defceb4f6082d747d6ea5623708aebb36
parent0fbdb9784da915fce5dcc1fe82bac9b4785749e5 (diff)
downloaddjango-c8a76059ff6ff37fb51972fe2ba8b9d9464af769.tar.gz
Refs #34255 -- Bumped required psycopg version to 3.1.8.
-rw-r--r--django/db/backends/postgresql/base.py6
-rw-r--r--docs/ref/contrib/gis/install/postgis.txt2
-rw-r--r--docs/ref/databases.txt6
-rw-r--r--docs/releases/4.2.txt2
-rw-r--r--tests/requirements/postgres.txt2
5 files changed, 9 insertions, 9 deletions
diff --git a/django/db/backends/postgresql/base.py b/django/db/backends/postgresql/base.py
index 17a3c7a377..34a98e9e3a 100644
--- a/django/db/backends/postgresql/base.py
+++ b/django/db/backends/postgresql/base.py
@@ -1,7 +1,7 @@
"""
PostgreSQL database backend for Django.
-Requires psycopg2 >= 2.8.4 or psycopg >= 3.1
+Requires psycopg2 >= 2.8.4 or psycopg >= 3.1.8
"""
import asyncio
@@ -38,9 +38,9 @@ if psycopg_version() < (2, 8, 4):
raise ImproperlyConfigured(
f"psycopg2 version 2.8.4 or newer is required; you have {Database.__version__}"
)
-if (3,) <= psycopg_version() < (3, 1):
+if (3,) <= psycopg_version() < (3, 1, 8):
raise ImproperlyConfigured(
- f"psycopg version 3.1 or newer is required; you have {Database.__version__}"
+ f"psycopg version 3.1.8 or newer is required; you have {Database.__version__}"
)
diff --git a/docs/ref/contrib/gis/install/postgis.txt b/docs/ref/contrib/gis/install/postgis.txt
index e469ede4d0..6859dce7de 100644
--- a/docs/ref/contrib/gis/install/postgis.txt
+++ b/docs/ref/contrib/gis/install/postgis.txt
@@ -24,7 +24,7 @@ platform-specific instructions if you are on :ref:`macos` or :ref:`windows`.
.. versionchanged:: 4.2
- Support for ``psycopg`` 3.1+ was added.
+ Support for ``psycopg`` 3.1.8+ was added.
Post-installation
=================
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt
index 860d550232..2dbf71562f 100644
--- a/docs/ref/databases.txt
+++ b/docs/ref/databases.txt
@@ -114,8 +114,8 @@ below for information on how to set up your database correctly.
PostgreSQL notes
================
-Django supports PostgreSQL 12 and higher. `psycopg`_ 3.1+ or `psycopg2`_ 2.8.4+
-is required, though the latest `psycopg`_ 3.1+ is recommended.
+Django supports PostgreSQL 12 and higher. `psycopg`_ 3.1.8+ or `psycopg2`_
+2.8.4+ is required, though the latest `psycopg`_ 3.1.8+ is recommended.
.. _psycopg: https://www.psycopg.org/psycopg3/
.. _psycopg2: https://www.psycopg.org/
@@ -127,7 +127,7 @@ is required, though the latest `psycopg`_ 3.1+ is recommended.
.. versionchanged:: 4.2
- Support for ``psycopg`` 3.1+ was added.
+ Support for ``psycopg`` 3.1.8+ was added.
.. _postgresql-connection-settings:
diff --git a/docs/releases/4.2.txt b/docs/releases/4.2.txt
index 91684301a5..83bdedfc75 100644
--- a/docs/releases/4.2.txt
+++ b/docs/releases/4.2.txt
@@ -29,7 +29,7 @@ What's new in Django 4.2
Psycopg 3 support
-----------------
-Django now supports `psycopg`_ version 3.1 or higher. To update your code,
+Django now supports `psycopg`_ version 3.1.8 or higher. To update your code,
install the `psycopg library`_, you don't need to change the
:setting:`ENGINE <DATABASE-ENGINE>` as ``django.db.backends.postgresql``
supports both libraries.
diff --git a/tests/requirements/postgres.txt b/tests/requirements/postgres.txt
index 726a08b3e4..da00729319 100644
--- a/tests/requirements/postgres.txt
+++ b/tests/requirements/postgres.txt
@@ -1 +1 @@
-psycopg[binary]>=3.1
+psycopg[binary]>=3.1.8