]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
calculate warnings stacklevels dynamically
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 7 May 2021 17:01:40 +0000 (13:01 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 10 May 2021 19:19:17 +0000 (15:19 -0400)
commitfc6b30473a89642c2c2a1f09101351e276448eb6
tree4cf123af29e107ad9876d8e27ccd1e3c015ccfe0
parent9220bc9d4cd3adc3c03d0b4499bc2ffbdbeee058
calculate warnings stacklevels dynamically

A new approach has been applied to the warnings system in SQLAlchemy to
accurately predict the appropriate stack level for each warning
dynamically. This allows evaluating the source of SQLAlchemy-generated
warnings and deprecation warnings to be more straightforward as the warning
will indicate the source line within end-user code, rather than from an
arbitrary level within SQLAlchemy's own source code.

Fixes: #6241
Change-Id: I9ecf3b3ea77424d15e8d4c0aa47350602c0568d7
doc/build/changelog/unreleased_14/6241.rst [new file with mode: 0644]
lib/sqlalchemy/orm/instrumentation.py
lib/sqlalchemy/util/deprecations.py
lib/sqlalchemy/util/langhelpers.py