Merge "tests: Enable SQLAlchemy 2.0 deprecation warnings"
This commit is contained in:
commit
2c276e9518
@ -168,6 +168,37 @@ class WarningsFixture(fixtures.Fixture):
|
|||||||
category=sqla_exc.SADeprecationWarning,
|
category=sqla_exc.SADeprecationWarning,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# ..but filter everything out until we get around to fixing them
|
||||||
|
# TODO(stephenfin): Fix all of these
|
||||||
|
|
||||||
|
warnings.filterwarnings(
|
||||||
|
'ignore',
|
||||||
|
module='manila',
|
||||||
|
message='Using strings to indicate column or relationship paths ',
|
||||||
|
category=sqla_exc.SADeprecationWarning,
|
||||||
|
)
|
||||||
|
|
||||||
|
warnings.filterwarnings(
|
||||||
|
'ignore',
|
||||||
|
module='manila',
|
||||||
|
message='The current statement is being autocommitted ',
|
||||||
|
category=sqla_exc.SADeprecationWarning,
|
||||||
|
)
|
||||||
|
|
||||||
|
warnings.filterwarnings(
|
||||||
|
'ignore',
|
||||||
|
module='manila',
|
||||||
|
message='The autoload parameter is deprecated ',
|
||||||
|
category=sqla_exc.SADeprecationWarning,
|
||||||
|
)
|
||||||
|
|
||||||
|
warnings.filterwarnings(
|
||||||
|
'ignore',
|
||||||
|
module='manila',
|
||||||
|
message='Using strings to indicate relationship names in Query',
|
||||||
|
category=sqla_exc.SADeprecationWarning,
|
||||||
|
)
|
||||||
|
|
||||||
# Enable general SQLAlchemy warnings also to ensure we're not doing
|
# Enable general SQLAlchemy warnings also to ensure we're not doing
|
||||||
# silly stuff. It's possible that we'll need to filter things out here
|
# silly stuff. It's possible that we'll need to filter things out here
|
||||||
# with future SQLAlchemy versions, but that's a good thing
|
# with future SQLAlchemy versions, but that's a good thing
|
||||||
|
2
tox.ini
2
tox.ini
@ -12,6 +12,8 @@ usedevelop = true
|
|||||||
setenv =
|
setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
PYTHONDONTWRITEBYTECODE=1
|
PYTHONDONTWRITEBYTECODE=1
|
||||||
|
# TODO(stephenfin): Remove once we bump our upper-constraint to SQLAlchemy 2.0
|
||||||
|
SQLALCHEMY_WARN_20=1
|
||||||
deps =
|
deps =
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user