Skip to content

Commit 8eca616

Browse files
committed
update to Django 5.1
1 parent 43a3345 commit 8eca616

File tree

4 files changed

+12
-3
lines changed

4 files changed

+12
-3
lines changed

.github/workflows/test-python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
uses: actions/checkout@v4
4848
with:
4949
repository: 'mongodb-forks/django'
50-
ref: 'mongodb-5.0.x'
50+
ref: 'mongodb-5.1.x'
5151
path: 'django_repo'
5252
- name: Install system packages for Django's Python test dependencies
5353
run: |

django_mongodb/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "5.0a0"
1+
__version__ = "5.1a0"
22

33
# Check Django compatibility before other imports which may fail if the
44
# wrong version of Django is installed.

django_mongodb/features.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class DatabaseFeatures(BaseDatabaseFeatures):
7777
"annotations.tests.NonAggregateAnnotationTestCase.test_mti_annotations",
7878
"expressions.test_queryset_values.ValuesExpressionsTests.test_values_list_expression",
7979
"expressions.test_queryset_values.ValuesExpressionsTests.test_values_list_expression_flat",
80-
"expressions.tests.IterableLookupInnerExpressionsTests.test_expressions_in_lookups_join_choice",
80+
"expressions.tests.IterableLookupInnerExpressionsTests.test_expressions_range_lookups_join_choice",
8181
"ordering.tests.OrderingTests.test_order_by_grandparent_fk_with_expression_in_default_ordering",
8282
"ordering.tests.OrderingTests.test_order_by_parent_fk_with_expression_in_default_ordering",
8383
"ordering.tests.OrderingTests.test_order_by_ptr_field_with_default_ordering_by_expression",
@@ -95,6 +95,8 @@ class DatabaseFeatures(BaseDatabaseFeatures):
9595
# QuerySet.explain() not implemented:
9696
# https://github.com/mongodb-labs/django-mongodb/issues/28
9797
"queries.test_explain.ExplainUnsupportedTests.test_message",
98+
# $concat only supports strings, not int
99+
"db_functions.text.test_concat.ConcatTests.test_concat_non_str",
98100
}
99101
# $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3.
100102
_django_test_expected_failures_bitwise = {
@@ -156,6 +158,8 @@ def django_test_expected_failures(self):
156158
"expressions.tests.BasicExpressionsTests.test_object_update_unsaved_objects",
157159
"expressions.tests.BasicExpressionsTests.test_order_of_operations",
158160
"expressions.tests.BasicExpressionsTests.test_parenthesis_priority",
161+
"expressions.tests.BasicExpressionsTests.test_slicing_of_f_expressions_charfield",
162+
"expressions.tests.BasicExpressionsTests.test_slicing_of_f_expressions_textfield",
159163
"expressions.tests.BasicExpressionsTests.test_update",
160164
"expressions.tests.BasicExpressionsTests.test_update_with_fk",
161165
"expressions.tests.BasicExpressionsTests.test_update_with_none",
@@ -279,6 +283,7 @@ def django_test_expected_failures(self):
279283
"expressions.tests.BasicExpressionsTests.test_case_in_filter_if_boolean_output_field",
280284
"expressions.tests.BasicExpressionsTests.test_exists_in_filter",
281285
"expressions.tests.BasicExpressionsTests.test_order_by_exists",
286+
"expressions.tests.BasicExpressionsTests.test_slicing_of_outerref",
282287
"expressions.tests.BasicExpressionsTests.test_subquery",
283288
"expressions.tests.ExistsTests.test_filter_by_empty_exists",
284289
"expressions.tests.ExistsTests.test_negated_empty_exists",
@@ -361,6 +366,7 @@ def django_test_expected_failures(self):
361366
"queries.tests.EmptyQuerySetTests.test_values_subquery",
362367
"queries.tests.ExcludeTests.test_exclude_subquery",
363368
"queries.tests.NullInExcludeTest.test_null_in_exclude_qs",
369+
"queries.tests.Queries1Tests.test_combining_does_not_mutate",
364370
"queries.tests.Queries1Tests.test_ticket9985",
365371
"queries.tests.Queries1Tests.test_ticket9997",
366372
"queries.tests.Queries1Tests.test_ticket10742",
@@ -489,6 +495,7 @@ def django_test_expected_failures(self):
489495
"Test inspects query for SQL": {
490496
"delete.tests.DeletionTests.test_only_referenced_fields_selected",
491497
"lookup.tests.LookupTests.test_in_ignore_none",
498+
"lookup.tests.LookupTests.test_lookup_direct_value_rhs_unwrapped",
492499
"lookup.tests.LookupTests.test_textfield_exact_null",
493500
"queries.tests.ExistsSql.test_exists",
494501
"queries.tests.Queries6Tests.test_col_alias_quoted",

django_mongodb/query_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ def process_lhs(node, compiler, connection):
1111
# node is a Func or Expression, possibly with multiple source expressions.
1212
result = []
1313
for expr in node.get_source_expressions():
14+
if expr is None:
15+
continue
1416
try:
1517
result.append(expr.as_mql(compiler, connection))
1618
except FullResultSet:

0 commit comments

Comments
 (0)