summaryrefslogtreecommitdiff
path: root/oslo_db
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2021-07-16 19:20:30 +0100
committerStephen Finucane <stephenfin@redhat.com>2021-08-10 16:53:47 +0100
commit6a013c606b023b0ba7f3cb1bcc094d9adc1710f3 (patch)
tree33ac6f83f0a2f5912ed5ad1ec1023911a3bfcdbb /oslo_db
parentd2f101cdfee0fd4e98c02d1ac8034f83c51ae82c (diff)
downloadoslo-db-6a013c606b023b0ba7f3cb1bcc094d9adc1710f3.tar.gz
Replace use of Table.autoload parameter
Resolve the following RemovedIn20Warning warning: The autoload parameter is deprecated and will be removed in version 2.0. Please use the autoload_with parameter, passing an engine or connection. Change-Id: Ie039851005c6038591e0e1f6426922ca5b0dcb9a Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Diffstat (limited to 'oslo_db')
-rw-r--r--oslo_db/tests/fixtures.py5
-rw-r--r--oslo_db/tests/sqlalchemy/test_utils.py2
2 files changed, 1 insertions, 6 deletions
diff --git a/oslo_db/tests/fixtures.py b/oslo_db/tests/fixtures.py
index 8e70458..1f240ae 100644
--- a/oslo_db/tests/fixtures.py
+++ b/oslo_db/tests/fixtures.py
@@ -49,11 +49,6 @@ class WarningsFixture(fixtures.Fixture):
warnings.filterwarnings(
'once',
- message=r'The autoload parameter is deprecated .*',
- category=sqla_exc.SADeprecationWarning)
-
- warnings.filterwarnings(
- 'once',
message=r'Using non-integer/slice indices on Row is deprecated .*',
category=sqla_exc.SADeprecationWarning)
diff --git a/oslo_db/tests/sqlalchemy/test_utils.py b/oslo_db/tests/sqlalchemy/test_utils.py
index 5fdc916..7531332 100644
--- a/oslo_db/tests/sqlalchemy/test_utils.py
+++ b/oslo_db/tests/sqlalchemy/test_utils.py
@@ -927,7 +927,7 @@ class TestMigrationUtils(db_test_base._DbTestCase):
utils._change_deleted_column_type_to_id_type_sqlite(self.engine,
table_name)
- table = Table(table_name, self.meta, autoload=True)
+ table = Table(table_name, self.meta, autoload_with=self.engine)
# NOTE(I159): if the CHECK constraint has been dropped (expected
# behavior), any integer value can be inserted, otherwise only 1 or 0.
# NOTE(zzzeek): SQLAlchemy 1.2 Boolean type will disallow non 1/0