|
1 | 1 | from django.db.backends.base.features import BaseDatabaseFeatures
|
2 |
| -from django.utils.functional import cached_property |
3 | 2 |
|
4 | 3 |
|
5 | 4 | class DatabaseFeatures(BaseDatabaseFeatures):
|
6 |
| - minimum_database_version = (6, 0) |
| 5 | + minimum_database_version = (7, 0) |
7 | 6 | allow_sliced_subqueries_with_in = False
|
8 | 7 | allows_multiple_constraints_on_same_fields = False
|
9 | 8 | can_create_inline_fk = False
|
@@ -39,7 +38,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
39 | 38 | supports_unspecified_pk = True
|
40 | 39 | uses_savepoints = False
|
41 | 40 |
|
42 |
| - _django_test_expected_failures = { |
| 41 | + django_test_expected_failures = { |
43 | 42 | # $concat only supports strings, not int
|
44 | 43 | "db_functions.text.test_concat.ConcatTests.test_concat_non_str",
|
45 | 44 | # QuerySet.order_by() with annotation transform doesn't work:
|
@@ -89,23 +88,6 @@ class DatabaseFeatures(BaseDatabaseFeatures):
|
89 | 88 | # https://jira.mongodb.org/browse/SERVER-99186
|
90 | 89 | "model_fields_.test_arrayfield.QueryingTests.test_contained_by_subquery",
|
91 | 90 | }
|
92 |
| - # $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3. |
93 |
| - _django_test_expected_failures_bitwise = { |
94 |
| - "expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_and", |
95 |
| - "expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_or", |
96 |
| - "expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor", |
97 |
| - "expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor_null", |
98 |
| - "expressions.tests.ExpressionOperatorTests.test_lefthand_bitwise_xor_right_null", |
99 |
| - "expressions.tests.ExpressionOperatorTests.test_lefthand_transformed_field_bitwise_or", |
100 |
| - } |
101 |
| - |
102 |
| - @cached_property |
103 |
| - def django_test_expected_failures(self): |
104 |
| - expected_failures = super().django_test_expected_failures |
105 |
| - expected_failures.update(self._django_test_expected_failures) |
106 |
| - if not self.is_mongodb_6_3: |
107 |
| - expected_failures.update(self._django_test_expected_failures_bitwise) |
108 |
| - return expected_failures |
109 | 91 |
|
110 | 92 | django_test_skips = {
|
111 | 93 | "Database defaults aren't supported by MongoDB.": {
|
@@ -607,7 +589,3 @@ def django_test_expected_failures(self):
|
607 | 589 | "custom_lookups.tests.SubqueryTransformTests.test_subquery_usage",
|
608 | 590 | },
|
609 | 591 | }
|
610 |
| - |
611 |
| - @cached_property |
612 |
| - def is_mongodb_6_3(self): |
613 |
| - return self.connection.get_database_version() >= (6, 3) |
0 commit comments