summaryrefslogtreecommitdiff
path: root/oslo_db
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2021-06-25 12:58:52 +0100
committerStephen Finucane <stephenfin@redhat.com>2021-06-25 12:59:42 +0100
commita778f2d87fac95868274d6396c27df40ca006bef (patch)
tree9ff76134820074789e24c8323d97693470971269 /oslo_db
parentf3bdd4d4220a884e4752ce6b61c2605bfd72f2fb (diff)
downloadoslo-db-a778f2d87fac95868274d6396c27df40ca006bef.tar.gz
sqlalchemy: Remove checks for older deps
We already state a minimum in our requirements.txt files to prevent use of this package with older alembic and sqlalchemy releases, making these checks simply noise. Remove them. Change-Id: Ie3fbc54aa0c791e6e8ca3164c95051039e82b0e3 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Diffstat (limited to 'oslo_db')
-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)