diff --git a/oslo_db/sqlalchemy/migration_cli/ext_alembic.py b/oslo_db/sqlalchemy/migration_cli/ext_alembic.py index e44fbc83..69631a54 100644 --- a/oslo_db/sqlalchemy/migration_cli/ext_alembic.py +++ b/oslo_db/sqlalchemy/migration_cli/ext_alembic.py @@ -38,11 +38,6 @@ class AlembicExtension(ext_base.MigrationExtensionBase): def __init__(self, engine, migration_config): self.alembic_ini_path = migration_config.get('alembic_ini_path', '') self.config = alembic_config.Config(self.alembic_ini_path) - # TODO(viktors): Remove this, when we will use Alembic 0.7.5 or - # higher, because the ``attributes`` dictionary was - # added to Alembic in version 0.7.5. - if not hasattr(self.config, 'attributes'): - self.config.attributes = {} # option should be used if script is not in default directory repo_path = migration_config.get('alembic_repo_path') if repo_path: diff --git a/oslo_db/sqlalchemy/test_migrations.py b/oslo_db/sqlalchemy/test_migrations.py index 9d3a0bd5..12e68ebe 100644 --- a/oslo_db/sqlalchemy/test_migrations.py +++ b/oslo_db/sqlalchemy/test_migrations.py @@ -23,7 +23,6 @@ import pprint import alembic import alembic.autogenerate import alembic.migration -import pkg_resources as pkg import sqlalchemy import sqlalchemy.exc import sqlalchemy.sql.expression as expr @@ -557,22 +556,12 @@ class ModelsMigrationsSync(object, metaclass=abc.ABCMeta): filtering is performed, changes are returned as is. :param diff: a list of differences (see `compare_metadata()` docs for - details on format) + details on format) :returns: a list of differences - """ - return diff def test_models_sync(self): - # recent versions of sqlalchemy and alembic are needed for running of - # this test, but we already have them in requirements - try: - pkg.require('sqlalchemy>=0.8.4', 'alembic>=0.6.2') - except (pkg.VersionConflict, pkg.DistributionNotFound) as e: - self.skipTest('sqlalchemy>=0.8.4 and alembic>=0.6.3 are required' - ' for running of this test: %s' % e) - # drop all objects after a test run engine = self.get_engine() backend = provision.Backend(engine.name, engine.url)