summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2021-07-28 16:02:31 +0000
committerGerrit Code Review <review@openstack.org>2021-07-28 16:02:31 +0000
commitffd44ff058e6c722eaf34e7ce7d6005d717c806c (patch)
tree7b73c5ea87a55cb46295708acf20c734fb77c261
parentf048068216c655b6babc5740fc4b5e7efcf02ab1 (diff)
parenta778f2d87fac95868274d6396c27df40ca006bef (diff)
downloadoslo-db-ffd44ff058e6c722eaf34e7ce7d6005d717c806c.tar.gz
Merge "sqlalchemy: Remove checks for older deps"
-rw-r--r--oslo_db/sqlalchemy/migration_cli/ext_alembic.py5
-rw-r--r--oslo_db/sqlalchemy/test_migrations.py13
2 files changed, 1 insertions, 17 deletions
diff --git a/oslo_db/sqlalchemy/migration_cli/ext_alembic.py b/oslo_db/sqlalchemy/migration_cli/ext_alembic.py
index e44fbc8..69631a5 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 9d3a0bd..12e68eb 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)