mirror of
https://github.com/django/django.git
synced 2025-04-05 22:16:41 +00:00
Refs #36005 -- Bumped minimum supported versions of 3rd-party packages.
This bumps minimum supported versions of 3rd-party packages to the first releases to support Python 3.12.
This commit is contained in:
parent
8eca4077f6
commit
d9af197801
@ -32,9 +32,9 @@ from .schema import DatabaseSchemaEditor
|
||||
from .validation import DatabaseValidation
|
||||
|
||||
version = Database.version_info
|
||||
if version < (1, 4, 3):
|
||||
if version < (2, 2, 1):
|
||||
raise ImproperlyConfigured(
|
||||
"mysqlclient 1.4.3 or newer is required; you have %s." % Database.__version__
|
||||
"mysqlclient 2.2.1 or newer is required; you have %s." % Database.__version__
|
||||
)
|
||||
|
||||
|
||||
@ -254,12 +254,6 @@ class DatabaseWrapper(BaseDatabaseWrapper):
|
||||
@async_unsafe
|
||||
def get_new_connection(self, conn_params):
|
||||
connection = Database.connect(**conn_params)
|
||||
# bytes encoder in mysqlclient doesn't work and was added only to
|
||||
# prevent KeyErrors in Django < 2.0. We can remove this workaround when
|
||||
# mysqlclient 2.1 becomes the minimal mysqlclient supported by Django.
|
||||
# See https://github.com/PyMySQL/mysqlclient/issues/489
|
||||
if connection.encoders.get(bytes) is bytes:
|
||||
connection.encoders.pop(bytes)
|
||||
return connection
|
||||
|
||||
def init_connection_state(self):
|
||||
|
@ -1,7 +1,7 @@
|
||||
"""
|
||||
PostgreSQL database backend for Django.
|
||||
|
||||
Requires psycopg2 >= 2.8.4 or psycopg >= 3.1.8
|
||||
Requires psycopg2 >= 2.9.9 or psycopg >= 3.1.12
|
||||
"""
|
||||
|
||||
import asyncio
|
||||
@ -34,13 +34,13 @@ def psycopg_version():
|
||||
return get_version_tuple(version)
|
||||
|
||||
|
||||
if psycopg_version() < (2, 8, 4):
|
||||
if psycopg_version() < (2, 9, 9):
|
||||
raise ImproperlyConfigured(
|
||||
f"psycopg2 version 2.8.4 or newer is required; you have {Database.__version__}"
|
||||
f"psycopg2 version 2.9.9 or newer is required; you have {Database.__version__}"
|
||||
)
|
||||
if (3,) <= psycopg_version() < (3, 1, 8):
|
||||
if (3,) <= psycopg_version() < (3, 1, 12):
|
||||
raise ImproperlyConfigured(
|
||||
f"psycopg version 3.1.8 or newer is required; you have {Database.__version__}"
|
||||
f"psycopg version 3.1.12 or newer is required; you have {Database.__version__}"
|
||||
)
|
||||
|
||||
|
||||
|
@ -306,27 +306,27 @@ Running all the tests
|
||||
If you want to run the full suite of tests, you'll need to install a number of
|
||||
dependencies:
|
||||
|
||||
* :pypi:`aiosmtpd`
|
||||
* :pypi:`argon2-cffi` 19.2.0+
|
||||
* :pypi:`aiosmtpd` 1.4.5+
|
||||
* :pypi:`argon2-cffi` 23.1.0+
|
||||
* :pypi:`asgiref` 3.8.1+ (required)
|
||||
* :pypi:`bcrypt`
|
||||
* :pypi:`bcrypt` 4.1.1+
|
||||
* :pypi:`colorama` 0.4.6+
|
||||
* :pypi:`docutils` 0.19+
|
||||
* :pypi:`geoip2`
|
||||
* :pypi:`geoip2` 4.8.0+
|
||||
* :pypi:`Jinja2` 2.11+
|
||||
* :pypi:`numpy`
|
||||
* :pypi:`Pillow` 6.2.1+
|
||||
* :pypi:`PyYAML`
|
||||
* :pypi:`numpy` 1.26.0+
|
||||
* :pypi:`Pillow` 10.1.0+
|
||||
* :pypi:`PyYAML` 6.0.2+
|
||||
* :pypi:`pywatchman`
|
||||
* :pypi:`redis` 3.4+
|
||||
* :pypi:`redis` 5.1.0+
|
||||
* :pypi:`setuptools`
|
||||
* :pypi:`pymemcache`, plus a `supported Python binding
|
||||
<https://memcached.org/>`_
|
||||
* `gettext <https://www.gnu.org/software/gettext/manual/gettext.html>`_
|
||||
(:ref:`gettext_on_windows`)
|
||||
* :pypi:`selenium` 4.8.0+
|
||||
* :pypi:`sqlparse` 0.3.1+ (required)
|
||||
* :pypi:`tblib` 1.5.0+
|
||||
* :pypi:`selenium` 4.23.0+
|
||||
* :pypi:`sqlparse` 0.5.0+ (required)
|
||||
* :pypi:`tblib` 3.0.0+
|
||||
|
||||
You can find these dependencies in `pip requirements files
|
||||
<https://pip.pypa.io/en/latest/user_guide/#requirements-files>`_ inside the
|
||||
|
@ -115,8 +115,8 @@ below for information on how to set up your database correctly.
|
||||
PostgreSQL notes
|
||||
================
|
||||
|
||||
Django supports PostgreSQL 14 and higher. `psycopg`_ 3.1.8+ or `psycopg2`_
|
||||
2.8.4+ is required, though the latest `psycopg`_ 3.1.8+ is recommended.
|
||||
Django supports PostgreSQL 14 and higher. `psycopg`_ 3.1.12+ or `psycopg2`_
|
||||
2.9.9+ is required, though the latest `psycopg`_ 3.1.12+ is recommended.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -486,7 +486,7 @@ Connector/Python includes `its own`_.
|
||||
mysqlclient
|
||||
~~~~~~~~~~~
|
||||
|
||||
Django requires `mysqlclient`_ 1.4.3 or later.
|
||||
Django requires `mysqlclient`_ 2.2.1 or later.
|
||||
|
||||
MySQL Connector/Python
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -235,6 +235,28 @@ backends.
|
||||
|
||||
* ...
|
||||
|
||||
Dropped support for Python < 3.12
|
||||
---------------------------------
|
||||
|
||||
Because Python 3.12 is now the minimum supported version for Django, any
|
||||
optional dependencies must also meet that requirement. The following versions
|
||||
of each library are the first to add or confirm compatibility with Python 3.12:
|
||||
|
||||
* ``aiosmtpd`` 1.4.5
|
||||
* ``argon2-cffi`` 23.1.0
|
||||
* ``bcrypt`` 4.1.1
|
||||
* ``geoip2`` 4.8.0
|
||||
* ``Pillow`` 10.1.0
|
||||
* ``mysqlclient`` 2.2.1
|
||||
* ``numpy`` 1.26.0
|
||||
* ``PyYAML`` 6.0.2
|
||||
* ``psycopg`` 3.1.12
|
||||
* ``psycopg2`` 2.9.9
|
||||
* ``redis-py`` 5.1.0
|
||||
* ``selenium`` 4.23.0
|
||||
* ``sqlparse`` 0.5.0
|
||||
* ``tblib`` 3.0.0
|
||||
|
||||
Miscellaneous
|
||||
-------------
|
||||
|
||||
|
@ -815,7 +815,7 @@ anything. The :pypi:`aiosmtpd` package provides a way to accomplish this:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
python -m pip install aiosmtpd
|
||||
python -m pip install "aiosmtpd >= 1.4.5"
|
||||
|
||||
python -m aiosmtpd -n -l localhost:8025
|
||||
|
||||
|
@ -1022,7 +1022,7 @@ First of all, you need to install the :pypi:`selenium` package:
|
||||
|
||||
.. console::
|
||||
|
||||
$ python -m pip install "selenium >= 4.8.0"
|
||||
$ python -m pip install "selenium >= 4.23.0"
|
||||
|
||||
Then, add a ``LiveServerTestCase``-based test to your app's tests module
|
||||
(for example: ``myapp/tests.py``). For this example, we'll assume you're using
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
requires-python = ">= 3.12"
|
||||
dependencies = [
|
||||
"asgiref>=3.8.1",
|
||||
"sqlparse>=0.3.1",
|
||||
"sqlparse>=0.5.0",
|
||||
"tzdata; sys_platform == 'win32'",
|
||||
]
|
||||
authors = [
|
||||
@ -37,8 +37,8 @@ classifiers = [
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
argon2 = ["argon2-cffi>=19.1.0"]
|
||||
bcrypt = ["bcrypt"]
|
||||
argon2 = ["argon2-cffi>=23.1.0"]
|
||||
bcrypt = ["bcrypt>=4.1.1"]
|
||||
|
||||
[project.scripts]
|
||||
django-admin = "django.core.management:execute_from_command_line"
|
||||
|
@ -1 +1 @@
|
||||
mysqlclient >= 1.4.3
|
||||
mysqlclient >= 2.2.1
|
||||
|
@ -1,3 +1,2 @@
|
||||
psycopg>=3.1.14; implementation_name == 'pypy'
|
||||
psycopg[binary]>=3.1.8; implementation_name != 'pypy'
|
||||
psycopg[binary]>=3.1.12
|
||||
psycopg-pool>=3.2.0
|
||||
|
@ -1,21 +1,21 @@
|
||||
aiosmtpd
|
||||
aiosmtpd >= 1.4.5
|
||||
asgiref >= 3.8.1
|
||||
argon2-cffi >= 19.2.0
|
||||
bcrypt
|
||||
black
|
||||
argon2-cffi >= 23.1.0
|
||||
bcrypt >= 4.1.1
|
||||
black >= 2.4.10
|
||||
docutils >= 0.19
|
||||
geoip2
|
||||
geoip2 >= 4.8.0
|
||||
jinja2 >= 2.11.0
|
||||
numpy; python_version < '3.14'
|
||||
Pillow >= 6.2.1; sys.platform != 'win32' or python_version < '3.14'
|
||||
numpy >= 1.26.0; python_version < '3.14'
|
||||
Pillow >= 10.1.0; sys.platform != 'win32' or python_version < '3.14'
|
||||
# pylibmc/libmemcached can't be built on Windows.
|
||||
pylibmc; sys_platform != 'win32'
|
||||
pymemcache >= 3.4.0
|
||||
pywatchman; sys_platform != 'win32'
|
||||
PyYAML
|
||||
redis >= 3.4.0
|
||||
selenium >= 4.8.0
|
||||
sqlparse >= 0.3.1
|
||||
tblib >= 1.5.0
|
||||
PyYAML >= 6.0.2
|
||||
redis >= 5.1.0
|
||||
selenium >= 4.23.0
|
||||
sqlparse >= 0.5.0
|
||||
tblib >= 3.0.0
|
||||
tzdata
|
||||
colorama >= 0.4.6; sys_platform == 'win32'
|
||||
|
Loading…
x
Reference in New Issue
Block a user