From 757f471b39e11e9cd9d485c3ad5ab63d3269a6cd Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Tue, 31 Dec 2024 10:25:19 -0500 Subject: [PATCH] dec 31 --- django_cockroachdb/features.py | 5 +++++ django_cockroachdb_gis/features.py | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/django_cockroachdb/features.py b/django_cockroachdb/features.py index 8a03ffe..9dc3bba 100644 --- a/django_cockroachdb/features.py +++ b/django_cockroachdb/features.py @@ -146,6 +146,10 @@ def django_test_expected_failures(self): 'schema.tests.SchemaTests.test_text_field_with_db_index_to_fk', # CockroachDB doesn't support dropping the primary key. 'schema.tests.SchemaTests.test_alter_int_pk_to_int_unique', + # unimplemented: primary key dropped without subsequent addition of + # new primary key in same transaction + # https://github.com/cockroachdb/cockroach/issues/48026 + 'migrations.test_operations.OperationTests.test_composite_pk_operations', # CockroachDB doesn't support changing the primary key of table. # psycopg.errors.InvalidColumnReference: column "id" is referenced # by the primary key @@ -207,6 +211,7 @@ def django_test_expected_failures(self): # https://github.com/cockroachdb/cockroach/issues/91396 'backends.tests.EscapingChecks.test_parameter_escaping', 'backends.tests.EscapingChecksDebug.test_parameter_escaping', + 'composite_pk.test_update.CompositePKUpdateTests.test_bulk_update_comments', 'constraints.tests.CheckConstraintTests.test_database_default', 'expressions.tests.BasicExpressionsTests.test_annotate_values_filter', 'expressions_case.tests.CaseDocumentationExamples.test_lookup_example', diff --git a/django_cockroachdb_gis/features.py b/django_cockroachdb_gis/features.py index 42fdeb4..8a0235b 100644 --- a/django_cockroachdb_gis/features.py +++ b/django_cockroachdb_gis/features.py @@ -1,6 +1,7 @@ from django.contrib.gis.db.backends.postgis.features import ( DatabaseFeatures as PostGISFeatures, ) +from django.db.backends.postgresql.psycopg_any import is_psycopg3 from django.utils.functional import cached_property from django_cockroachdb.features import DatabaseFeatures as CockroachFeatures @@ -72,7 +73,22 @@ def django_test_expected_failures(self): # 3D opclass not present on CockroachDB: # https://github.com/cockroachdb/cockroach/issues/47420#issuecomment-969578772 'gis_tests.gis_migrations.test_operations.OperationTests.test_add_3d_field_opclass', + # QuerySet.bulk_create() doesn't work with geometries after + # https://github.com/django/django/commit/a16eedcf9c69d8a11d94cac1811018c5b996d491 + # could not parse geometry: error parsing EWKB hex: encoding/hex: + # invalid byte: U+003A ':' + # https://github.com/cockroachdb/cockroach/issues/138140 + 'gis_tests.geoapp.test_functions.GISFunctionsTests.test_area_lookups', }) + if is_psycopg3: + expected_failures.update({ + # QuerySet.bulk_create() doesn't work with geometries after + # https://github.com/django/django/commit/a16eedcf9c69d8a11d94cac1811018c5b996d491 + # could not parse geometry: error parsing EWKB hex: encoding/hex: + # invalid byte: U+003A ':' + # https://github.com/cockroachdb/cockroach/issues/138140 + 'gis_tests.geoapp.test_functions.GISFunctionsTests.test_area_lookups', + }) if self.uses_server_side_binding: expected_failures.update({ # unknown signature: st_scale(geometry, int, int)