diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index 429e78e1..4d3a5590 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.12' - run: python -m pip install flake8 - name: flake8 uses: liskin/gh-problem-matcher-wrap@v2 @@ -33,7 +33,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.12' - run: python -m pip install isort - name: isort uses: liskin/gh-problem-matcher-wrap@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 447e7461..655d3eb8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,11 +29,6 @@ jobs: fail-fast: false matrix: include: - - crdb-version: v23.2.21 - - crdb-version: v23.2.21 - use_psycopg2: psycopg2 - - crdb-version: v23.2.21 - use_server_side_binding: server_side_binding - crdb-version: v24.1.14 - crdb-version: v24.1.14 use_psycopg2: psycopg2 @@ -64,7 +59,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-python@v4 with: - python-version: '3.10' + python-version: '3.12' - name: Install system packages for Django's Python test dependencies run: | sudo apt-get update diff --git a/django-test-suite/build.sh b/django-test-suite/build.sh index 08cff7ac..16360d74 100755 --- a/django-test-suite/build.sh +++ b/django-test-suite/build.sh @@ -7,7 +7,7 @@ VERSION=$1 # clone django into the repo. rm -rf _django_repo -git clone --depth 1 --single-branch --branch cockroach-5.2.x https://github.com/timgraham/django _django_repo +git clone --depth 1 --single-branch --branch cockroach-6.0.x https://github.com/timgraham/django _django_repo # install the django requirements. cd _django_repo/tests/ diff --git a/django_cockroachdb/__init__.py b/django_cockroachdb/__init__.py index 1afef5b6..2802ff87 100644 --- a/django_cockroachdb/__init__.py +++ b/django_cockroachdb/__init__.py @@ -1,4 +1,4 @@ -__version__ = '5.2' +__version__ = '6.0a0' # Check Django compatibility before other imports which may fail if the # wrong version of Django is installed. diff --git a/django_cockroachdb/features.py b/django_cockroachdb/features.py index b2121f55..1ffdeb32 100644 --- a/django_cockroachdb/features.py +++ b/django_cockroachdb/features.py @@ -5,7 +5,7 @@ class DatabaseFeatures(PostgresDatabaseFeatures): - minimum_database_version = (23, 2) + minimum_database_version = (24, 1) # Cloning databases doesn't speed up tests. # https://github.com/cockroachdb/django-cockroachdb/issues/206 @@ -75,10 +75,6 @@ def introspected_field_types(self): 'virtual': None, } - @cached_property - def is_cockroachdb_24_1(self): - return self.connection.cockroachdb_version >= (24, 1) - @cached_property def is_cockroachdb_24_3(self): return self.connection.cockroachdb_version >= (24, 3) @@ -169,7 +165,6 @@ def django_test_expected_failures(self): 'bulk_create.tests.BulkCreateTests.test_bulk_insert_nullable_fields', 'many_to_one.tests.ManyToOneTests.test_add_remove_set_by_pk_raises', 'many_to_one.tests.ManyToOneTests.test_fk_to_smallautofield', - 'many_to_one.tests.ManyToOneTests.test_get_prefetch_queryset_reverse_warning', 'many_to_one.tests.ManyToOneTests.test_get_prefetch_querysets_reverse_invalid_querysets_length', 'migrations.test_operations.OperationTests.test_smallfield_autofield_foreignfield_growth', 'migrations.test_operations.OperationTests.test_smallfield_bigautofield_foreignfield_growth', @@ -185,6 +180,10 @@ def django_test_expected_failures(self): # new primary key in same transaction 'schema.tests.SchemaTests.test_add_auto_field', 'schema.tests.SchemaTests.test_autofield_to_o2o', + # USING cast required: https://github.com/cockroachdb/cockroach/issues/82416#issuecomment-2029803229 + 'schema.tests.SchemaTests.test_alter_text_field_to_date_field', + 'schema.tests.SchemaTests.test_alter_text_field_to_datetime_field', + 'schema.tests.SchemaTests.test_alter_text_field_to_time_field', # incompatible COALESCE expressions: unsupported binary operator: # * (desired ): # https://github.com/cockroachdb/cockroach/issues/73587 @@ -205,13 +204,8 @@ def django_test_expected_failures(self): 'migrations.test_operations.OperationTests.test_add_generated_field', # concat(): unknown signature: concat(string, int2) (desired ) 'db_functions.text.test_concat.ConcatTests.test_concat_non_str', - }) - if self.is_cockroachdb_24_1: - # USING cast required: https://github.com/cockroachdb/cockroach/issues/82416#issuecomment-2029803229 - expected_failures.update({ - 'schema.tests.SchemaTests.test_alter_text_field_to_date_field', - 'schema.tests.SchemaTests.test_alter_text_field_to_datetime_field', - 'schema.tests.SchemaTests.test_alter_text_field_to_time_field', + # unknown signature: concat(timestamptz, string) + "aggregation.tests.AggregateTestCase.test_string_agg_order_by", }) if self.is_cockroachdb_25_1: expected_failures.update({ @@ -238,9 +232,7 @@ def django_test_expected_failures(self): 'expressions_case.tests.CaseExpressionTests.test_annotate_with_aggregation_in_predicate', 'expressions_case.tests.CaseExpressionTests.test_annotate_with_annotation_in_condition', 'expressions_case.tests.CaseExpressionTests.test_annotate_with_annotation_in_predicate', - 'expressions_case.tests.CaseExpressionTests.test_annotate_with_empty_when', 'expressions_case.tests.CaseExpressionTests.test_annotate_with_expression_as_condition', - 'expressions_case.tests.CaseExpressionTests.test_annotate_with_full_when', 'expressions_case.tests.CaseExpressionTests.test_annotate_with_join_in_condition', 'expressions_case.tests.CaseExpressionTests.test_annotate_with_join_in_predicate', 'expressions_case.tests.CaseExpressionTests.test_case_reuse', @@ -251,6 +243,7 @@ def django_test_expected_failures(self): 'lookup.tests.LookupQueryingTests.test_conditional_expression', 'ordering.tests.OrderingTests.test_order_by_constant_value', 'queries.test_bulk_update.BulkUpdateNoteTests.test_batch_size', + 'queries.test_bulk_update.BulkUpdateNoteTests.test_max_batch_size', 'queries.test_bulk_update.BulkUpdateNoteTests.test_multiple_fields', 'queries.test_bulk_update.BulkUpdateNoteTests.test_simple', 'queries.test_bulk_update.BulkUpdateTests.test_custom_pk', @@ -275,6 +268,8 @@ def django_test_expected_failures(self): # incompatible COALESCE expressions: unsupported binary # operator: / (desired ) 'aggregation.tests.AggregateTestCase.test_aggregation_default_passed_another_aggregate', + # could not parse "@" as type timestamptz: parsing as type timestamp: empty or blank input + "aggregation.tests.AggregateTestCase.test_string_agg_order_by", }) if self.is_cockroachdb_24_3: expected_failures.update({ diff --git a/setup.cfg b/setup.cfg index 99f64662..20f6f406 100644 --- a/setup.cfg +++ b/setup.cfg @@ -16,8 +16,6 @@ classifiers = Operating System :: OS Independent Programming Language :: Python Programming Language :: Python :: 3 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 Programming Language :: Python :: 3.12 Programming Language :: Python :: 3.13 project_urls = @@ -28,7 +26,7 @@ project_urls = python_requires = >=3.10 packages = find: install_requires = - django >= 5.2, < 6.0 +# django >= 6.0, < 6.1 [flake8] max-line-length = 119