From 47eafd139bf5ffafd41cdde40e6645165c92e297 Mon Sep 17 00:00:00 2001 From: Sage Abdullah Date: Sun, 8 Dec 2024 19:06:20 +0000 Subject: [PATCH] Refs #35842 -- Fixed test_lookups_special_chars_double_quotes on SQLite 3.47+. --- django/db/backends/sqlite3/features.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/django/db/backends/sqlite3/features.py b/django/db/backends/sqlite3/features.py index 2a39005f9f..60893561df 100644 --- a/django/db/backends/sqlite3/features.py +++ b/django/db/backends/sqlite3/features.py @@ -50,10 +50,6 @@ class DatabaseFeatures(BaseDatabaseFeatures): # The django_format_dtdelta() function doesn't properly handle mixed # Date/DateTime fields and timedeltas. "expressions.tests.FTimeDeltaTests.test_mixed_comparisons1", - # SQLite doesn't parse escaped double quotes in the JSON path notation, - # so it cannot match keys that contains double quotes (#35842). - "model_fields.test_jsonfield.TestQuerying." - "test_lookups_special_chars_double_quotes", } create_test_table_with_composite_primary_key = """ CREATE TABLE test_table_composite_pk ( @@ -127,6 +123,16 @@ class DatabaseFeatures(BaseDatabaseFeatures): }, } ) + if Database.sqlite_version_info < (3, 47): + skips.update( + { + "SQLite does not parse escaped double quotes in the JSON path " + "notation": { + "model_fields.test_jsonfield.TestQuerying." + "test_lookups_special_chars_double_quotes", + }, + } + ) return skips @cached_property