Skip to content
Advertisement

Bound metadata RemovedIn20Warning in debug mode

I use SQLAlchemy 1.4.0beta1 and enabled future flag for both the engine and the Session. Normally I don’t receive warnings. But in debug mode I receive warnings on 2.0 style select statements.

My models.py:

JavaScript

Code with warning:

JavaScript

Warning itself:

JavaScript

Why is there any warning if I don’t bind any MetaData anywhere? And I also cannot reach breakpoint at the mentioned line of file when I receive this warning in the debug mode.

Complete example

JavaScript

I put breakpoint at line with stmt and warning appears after going at line with source.

Advertisement

Answer

PyCharm evaluates all attributes of local objects. Deprecated bind happens to be one of them.

JavaScript
Advertisement