Skip to content

Commit 5c66981

Browse files
committed
update for Django 6.0
1 parent a1de2c4 commit 5c66981

File tree

9 files changed

+18
-16
lines changed

9 files changed

+18
-16
lines changed

.github/workflows/linters.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up Python
1818
uses: actions/setup-python@v4
1919
with:
20-
python-version: '3.10'
20+
python-version: '3.12'
2121
- run: python -m pip install flake8
2222
- name: flake8
2323
uses: liskin/gh-problem-matcher-wrap@v2
@@ -33,7 +33,7 @@ jobs:
3333
- name: Set up Python
3434
uses: actions/setup-python@v4
3535
with:
36-
python-version: '3.10'
36+
python-version: '3.12'
3737
- run: python -m pip install isort
3838
- name: isort
3939
uses: liskin/gh-problem-matcher-wrap@v2

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- uses: actions/checkout@v4
6565
- uses: actions/setup-python@v4
6666
with:
67-
python-version: '3.10'
67+
python-version: '3.12'
6868
- name: Install system packages for Django's Python test dependencies
6969
run: |
7070
sudo apt-get update

django-test-suite/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ VERSION=$1
77

88
# clone django into the repo.
99
rm -rf _django_repo
10-
git clone --depth 1 --single-branch --branch cockroach-5.2.x https://github.com/timgraham/django _django_repo
10+
git clone --depth 1 --single-branch --branch cockroach-6.0.x https://github.com/timgraham/django _django_repo
1111

1212
# install the django requirements.
1313
cd _django_repo/tests/

django-test-suite/cockroach_gis_settings.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
from cockroach_settings import (
2-
DATABASES, DEFAULT_AUTO_FIELD, PASSWORD_HASHERS, SECRET_KEY, USE_TZ,
3-
)
1+
from cockroach_settings import DATABASES, PASSWORD_HASHERS, SECRET_KEY, USE_TZ
42

53
__all__ = [
6-
'DATABASES', 'DEFAULT_AUTO_FIELD', 'PASSWORD_HASHERS', 'SECRET_KEY',
4+
'DATABASES',
5+
'PASSWORD_HASHERS',
6+
'SECRET_KEY',
77
'USE_TZ',
88
]
99

django-test-suite/cockroach_settings.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
DATABASES['default']['OPTIONS']['server_side_binding'] = True
2525
DATABASES['other']['OPTIONS']['server_side_binding'] = True
2626

27-
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
2827
SECRET_KEY = 'django_tests_secret_key'
2928
PASSWORD_HASHERS = [
3029
'django.contrib.auth.hashers.MD5PasswordHasher',

django_cockroachdb/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = '5.2'
1+
__version__ = '6.0a0'
22

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

django_cockroachdb/features.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ def django_test_expected_failures(self):
169169
'bulk_create.tests.BulkCreateTests.test_bulk_insert_nullable_fields',
170170
'many_to_one.tests.ManyToOneTests.test_add_remove_set_by_pk_raises',
171171
'many_to_one.tests.ManyToOneTests.test_fk_to_smallautofield',
172-
'many_to_one.tests.ManyToOneTests.test_get_prefetch_queryset_reverse_warning',
173172
'many_to_one.tests.ManyToOneTests.test_get_prefetch_querysets_reverse_invalid_querysets_length',
174173
'migrations.test_operations.OperationTests.test_smallfield_autofield_foreignfield_growth',
175174
'migrations.test_operations.OperationTests.test_smallfield_bigautofield_foreignfield_growth',
@@ -209,6 +208,8 @@ def django_test_expected_failures(self):
209208
'migrations.test_operations.OperationTests.test_add_generated_field',
210209
# concat(): unknown signature: concat(string, int2) (desired <string>)
211210
'db_functions.text.test_concat.ConcatTests.test_concat_non_str',
211+
# unknown signature: concat(timestamptz, string)
212+
"aggregation.tests.AggregateTestCase.test_string_agg_order_by",
212213
})
213214
if self.is_cockroachdb_25_1:
214215
expected_failures.update({
@@ -235,9 +236,7 @@ def django_test_expected_failures(self):
235236
'expressions_case.tests.CaseExpressionTests.test_annotate_with_aggregation_in_predicate',
236237
'expressions_case.tests.CaseExpressionTests.test_annotate_with_annotation_in_condition',
237238
'expressions_case.tests.CaseExpressionTests.test_annotate_with_annotation_in_predicate',
238-
'expressions_case.tests.CaseExpressionTests.test_annotate_with_empty_when',
239239
'expressions_case.tests.CaseExpressionTests.test_annotate_with_expression_as_condition',
240-
'expressions_case.tests.CaseExpressionTests.test_annotate_with_full_when',
241240
'expressions_case.tests.CaseExpressionTests.test_annotate_with_join_in_condition',
242241
'expressions_case.tests.CaseExpressionTests.test_annotate_with_join_in_predicate',
243242
'expressions_case.tests.CaseExpressionTests.test_case_reuse',
@@ -248,6 +247,7 @@ def django_test_expected_failures(self):
248247
'lookup.tests.LookupQueryingTests.test_conditional_expression',
249248
'ordering.tests.OrderingTests.test_order_by_constant_value',
250249
'queries.test_bulk_update.BulkUpdateNoteTests.test_batch_size',
250+
'queries.test_bulk_update.BulkUpdateNoteTests.test_max_batch_size',
251251
'queries.test_bulk_update.BulkUpdateNoteTests.test_multiple_fields',
252252
'queries.test_bulk_update.BulkUpdateNoteTests.test_simple',
253253
'queries.test_bulk_update.BulkUpdateTests.test_custom_pk',
@@ -272,6 +272,8 @@ def django_test_expected_failures(self):
272272
# incompatible COALESCE expressions: unsupported binary
273273
# operator: <decimal> / <float> (desired <decimal>)
274274
'aggregation.tests.AggregateTestCase.test_aggregation_default_passed_another_aggregate',
275+
# could not parse "@" as type timestamptz: parsing as type timestamp: empty or blank input
276+
"aggregation.tests.AggregateTestCase.test_string_agg_order_by",
275277
})
276278
if self.is_cockroachdb_24_3:
277279
expected_failures.update({

django_cockroachdb_gis/features.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ def django_test_expected_failures(self):
7070
# 3D opclass not present on CockroachDB:
7171
# https://github.com/cockroachdb/cockroach/issues/47420#issuecomment-969578772
7272
'gis_tests.gis_migrations.test_operations.OperationTests.test_add_3d_field_opclass',
73+
# GeometryType output value has incorrect casing:
74+
# https://github.com/cockroachdb/cockroach/issues/152593
75+
"gis_tests.geoapp.test_functions.GISFunctionsTests.test_geometry_type",
7376
})
7477
if self.uses_server_side_binding:
7578
expected_failures.update({

setup.cfg

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ classifiers =
1616
Operating System :: OS Independent
1717
Programming Language :: Python
1818
Programming Language :: Python :: 3
19-
Programming Language :: Python :: 3.10
20-
Programming Language :: Python :: 3.11
2119
Programming Language :: Python :: 3.12
2220
Programming Language :: Python :: 3.13
2321
project_urls =
@@ -28,7 +26,7 @@ project_urls =
2826
python_requires = >=3.10
2927
packages = find:
3028
install_requires =
31-
django >= 5.2, < 6.0
29+
# django >= 6.0, < 6.1
3230

3331
[flake8]
3432
max-line-length = 119

0 commit comments

Comments
 (0)