From f0eed48efe77529a837279583c34e9185f64339c Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Sat, 12 Apr 2025 20:10:12 -0400 Subject: [PATCH] INTPYTHON-844 Drop support for MongoDB 6.0 --- .evergreen/config.yml | 12 ++++++------ .github/workflows/test-python-geo.yml | 2 +- .github/workflows/test-python.yml | 2 +- django_mongodb_backend/features.py | 13 +------------ 4 files changed, 9 insertions(+), 20 deletions(-) diff --git a/.evergreen/config.yml b/.evergreen/config.yml index d59bfe079..40046f4a8 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -68,22 +68,22 @@ tasks: - func: "run unit tests" buildvariants: - - name: tests-6-noauth-nossl - display_name: Run Tests 6.0 NoAuth NoSSL + - name: tests-7-noauth-nossl + display_name: Run Tests 7.0 NoAuth NoSSL run_on: rhel87-small expansions: - MONGODB_VERSION: "6.0" + MONGODB_VERSION: "7.0" TOPOLOGY: server AUTH: "noauth" SSL: "nossl" tasks: - name: run-tests - - name: tests-6-auth-ssl - display_name: Run Tests 6.0 Auth SSL + - name: tests-7-auth-ssl + display_name: Run Tests 7.0 Auth SSL run_on: rhel87-small expansions: - MONGODB_VERSION: "6.0" + MONGODB_VERSION: "7.0" TOPOLOGY: server AUTH: "auth" SSL: "ssl" diff --git a/.github/workflows/test-python-geo.yml b/.github/workflows/test-python-geo.yml index 2b18ec867..7d45e3499 100644 --- a/.github/workflows/test-python-geo.yml +++ b/.github/workflows/test-python-geo.yml @@ -53,7 +53,7 @@ jobs: - name: Start MongoDB uses: supercharge/mongodb-github-action@315db7fe45ac2880b7758f1933e6e5d59afd5e94 # 1.12.1 with: - mongodb-version: 6.0 + mongodb-version: 7.0 - name: Run tests run: python3 django_repo/tests/runtests_.py permissions: diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml index 47d7c523e..655f49e56 100644 --- a/.github/workflows/test-python.yml +++ b/.github/workflows/test-python.yml @@ -52,7 +52,7 @@ jobs: - name: Start MongoDB uses: supercharge/mongodb-github-action@315db7fe45ac2880b7758f1933e6e5d59afd5e94 # 1.12.1 with: - mongodb-version: 6.0 + mongodb-version: 7.0 - name: Run tests run: python3 django_repo/tests/runtests_.py permissions: diff --git a/django_mongodb_backend/features.py b/django_mongodb_backend/features.py index 18a048bf6..ae698358f 100644 --- a/django_mongodb_backend/features.py +++ b/django_mongodb_backend/features.py @@ -12,7 +12,7 @@ class GISFeatures: class DatabaseFeatures(GISFeatures, BaseDatabaseFeatures): - minimum_database_version = (6, 0) + minimum_database_version = (7, 0) allow_sliced_subqueries_with_in = False allows_multiple_constraints_on_same_fields = False can_create_inline_fk = False @@ -100,22 +100,11 @@ class DatabaseFeatures(GISFeatures, BaseDatabaseFeatures): # To debug: https://github.com/mongodb/django-mongodb-backend/issues/362 "constraints.tests.UniqueConstraintTests.test_validate_case_when", } - # $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3. - _django_test_expected_failures_bitwise = { - "expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_and", - "expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_or", - "expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor", - "expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor_null", - "expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor_right_null", - "expressions.tests.ExpressionOperatorTests.test_lefthand_transformed_field_bitwise_or", - } @cached_property def django_test_expected_failures(self): expected_failures = super().django_test_expected_failures expected_failures.update(self._django_test_expected_failures) - if not self.is_mongodb_6_3: - expected_failures.update(self._django_test_expected_failures_bitwise) return expected_failures _django_test_skips = {