Skip to content

Commit 3616b7a

Browse files
committed
Update to Django 6.0
1 parent 8f1c0aa commit 3616b7a

File tree

10 files changed

+31
-13
lines changed

10 files changed

+31
-13
lines changed

.evergreen/run-tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
set -eux
44

55
# Install django-mongodb-backend
6-
/opt/python/3.10/bin/python3 -m venv venv
6+
/opt/python/3.12/bin/python3 -m venv venv
77
. venv/bin/activate
88
python -m pip install -U pip
99
pip install -e .
1010

1111
# Install django and test dependencies
12-
git clone --branch mongodb-5.2.x https://github.com/mongodb-forks/django django_repo
12+
git clone --branch mongodb-6.0.x https://github.com/mongodb-forks/django django_repo
1313
pushd django_repo/tests/
1414
pip install -e ..
1515
pip install -r requirements/py3.txt

.github/workflows/linters.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
persist-credentials: false
1818
- uses: actions/setup-python@v6
1919
with:
20-
python-version: '3.10'
20+
python-version: '3.12'
2121
cache: 'pip'
2222
cache-dependency-path: 'pyproject.toml'
2323
- name: Install Python dependencies
@@ -39,7 +39,7 @@ jobs:
3939
with:
4040
cache: 'pip'
4141
cache-dependency-path: 'pyproject.toml'
42-
python-version: '3.10'
42+
python-version: '3.12'
4343
- name: Install dependencies
4444
run: |
4545
pip install -U pip

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: actions/checkout@v5
3434
with:
3535
repository: 'mongodb-forks/django'
36-
ref: 'mongodb-5.2.x'
36+
ref: 'mongodb-6.0.x'
3737
path: 'django_repo'
3838
persist-credentials: false
3939
- name: Install system packages for Django's Python test dependencies

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
uses: actions/checkout@v5
3535
with:
3636
repository: 'mongodb-forks/django'
37-
ref: 'mongodb-5.2.x'
37+
ref: 'mongodb-6.0.x'
3838
path: 'django_repo'
3939
persist-credentials: false
4040
- name: Install system packages for Django's Python test dependencies

.github/workflows/test-python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
uses: actions/checkout@v5
3434
with:
3535
repository: 'mongodb-forks/django'
36-
ref: 'mongodb-5.2.x'
36+
ref: 'mongodb-6.0.x'
3737
path: 'django_repo'
3838
persist-credentials: false
3939
- name: Install system packages for Django's Python test dependencies

.readthedocs.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ python:
2121
- docs
2222

2323
build:
24-
os: ubuntu-22.04
24+
os: ubuntu-24.04
2525
tools:
26-
python: "3.11"
26+
python: "3.12"

django_mongodb_backend/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "5.2.2.dev0"
1+
__version__ = "6.0.0b0.dev0"
22

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

django_mongodb_backend/features.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,18 @@ class DatabaseFeatures(GISFeatures, BaseDatabaseFeatures):
9999
"model_fields.test_jsonfield.TestSaveLoad.test_bulk_update_custom_get_prep_value",
100100
# To debug: https://github.com/mongodb/django-mongodb-backend/issues/362
101101
"constraints.tests.UniqueConstraintTests.test_validate_case_when",
102+
# StringAgg is not supported.
103+
"aggregation.tests.AggregateTestCase.test_distinct_on_stringagg",
104+
"aggregation.tests.AggregateTestCase.test_string_agg_escapes_delimiter",
105+
"aggregation.tests.AggregateTestCase.test_string_agg_filter",
106+
"aggregation.tests.AggregateTestCase.test_string_agg_filter_in_subquery",
107+
"aggregation.tests.AggregateTestCase.test_stringagg_default_value",
108+
# bulk_create() population of _order not implemented.
109+
# https://github.com/django/django/commit/953095d1e603fe0f8f01175b1409ca23818dcff9
110+
"contenttypes_tests.test_order_with_respect_to.OrderWithRespectToGFKTests.test_bulk_create_allows_duplicate_order_values",
111+
"contenttypes_tests.test_order_with_respect_to.OrderWithRespectToGFKTests.test_bulk_create_mixed_scenario",
112+
"contenttypes_tests.test_order_with_respect_to.OrderWithRespectToGFKTests.test_bulk_create_respects_mixed_manual_order",
113+
"contenttypes_tests.test_order_with_respect_to.OrderWithRespectToGFKTests.test_bulk_create_with_existing_children",
102114
}
103115
# $bitAnd, #bitOr, and $bitXor are new in MongoDB 6.3.
104116
_django_test_expected_failures_bitwise = {
@@ -139,6 +151,7 @@ def django_test_expected_failures(self):
139151
"validation.test_unique.PerformUniqueChecksTest.test_unique_db_default",
140152
},
141153
"Insert expressions aren't supported.": {
154+
"basic.tests.ModelTest.test_save_expressions",
142155
"bulk_create.tests.BulkCreateTests.test_bulk_insert_now",
143156
"bulk_create.tests.BulkCreateTests.test_bulk_insert_expressions",
144157
"expressions.tests.BasicExpressionsTests.test_new_object_create",
@@ -201,6 +214,7 @@ def django_test_expected_failures(self):
201214
"prefetch_related.tests.LookupOrderingTest.test_order",
202215
"prefetch_related.tests.MultiDbTests.test_using_is_honored_m2m",
203216
"prefetch_related.tests.MultiTableInheritanceTest",
217+
"prefetch_related.tests.PrefetchRelatedMTICacheTests",
204218
"prefetch_related.tests.PrefetchRelatedTests",
205219
"prefetch_related.tests.ReadPrefetchedObjectsCacheTests",
206220
"prefetch_related.tests.Ticket21410Tests",
@@ -563,6 +577,7 @@ def django_test_expected_failures(self):
563577
"Custom lookups are not supported.": {
564578
"custom_lookups.tests.BilateralTransformTests",
565579
"custom_lookups.tests.LookupTests.test_basic_lookup",
580+
"custom_lookups.tests.LookupTests.test_custom_lookup_with_subquery",
566581
"custom_lookups.tests.LookupTests.test_custom_name_lookup",
567582
"custom_lookups.tests.LookupTests.test_div3_extract",
568583
"custom_lookups.tests.SubqueryTransformTests.test_subquery_usage",
@@ -580,6 +595,9 @@ def django_test_expected_failures(self):
580595
"test_utils.tests.DisallowedDatabaseQueriesTests.test_disallowed_database_queries",
581596
"test_utils.tests.DisallowedDatabaseQueriesTests.test_disallowed_thread_database_connection",
582597
},
598+
"search lookup not supported on non-Atlas.": {
599+
"expressions.tests.BasicExpressionsTests.test_lookups_subquery",
600+
},
583601
}
584602

585603
@cached_property

django_mongodb_backend/gis/operations.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def gis_operators(self):
4040
"FromWKT",
4141
"GeoHash",
4242
"GeometryDistance",
43+
"GeometryType",
4344
"Intersection",
4445
"IsEmpty",
4546
"IsValid",
@@ -52,6 +53,7 @@ def gis_operators(self):
5253
"Perimeter",
5354
"PointOnSurface",
5455
"Reverse",
56+
"Rotate",
5557
"Scale",
5658
"SnapToGrid",
5759
"SymDifference",

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dynamic = ["version", "dependencies"]
88
description = "Django MongoDB Backend"
99
readme = "README.md"
1010
license = {file="LICENSE"}
11-
requires-python = ">=3.10"
11+
requires-python = ">=3.12"
1212
authors = [
1313
{ name = "The MongoDB Python Team" },
1414
]
@@ -27,8 +27,6 @@ classifiers = [
2727
"Operating System :: OS Independent",
2828
"Programming Language :: Python :: 3",
2929
"Programming Language :: Python :: 3 :: Only",
30-
"Programming Language :: Python :: 3.10",
31-
"Programming Language :: Python :: 3.11",
3230
"Programming Language :: Python :: 3.12",
3331
"Programming Language :: Python :: 3.13",
3432
]

0 commit comments

Comments
 (0)