@@ -83,6 +83,10 @@ def is_cockroachdb_23_2(self):
83
83
def is_cockroachdb_24_1 (self ):
84
84
return self .connection .cockroachdb_version >= (24 , 1 )
85
85
86
+ @cached_property
87
+ def is_cockroachdb_24_3 (self ):
88
+ return self .connection .cockroachdb_version >= (24 , 3 )
89
+
86
90
@cached_property
87
91
def django_test_expected_failures (self ):
88
92
expected_failures = super ().django_test_expected_failures
@@ -136,15 +140,11 @@ def django_test_expected_failures(self):
136
140
'migrations.test_operations.OperationTests.test_alter_field_pk_fk' ,
137
141
'migrations.test_operations.OperationTests.test_alter_field_pk_fk_char_to_int' ,
138
142
'migrations.test_operations.OperationTests.test_alter_field_pk_fk_db_collation' ,
139
- 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_target_changes' ,
140
143
'migrations.test_operations.OperationTests.test_alter_field_reloads_state_fk_with_to_field_related_name_target_type_change' , # noqa
141
- 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_with_to_field_target_changes' , # noqa
142
144
'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_with_to_field_target_type_change' , # noqa
143
- 'migrations.test_operations.OperationTests.test_rename_field_reloads_state_on_fk_target_changes' ,
144
145
'schema.tests.SchemaTests.test_alter_auto_field_to_char_field' ,
145
146
'schema.tests.SchemaTests.test_alter_autofield_pk_to_smallautofield_pk' ,
146
147
'schema.tests.SchemaTests.test_alter_primary_key_db_collation' ,
147
- 'schema.tests.SchemaTests.test_alter_primary_key_the_same_name' ,
148
148
'schema.tests.SchemaTests.test_char_field_pk_to_auto_field' ,
149
149
'schema.tests.SchemaTests.test_char_field_with_db_index_to_fk' ,
150
150
'schema.tests.SchemaTests.test_text_field_with_db_index_to_fk' ,
@@ -182,11 +182,21 @@ def django_test_expected_failures(self):
182
182
'aggregation.tests.AggregateTestCase.test_aggregation_default_expression' ,
183
183
# ProgrammingError: VALUES types int and float cannot be matched
184
184
'field_defaults.tests.DefaultTests.test_bulk_create_mixed_db_defaults_function' ,
185
- # concat(): unknown signature: concat(string, int2) (desired <string>)
186
- 'db_functions.text.test_concat.ConcatTests.test_concat_non_str' ,
187
- # unknown signature: concat(varchar, int) (returning <string>)
188
- 'migrations.test_operations.OperationTests.test_add_generate_field' ,
189
185
})
186
+ if not self .is_cockroachdb_24_3 :
187
+ expected_failures .update ({
188
+ # ALTER COLUMN TYPE requiring rewrite of on-disk data is currently
189
+ # not supported for columns that are part of an index.
190
+ # https://go.crdb.dev/issue/47636
191
+ 'schema.tests.SchemaTests.test_alter_primary_key_the_same_name' ,
192
+ 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_target_changes' ,
193
+ 'migrations.test_operations.OperationTests.test_alter_field_reloads_state_on_fk_with_to_field_target_changes' , # noqa
194
+ 'migrations.test_operations.OperationTests.test_rename_field_reloads_state_on_fk_target_changes' ,
195
+ # unknown signature: concat(varchar, int) (returning <string>)
196
+ 'migrations.test_operations.OperationTests.test_add_generate_field' ,
197
+ # concat(): unknown signature: concat(string, int2) (desired <string>)
198
+ 'db_functions.text.test_concat.ConcatTests.test_concat_non_str' ,
199
+ })
190
200
if not self .is_cockroachdb_23_2 :
191
201
expected_failures .update ({
192
202
# cannot index a json element:
@@ -258,6 +268,10 @@ def django_test_expected_failures(self):
258
268
'queries.test_bulk_update.BulkUpdateTests.test_updated_rows_when_passing_duplicates' ,
259
269
'queries.test_q.QCheckTests.test_expression' ,
260
270
'queries.test_qs_combinators.QuerySetSetOperationTests.test_union_multiple_models_with_values_list_and_annotations' , # noqa
271
+ # error in argument for $2: could not parse ":" as type int2:
272
+ # strconv.ParseInt: parsing ":": invalid syntax
273
+ # https://github.com/cockroachdb/cockroach/issues/136295
274
+ 'db_functions.text.test_concat.ConcatTests.test_concat_non_str' ,
261
275
# unsupported binary operator: <interval> / <decimal>
262
276
'expressions.tests.FTimeDeltaTests.test_durationfield_multiply_divide' ,
263
277
# InvalidParameterValue: unsupported binary operator: <int4> / <float>
@@ -268,6 +282,15 @@ def django_test_expected_failures(self):
268
282
# operator: <decimal> / <float> (desired <decimal>)
269
283
'aggregation.tests.AggregateTestCase.test_aggregation_default_passed_another_aggregate' ,
270
284
})
285
+ if self .is_cockroachdb_24_3 :
286
+ expected_failures .update ({
287
+ # psycopg.errors.IndeterminateDatatype: replace():
288
+ # replace(): replace(): concat(): could not determine data
289
+ # type of placeholder $3. This worked until v24.3 added
290
+ # support for non-string data to concat():
291
+ # https://github.com/cockroachdb/cockroach/pull/127098#issuecomment-2492652084
292
+ "model_fields.test_uuid.TestQuerying.test_filter_with_expr" ,
293
+ })
271
294
else :
272
295
expected_failures .update ({
273
296
# Unsupported query: unsupported binary operator: <int> / <int>:
0 commit comments