#1166 Ignore some SQLAlchemy DeprecationWarnings
Merged a month ago by jkaluza. Opened a month ago by fivaldi.
fivaldi/fm-orchestrator fivaldi_ignore_deprecation_warns  into  master

file modified
+4 -1

@@ -21,7 +21,10 @@ 

  sitepackages = true

  deps = -r{toxinidir}/test-requirements.txt

  commands =

-     py.test -v {posargs}

+     py.test -v \

+         -W "ignore:Use .persist_selectable:DeprecationWarning" \

+         -W "ignore:The ConnectionEvents.dbapi_error() event is deprecated and will be removed in a future release. Please refer to the ConnectionEvents.handle_error() event.:DeprecationWarning" \

+         {posargs}



  basepython = python2

There are two very very noisy SQLAlchemy DeprecationWarnings, so let's ignore them.

Why not fix it instead of suppressing of warnings?

This relates to Py27. It's not actually MBS code, but the SQLAlchemy library code which has these DeprecationWarnings inside. We're not calling those methods directly from outside. Py3 tests don't suffer from this.

The issue is that there are ~20 thousands of lines in the output due to the warnings..

So, this is issue with flask-sqlalchemy using sqlalchemy api which has been deprecated in new sqlalchemy-1.3.0 which has been released on Mar 4th.

It is tracked in flask-sqlalchemy here: https://github.com/pallets/flask-sqlalchemy/issues/671.

It is not possible to fix in MBS code and actually not our issue to fix that. Given it is already tracked upstream and being worked on, I'm giving +1 and merging.

Commit 2f70945 fixes this pull-request

Pull-Request has been merged by jkaluza

a month ago

Pull-Request has been merged by jkaluza

a month ago