Browse Source

Refs #34255 -- Bumped required psycopg version to 3.1.8.

Mariusz Felisiak 2 years ago
parent
commit
c8a76059ff

+ 3 - 3
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__}"
     )
 
 

+ 1 - 1
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
 =================

+ 3 - 3
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:
 

+ 1 - 1
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.

+ 1 - 1
tests/requirements/postgres.txt

@@ -1 +1 @@
-psycopg[binary]>=3.1
+psycopg[binary]>=3.1.8