summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2024-04-28 18:22:21 +0200
committerSarah Boyce <42296566+sarahboyce@users.noreply.github.com>2024-04-29 11:07:54 +0200
commit85c154da2f07485a1cdc4d886eee4c1a1ef56137 (patch)
tree7a48c231dc0656ec35e41d52909e8a267a80af99
parent8c257cecffc314179a5375ab8a16ca0ff3b6fb16 (diff)
Fixed #35412 -- Dropped support for SQLite < 3.31.
-rw-r--r--django/db/backends/sqlite3/features.py15
-rw-r--r--docs/ref/contrib/gis/install/index.txt2
-rw-r--r--docs/ref/databases.txt2
-rw-r--r--docs/releases/5.1.txt2
-rw-r--r--tests/backends/sqlite/tests.py4
5 files changed, 12 insertions, 13 deletions
diff --git a/django/db/backends/sqlite3/features.py b/django/db/backends/sqlite3/features.py
index d95c6fb2d1..502d8546e3 100644
--- a/django/db/backends/sqlite3/features.py
+++ b/django/db/backends/sqlite3/features.py
@@ -9,7 +9,7 @@ from .base import Database
class DatabaseFeatures(BaseDatabaseFeatures):
- minimum_database_version = (3, 27)
+ minimum_database_version = (3, 31)
test_db_allows_multiple_connections = False
supports_unspecified_pk = True
supports_timezones = False
@@ -31,18 +31,15 @@ class DatabaseFeatures(BaseDatabaseFeatures):
supports_parentheses_in_compound = False
can_defer_constraint_checks = True
supports_over_clause = True
- supports_frame_range_fixed_distance = Database.sqlite_version_info >= (3, 28, 0)
- supports_frame_exclusion = Database.sqlite_version_info >= (3, 28, 0)
- supports_aggregate_filter_clause = Database.sqlite_version_info >= (3, 30, 1)
- supports_order_by_nulls_modifier = Database.sqlite_version_info >= (3, 30, 0)
- # NULLS LAST/FIRST emulation on < 3.30 requires subquery wrapping.
- requires_compound_order_by_subquery = Database.sqlite_version_info < (3, 30)
+ supports_frame_range_fixed_distance = True
+ supports_frame_exclusion = True
+ supports_aggregate_filter_clause = True
order_by_nulls_first = True
supports_json_field_contains = False
supports_update_conflicts = True
supports_update_conflicts_with_target = True
- supports_stored_generated_columns = Database.sqlite_version_info >= (3, 31, 0)
- supports_virtual_generated_columns = Database.sqlite_version_info >= (3, 31, 0)
+ supports_stored_generated_columns = True
+ supports_virtual_generated_columns = True
test_collations = {
"ci": "nocase",
"cs": "binary",
diff --git a/docs/ref/contrib/gis/install/index.txt b/docs/ref/contrib/gis/install/index.txt
index 3f948a81d4..7706790b2a 100644
--- a/docs/ref/contrib/gis/install/index.txt
+++ b/docs/ref/contrib/gis/install/index.txt
@@ -59,7 +59,7 @@ Database Library Requirements Supported Versions Notes
PostgreSQL GEOS, GDAL, PROJ, PostGIS 13+ Requires PostGIS.
MySQL GEOS, GDAL 8.0.11+ :ref:`Limited functionality <mysql-spatial-limitations>`.
Oracle GEOS, GDAL 19+ XE not supported.
-SQLite GEOS, GDAL, PROJ, SpatiaLite 3.27.0+ Requires SpatiaLite 4.3+
+SQLite GEOS, GDAL, PROJ, SpatiaLite 3.31.0+ Requires SpatiaLite 4.3+
================== ============================== ================== =========================================
See also `this comparison matrix`__ on the OSGeo Wiki for
diff --git a/docs/ref/databases.txt b/docs/ref/databases.txt
index acebfdf348..c8e9f2ebff 100644
--- a/docs/ref/databases.txt
+++ b/docs/ref/databases.txt
@@ -812,7 +812,7 @@ appropriate typecasting.
SQLite notes
============
-Django supports SQLite 3.27.0 and later.
+Django supports SQLite 3.31.0 and later.
SQLite_ provides an excellent development alternative for applications that
are predominantly read-only or require a smaller installation footprint. As
diff --git a/docs/releases/5.1.txt b/docs/releases/5.1.txt
index a07f8942a5..b461524c70 100644
--- a/docs/releases/5.1.txt
+++ b/docs/releases/5.1.txt
@@ -419,6 +419,8 @@ Miscellaneous
* The undocumented ``django.urls.converters.get_converter()`` function is
removed.
+* The minimum supported version of SQLite is increased from 3.27.0 to 3.31.0.
+
.. _deprecated-features-5.1:
Features deprecated in 5.1
diff --git a/tests/backends/sqlite/tests.py b/tests/backends/sqlite/tests.py
index 109d210e54..fafc0b182f 100644
--- a/tests/backends/sqlite/tests.py
+++ b/tests/backends/sqlite/tests.py
@@ -109,9 +109,9 @@ class Tests(TestCase):
connections["default"].close()
self.assertTrue(os.path.isfile(os.path.join(tmp, "test.db")))
- @mock.patch.object(connection, "get_database_version", return_value=(3, 26))
+ @mock.patch.object(connection, "get_database_version", return_value=(3, 30))
def test_check_database_version_supported(self, mocked_get_database_version):
- msg = "SQLite 3.27 or later is required (found 3.26)."
+ msg = "SQLite 3.31 or later is required (found 3.30)."
with self.assertRaisesMessage(NotSupportedError, msg):
connection.check_database_version_supported()
self.assertTrue(mocked_get_database_version.called)