Skip to content

Commit 47a4115

Browse files
committed
update for Django 6.0
1 parent 63c32ea commit 47a4115

File tree

11 files changed

+25
-31
lines changed

11 files changed

+25
-31
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

CHANGELOG.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
# Changelog
22

3-
## 5.2.1 - Unreleased
3+
## 6.0 - Unreleased
44

5-
- Confirmed support for CockroachDB 25.2.x, 25.3.x, and 25.4.x (no code changes
6-
required).
7-
- Fixed the ``Now`` database function to use the statement time
8-
(``STATEMENT_TIMESTAMP``) rather than the transaction time
9-
(``CURRENT_TIMESTAMP``).
10-
11-
## 5.2 - 2025-04-07
12-
13-
Initial release for Django 5.2.x and CockroachDB 23.2.x, 24.1.x, 24.3.x, and
14-
25.1.x.
5+
Initial release for Django 6.0.x and CockroachDB 24.1.x, 24.3.x, 25.2.x,
6+
25.3.x, and 25.4.x.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ production it is advised to use the package built from sources.
2121
## Install and usage
2222

2323
Use the version of django-cockroachdb that corresponds to your version of
24-
Django. For example, to get the latest compatible release for Django 5.2.x:
24+
Django. For example, to get the latest compatible release for Django 6.0.x:
2525

26-
`pip install django-cockroachdb==5.2.*`
26+
`pip install django-cockroachdb==6.0.*`
2727

2828
The minor release number of Django doesn't correspond to the minor release
2929
number of django-cockroachdb. Use the latest minor release of each.

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({

0 commit comments

Comments
 (0)