Skip to content

Commit a692f5c

Browse files
committed
INTPYTHON-844 Drop support for MongoDB 6.0
1 parent aa5c931 commit a692f5c

File tree

4 files changed

+10
-27
lines changed

4 files changed

+10
-27
lines changed

.evergreen/config.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,22 +68,22 @@ tasks:
6868
- func: "run unit tests"
6969

7070
buildvariants:
71-
- name: tests-6-noauth-nossl
72-
display_name: Run Tests 6.0 NoAuth NoSSL
71+
- name: tests-7-noauth-nossl
72+
display_name: Run Tests 7.0 NoAuth NoSSL
7373
run_on: rhel87-small
7474
expansions:
75-
MONGODB_VERSION: "6.0"
75+
MONGODB_VERSION: "7.0"
7676
TOPOLOGY: server
7777
AUTH: "noauth"
7878
SSL: "nossl"
7979
tasks:
8080
- name: run-tests
8181

82-
- name: tests-6-auth-ssl
83-
display_name: Run Tests 6.0 Auth SSL
82+
- name: tests-7-auth-ssl
83+
display_name: Run Tests 7.0 Auth SSL
8484
run_on: rhel87-small
8585
expansions:
86-
MONGODB_VERSION: "6.0"
86+
MONGODB_VERSION: "7.0"
8787
TOPOLOGY: server
8888
AUTH: "auth"
8989
SSL: "ssl"

.github/workflows/test-python-geo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
- name: Start MongoDB
5454
uses: supercharge/mongodb-github-action@315db7fe45ac2880b7758f1933e6e5d59afd5e94 # 1.12.1
5555
with:
56-
mongodb-version: 6.0
56+
mongodb-version: 7.0
5757
- name: Run tests
5858
run: python3 django_repo/tests/runtests_.py
5959
permissions:

.github/workflows/test-python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
- name: Start MongoDB
5353
uses: supercharge/mongodb-github-action@315db7fe45ac2880b7758f1933e6e5d59afd5e94 # 1.12.1
5454
with:
55-
mongodb-version: 6.0
55+
mongodb-version: 7.0
5656
- name: Run tests
5757
run: python3 django_repo/tests/runtests_.py
5858
permissions:

django_mongodb_backend/features.py

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class GISFeatures:
1212

1313

1414
class DatabaseFeatures(GISFeatures, BaseDatabaseFeatures):
15-
minimum_database_version = (6, 0)
15+
minimum_database_version = (7, 0)
1616
allow_sliced_subqueries_with_in = False
1717
allows_multiple_constraints_on_same_fields = False
1818
can_create_inline_fk = False
@@ -51,7 +51,7 @@ class DatabaseFeatures(GISFeatures, BaseDatabaseFeatures):
5151
supports_unspecified_pk = True
5252
uses_savepoints = False
5353

54-
_django_test_expected_failures = {
54+
django_test_expected_failures = {
5555
# $concat only supports strings, not int
5656
"db_functions.text.test_concat.ConcatTests.test_concat_non_str",
5757
# QuerySet.order_by() with annotation transform doesn't work:
@@ -100,23 +100,6 @@ class DatabaseFeatures(GISFeatures, BaseDatabaseFeatures):
100100
# To debug: https://github.com/mongodb/django-mongodb-backend/issues/362
101101
"constraints.tests.UniqueConstraintTests.test_validate_case_when",
102102
}
103-
# $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3.
104-
_django_test_expected_failures_bitwise = {
105-
"expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_and",
106-
"expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_or",
107-
"expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor",
108-
"expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor_null",
109-
"expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor_right_null",
110-
"expressions.tests.ExpressionOperatorTests.test_lefthand_transformed_field_bitwise_or",
111-
}
112-
113-
@cached_property
114-
def django_test_expected_failures(self):
115-
expected_failures = super().django_test_expected_failures
116-
expected_failures.update(self._django_test_expected_failures)
117-
if not self.is_mongodb_6_3:
118-
expected_failures.update(self._django_test_expected_failures_bitwise)
119-
return expected_failures
120103

121104
_django_test_skips = {
122105
"Database defaults aren't supported by MongoDB.": {

0 commit comments

Comments
 (0)