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>
This commit is contained in:
parent
f3bdd4d422
commit
a778f2d87f
@ -38,11 +38,6 @@ class AlembicExtension(ext_base.MigrationExtensionBase):
|
|||||||
def __init__(self, engine, migration_config):
|
def __init__(self, engine, migration_config):
|
||||||
self.alembic_ini_path = migration_config.get('alembic_ini_path', '')
|
self.alembic_ini_path = migration_config.get('alembic_ini_path', '')
|
||||||
self.config = alembic_config.Config(self.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
|
# option should be used if script is not in default directory
|
||||||
repo_path = migration_config.get('alembic_repo_path')
|
repo_path = migration_config.get('alembic_repo_path')
|
||||||
if repo_path:
|
if repo_path:
|
||||||
|
@ -23,7 +23,6 @@ import pprint
|
|||||||
import alembic
|
import alembic
|
||||||
import alembic.autogenerate
|
import alembic.autogenerate
|
||||||
import alembic.migration
|
import alembic.migration
|
||||||
import pkg_resources as pkg
|
|
||||||
import sqlalchemy
|
import sqlalchemy
|
||||||
import sqlalchemy.exc
|
import sqlalchemy.exc
|
||||||
import sqlalchemy.sql.expression as expr
|
import sqlalchemy.sql.expression as expr
|
||||||
@ -559,20 +558,10 @@ class ModelsMigrationsSync(object, metaclass=abc.ABCMeta):
|
|||||||
:param diff: a list of differences (see `compare_metadata()` docs for
|
:param diff: a list of differences (see `compare_metadata()` docs for
|
||||||
details on format)
|
details on format)
|
||||||
:returns: a list of differences
|
:returns: a list of differences
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
return diff
|
return diff
|
||||||
|
|
||||||
def test_models_sync(self):
|
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
|
# drop all objects after a test run
|
||||||
engine = self.get_engine()
|
engine = self.get_engine()
|
||||||
backend = provision.Backend(engine.name, engine.url)
|
backend = provision.Backend(engine.name, engine.url)
|
||||||
|
Loading…
Reference in New Issue
Block a user