Close connection after retrieving the current alembic version#26
Close connection after retrieving the current alembic version#26martinburchell merged 3 commits intomasterfrom
Conversation
CamCOPS upgrade_db was hanging when upgrading the database due to this open connection causing a metadata lock.
|
@RudolfCardinal the test failures are because of this: since SQLAlchemy 2.0.38 i.e. unrelated to this change. I can make the tests pass if I delete the call to |
|
Hmm. The use of "git blame" suggests you ;) I suspect it is a recipe from sqlalchemy/sqlalchemy#7779 . But that was a modification to something at https://github.com/sqlalchemy/sqlalchemy/wiki/Views , which itself was updated recently, for SQLAlchemy 2.0.38. So perhaps the current view recipe, which doesn't use the "internals", is the way to go? |
Oh yes :) sorry! I have no memory of writing that. I am getting old. I will take a look at it. |
Use updated example from https://github.com/sqlalchemy/sqlalchemy/wiki/Views for SQLA 2.0.38
Since the upgrade to SQLAlchemy 2.0, CamCOPS
upgrade_dbwas hanging when upgrading the database. This appears to be due to this open connection causing a metadata lock.