stacklevel for SAWarning about Unicode types

Issue #2707 new
Domen Kožar
created an issue

When passing strings to a Unicode type, sqlalchemy complains: lib/python2.7/site-packages/SQLAlchemy-0.8.0-py2.7-linux-x86_64.egg/sqlalchemy/engine/ SAWarning: Unicode type received non-unicode bind param value.

Those warnings are hard to debug. Changing stacklevel to 17 reports the stack correctly, but I'm not sure if stacklevel is dynamic.

Comments (4)

  1. Domen Kožar reporter

    Since it's 17 stacks, it probably changes quickly and there might be multiple paths to get to that warning. No idea how to do that dynamically, Googling doesn't reveal much.

  2. Log in to comment