From 5d16eb97cc64385b1a00959371dd4f0b3d1efd36 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Thu, 11 Dec 2025 20:48:55 -0500 Subject: [PATCH 1/2] Remove DatabaseFeatures.is_mongodb_6_3 Follow up to ce390e86767bd2a2fefd68d36edf735985a02593. --- django_mongodb_backend/features.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/django_mongodb_backend/features.py b/django_mongodb_backend/features.py index e5f0b2cf2..9f4366775 100644 --- a/django_mongodb_backend/features.py +++ b/django_mongodb_backend/features.py @@ -597,10 +597,6 @@ def django_test_skips(self): skips.update(self._django_test_skips) return skips - @cached_property - def is_mongodb_6_3(self): - return self.connection.get_database_version() >= (6, 3) - @cached_property def supports_atlas_search(self): """Does the server support Atlas search queries and search indexes?""" From 9e3caaf517b2bd3c1fc9050699cbc4bbd3855f74 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Fri, 12 Dec 2025 09:49:50 -0500 Subject: [PATCH 2/2] Remove workaround for MongoDB 6 in DatabaseFeatures.supports_atlas_search Follow up to ce390e86767bd2a2fefd68d36edf735985a02593. --- django_mongodb_backend/features.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/django_mongodb_backend/features.py b/django_mongodb_backend/features.py index 9f4366775..10f206f1c 100644 --- a/django_mongodb_backend/features.py +++ b/django_mongodb_backend/features.py @@ -601,9 +601,7 @@ def django_test_skips(self): def supports_atlas_search(self): """Does the server support Atlas search queries and search indexes?""" try: - # An existing collection must be used on MongoDB 6, otherwise - # the operation will not error when unsupported. - self.connection.get_collection("django_migrations").list_search_indexes() + self.connection.get_collection("__null").list_search_indexes() except OperationFailure: # It would be best to check the error message or error code to # avoid hiding some other exception, but the message/code varies