From b97efba27b486d4d416c0f7ae900bd8d6f54ee23 Mon Sep 17 00:00:00 2001 From: Jae Hyuck Sa Date: Thu, 2 May 2024 18:44:33 +0900 Subject: [PATCH] 5.0: Update `django.db.backends.base.features.BaseDatabaseFeature` (#2099) * 5.0: Update django.db.backends.base.features.BaseDatabaseFeature * 5.0: Remove django.db.backends.base.features.BaseDatabaseFeatures.supports_atomic_references_rename --- django-stubs/db/backends/base/features.pyi | 9 +++++++- scripts/stubtest/allowlist_todo_django50.txt | 23 -------------------- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/django-stubs/db/backends/base/features.pyi b/django-stubs/db/backends/base/features.pyi index 9c29887e9..f8916b0e1 100644 --- a/django-stubs/db/backends/base/features.pyi +++ b/django-stubs/db/backends/base/features.pyi @@ -14,6 +14,7 @@ class BaseDatabaseFeatures: allows_group_by_select_index: bool empty_fetchmany_value: Sequence[Any] update_can_self_select: bool + delete_can_self_reference_subquery: bool interprets_empty_strings_as_nulls: bool supports_nullable_unique_constraints: bool supports_partially_nullable_unique_constraints: bool @@ -64,7 +65,6 @@ class BaseDatabaseFeatures: atomic_transactions: bool can_rollback_ddl: bool schema_editor_uses_clientside_param_binding: bool - supports_atomic_references_rename: bool supports_combined_alters: bool supports_foreign_keys: bool can_create_inline_fk: bool @@ -75,6 +75,9 @@ class BaseDatabaseFeatures: can_introspect_check_constraints: bool supports_paramstyle_pyformat: bool requires_literal_defaults: bool + supports_expression_defaults: bool + supports_default_keyword_in_insert: bool + supports_default_keyword_in_bulk_insert: bool connection_persists_old_columns: bool closed_cursor_error_class: type[DatabaseError] has_case_insensitive_like: bool @@ -90,6 +93,7 @@ class BaseDatabaseFeatures: supports_select_difference: bool supports_slicing_ordering_in_compound: bool supports_parentheses_in_compound: bool + supports_nulls_distinct_unique_constraints: bool requires_compound_order_by_subquery: bool supports_aggregate_filter_clause: bool supports_index_on_text_field: bool @@ -128,11 +132,14 @@ class BaseDatabaseFeatures: supports_non_deterministic_collations: bool supports_comments: bool supports_comments_inline: bool + supports_stored_generated_columns: bool + supports_virtual_generated_columns: bool supports_logical_xor: bool prohibits_null_characters_in_text_exception: tuple[ValueError | DataError] | None supports_unlimited_charfield: bool test_collations: dict[str, str | None] test_now_utc_template: str | None + insert_test_table_with_defaults: str | None django_test_expected_failures: set[str] django_test_skips: dict[str, set[str]] connection: BaseDatabaseWrapper diff --git a/scripts/stubtest/allowlist_todo_django50.txt b/scripts/stubtest/allowlist_todo_django50.txt index b1be3734e..b45576572 100644 --- a/scripts/stubtest/allowlist_todo_django50.txt +++ b/scripts/stubtest/allowlist_todo_django50.txt @@ -36,40 +36,17 @@ django.contrib.gis.management.commands django.contrib.gis.management.commands.inspectdb django.contrib.gis.management.commands.ogrinspect django.contrib.messages.test -django.db.backends.base.features.BaseDatabaseFeatures.delete_can_self_reference_subquery -django.db.backends.base.features.BaseDatabaseFeatures.insert_test_table_with_defaults -django.db.backends.base.features.BaseDatabaseFeatures.supports_default_keyword_in_bulk_insert -django.db.backends.base.features.BaseDatabaseFeatures.supports_default_keyword_in_insert -django.db.backends.base.features.BaseDatabaseFeatures.supports_expression_defaults -django.db.backends.base.features.BaseDatabaseFeatures.supports_nulls_distinct_unique_constraints -django.db.backends.base.features.BaseDatabaseFeatures.supports_stored_generated_columns -django.db.backends.base.features.BaseDatabaseFeatures.supports_virtual_generated_columns django.db.backends.base.operations.BaseDatabaseOperations.prepare_join_on_clause django.db.backends.mysql.features.DatabaseFeatures.allows_group_by_selected_pks -django.db.backends.mysql.features.DatabaseFeatures.delete_can_self_reference_subquery django.db.backends.mysql.features.DatabaseFeatures.has_native_uuid_field -django.db.backends.mysql.features.DatabaseFeatures.insert_test_table_with_defaults django.db.backends.mysql.features.DatabaseFeatures.supports_expression_defaults -django.db.backends.mysql.features.DatabaseFeatures.supports_stored_generated_columns -django.db.backends.mysql.features.DatabaseFeatures.supports_virtual_generated_columns -django.db.backends.oracle.features.DatabaseFeatures.insert_test_table_with_defaults -django.db.backends.oracle.features.DatabaseFeatures.supports_default_keyword_in_bulk_insert django.db.backends.oracle.features.DatabaseFeatures.supports_primitives_in_json_field -django.db.backends.oracle.features.DatabaseFeatures.supports_stored_generated_columns -django.db.backends.oracle.features.DatabaseFeatures.supports_virtual_generated_columns django.db.backends.oracle.features.DatabaseFeatures.test_collations django.db.backends.oracle.oracledb_any -django.db.backends.postgresql.features.DatabaseFeatures.insert_test_table_with_defaults django.db.backends.postgresql.features.DatabaseFeatures.is_postgresql_15 django.db.backends.postgresql.features.DatabaseFeatures.supports_nulls_distinct_unique_constraints -django.db.backends.postgresql.features.DatabaseFeatures.supports_stored_generated_columns -django.db.backends.postgresql.features.DatabaseFeatures.supports_virtual_generated_columns django.db.backends.postgresql.operations.DatabaseOperations.prepare_join_on_clause django.db.backends.postgresql.psycopg_any -django.db.backends.sqlite3.features.DatabaseFeatures.insert_test_table_with_defaults -django.db.backends.sqlite3.features.DatabaseFeatures.supports_default_keyword_in_insert -django.db.backends.sqlite3.features.DatabaseFeatures.supports_stored_generated_columns -django.db.backends.sqlite3.features.DatabaseFeatures.supports_virtual_generated_columns django.db.backends.sqlite3.schema.DatabaseSchemaEditor.sql_alter_column_comment django.db.backends.sqlite3.schema.DatabaseSchemaEditor.sql_alter_table_comment django.db.models.Case.allowed_default