The alembic migration test fails because alembic upgrade head runs as a bare subprocess and picks up the system ~/.local SQLAlchemy (too old for DeclarativeBase) instead of the venv interpreter. Pin the migration invocation to the venv so the test (and fresh-target migrations) are reliable.
The alembic migration test fails because
alembic upgrade headruns as a bare subprocess and picks up the system~/.localSQLAlchemy (too old forDeclarativeBase) instead of the venv interpreter. Pin the migration invocation to the venv so the test (and fresh-target migrations) are reliable.