From 1328cb48e0e96835cde17aeeae3d9b973f493df4 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 15 Apr 2024 18:08:08 +0900 Subject: [PATCH] SQLAlchemy 2.0: Drop use of removed autoload The autoload arugment was removed[1] in SQLAlchemy and only the autoload_with argument should be passed. The autoload argument is set according to the autoload_with argument automatically even in SQLAlchemy 1.x[2] so is not at all needed. [1] https://github.com/sqlalchemy/sqlalchemy/commit/c932123bacad9bf047d160b85e3f95d396c513ae [2] https://github.com/sqlalchemy/sqlalchemy/commit/ad8f921e969b6f735dc8e08d882c961dde78f2b1 Change-Id: I58d33c109a9479462dea80efc1d8bc6e1f8e954c --- .../mitaka/contract/2cb4ee992b41_multiple_local_subnets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neutron_vpnaas/db/migration/alembic_migrations/versions/mitaka/contract/2cb4ee992b41_multiple_local_subnets.py b/neutron_vpnaas/db/migration/alembic_migrations/versions/mitaka/contract/2cb4ee992b41_multiple_local_subnets.py index ff9df3542..63c6cd06c 100644 --- a/neutron_vpnaas/db/migration/alembic_migrations/versions/mitaka/contract/2cb4ee992b41_multiple_local_subnets.py +++ b/neutron_vpnaas/db/migration/alembic_migrations/versions/mitaka/contract/2cb4ee992b41_multiple_local_subnets.py @@ -90,9 +90,9 @@ def _make_endpoint_groups(new_groups, new_endpoints): """Create endpoint groups and their corresponding endpoints.""" md = sa.MetaData() engine = op.get_bind() - sa.Table('vpn_endpoint_groups', md, autoload=True, autoload_with=engine) + sa.Table('vpn_endpoint_groups', md, autoload_with=engine) op.bulk_insert(md.tables['vpn_endpoint_groups'], new_groups) - sa.Table('vpn_endpoints', md, autoload=True, autoload_with=engine) + sa.Table('vpn_endpoints', md, autoload_with=engine) op.bulk_insert(md.tables['vpn_endpoints'], new_endpoints)