From da002a82f113afc1eb9f0329d567ae9db573091b Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Fri, 16 Jul 2021 13:19:41 +0100 Subject: [PATCH] utils: Deprecate sqlalchemy-migrate-related functions These are using private APIs of SQLAlchemy but, more importantly, are not necessary in an alembic-only world. Mark them deprecated for removal. Change-Id: I6efb6e1d35542cd8df922c86e134fe1e0b8c2e52 Signed-off-by: Stephen Finucane --- oslo_db/sqlalchemy/utils.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/oslo_db/sqlalchemy/utils.py b/oslo_db/sqlalchemy/utils.py index 95613d41..2329b4ba 100644 --- a/oslo_db/sqlalchemy/utils.py +++ b/oslo_db/sqlalchemy/utils.py @@ -25,6 +25,7 @@ import re from alembic.migration import MigrationContext from alembic.operations import Operations +import debtcollector.removals from oslo_utils import timeutils import sqlalchemy from sqlalchemy import Boolean @@ -544,6 +545,12 @@ def _restore_indexes_on_deleted_columns(engine, table_name, indexes): new_index.create(engine) +@debtcollector.removals.remove( + message='This API is intended for use with sqlalchemy-migrate, support ' + 'for which is deprecated for removal; it will be removed in a future ' + 'release', + version='10.1.0', +) def change_deleted_column_type_to_boolean(engine, table_name, **col_name_col_instance): if engine.name == "sqlite": @@ -617,6 +624,12 @@ def _change_deleted_column_type_to_boolean_sqlite(engine, table_name, execute() +@debtcollector.removals.remove( + message='This API is intended for use with sqlalchemy-migrate, support ' + 'for which is deprecated for removal; it will be removed in a future ' + 'release', + version='10.1.0', +) def change_deleted_column_type_to_id_type(engine, table_name, **col_name_col_instance): if engine.name == "sqlite":