diff options
author | Stephen Finucane <stephenfin@redhat.com> | 2021-07-16 19:20:30 +0100 |
---|---|---|
committer | Stephen Finucane <stephenfin@redhat.com> | 2021-08-10 16:53:47 +0100 |
commit | 6a013c606b023b0ba7f3cb1bcc094d9adc1710f3 (patch) | |
tree | 33ac6f83f0a2f5912ed5ad1ec1023911a3bfcdbb | |
parent | d2f101cdfee0fd4e98c02d1ac8034f83c51ae82c (diff) | |
download | oslo-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>
-rw-r--r-- | oslo_db/tests/fixtures.py | 5 | ||||
-rw-r--r-- | oslo_db/tests/sqlalchemy/test_utils.py | 2 |
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 |