]> git.ipfire.org Git - thirdparty/sqlalchemy/alembic.git/commit
Warn on non-Connection present and accommodate for Engine
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 4 Mar 2017 21:42:30 +0000 (16:42 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 4 Mar 2017 22:12:03 +0000 (17:12 -0500)
commitadf0a7d1ea881907bdf546778dae72e6ac0a3027
tree8de4f7aed5f289459564bda20ccd7bc40b2f28b6
parent5191bc1e65cd2e686f37c0e579a394b4c2b2c54a
Warn on non-Connection present and accommodate for Engine

A warning is emitted when an object that's not a
:class:`~sqlalchemy.engine.Connection` is passed to
:meth:`.EnvironmentContext.configure`.  For the case of a
:class:`~sqlalchemy.engine.Engine` passed, the check for "in transaction"
introduced in version 0.9.0 has been relaxed to work in the case of an
attribute error, as some users appear to be passing an
:class:`~sqlalchemy.engine.Engine` and not a
:class:`~sqlalchemy.engine.Connection`.

Change-Id: I95ef38955c00511d3055362a03284fb91677595f
Fixes: #419
alembic/runtime/migration.py
docs/build/changelog.rst
tests/test_environment.py