Remove cap on oslo.db version

This commit removes the requirements cap on oslo.db. This was
originally added because of the removal of a private interface that
subunit2sql depended on in it's alembic env.py. A public interface
was eventually added to provide analogous functionality but
subunit2sql never removed the cap and used the new interface;
until now.

Change-Id: Idbc17096d0d3fe43261026b866041ae8a97d86fc
This commit is contained in:
Matthew Treinish 2016-05-18 12:08:25 -04:00
parent 12e373f5e3
commit 21ee9f58b8
No known key found for this signature in database
GPG Key ID: FD12A0F214C9E177
3 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
alembic>=0.4.1 alembic>=0.4.1
oslo.config>=1.4.0.0a3 oslo.config>=1.4.0.0a3
oslo.db!=1.12.0,<2.0.0 oslo.db>=2.1.0
oslo.concurrency oslo.concurrency
pbr>=1.0.0 pbr>=1.0.0
python-subunit>=0.0.18 python-subunit>=0.0.18

View File

@ -79,7 +79,7 @@ def run_migrations_online():
facade = db_api._create_facade_lazily() facade = db_api._create_facade_lazily()
engine = facade.get_engine() engine = facade.get_engine()
connection = engine.connect() connection = engine.connect()
facade._session_maker.configure(bind=connection) facade.get_sessionmaker().configure(bind=connection)
context.configure(connection=connection, context.configure(connection=connection,
target_metadata=target_metadata, target_metadata=target_metadata,
@ -90,7 +90,7 @@ def run_migrations_online():
context.run_migrations() context.run_migrations()
finally: finally:
connection.close() connection.close()
facade._session_maker.configure(bind=engine) facade.get_sessionmaker().configure(bind=engine)
if context.is_offline_mode(): if context.is_offline_mode():
run_migrations_offline() run_migrations_offline()

View File

@ -108,7 +108,7 @@ class TestModelsMigrations(test_migrations.ModelsMigrationsSync,
object_, name, type_, reflected, compare_to) object_, name, type_, reflected, compare_to)
def filter_metadata_diff(self, diff): def filter_metadata_diff(self, diff):
return filter(self.remove_unrelated_errors, diff) return list(filter(self.remove_unrelated_errors, diff))
def remove_unrelated_errors(self, element): def remove_unrelated_errors(self, element):
insp = sqlalchemy.engine.reflection.Inspector.from_engine( insp = sqlalchemy.engine.reflection.Inspector.from_engine(