]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
remove loader depth warning, replace with logging message
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 18 Jan 2024 02:15:37 +0000 (21:15 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 18 Jan 2024 20:21:32 +0000 (15:21 -0500)
commit90f8ff08a4b15c7706778eb10088cd239591e4cc
tree5cf210cd8cee6de6384003a79c53e5a5d6d6241a
parent822703b7c67fe59ad6d2bf2bca7002cd7153a85d
remove loader depth warning, replace with logging message

Replaced the "loader depth is excessively deep" warning with a shorter
message added to the caching badge within SQL logging, for those statements
where the ORM disabled the cache due to a too-deep chain of loader options.
The condition which this warning highlights is difficult to resolve and is
generally just a limitation in the ORM's application of SQL caching. A
future feature may include the ability to tune the threshold where caching
is disabled, but for now the warning will no longer be a nuisance.

Fixes: #10896
Change-Id: Ic3be2086d1db16f9a75390323f00a43ef72aca12
doc/build/changelog/unreleased_20/10896.rst [new file with mode: 0644]
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/orm/context.py
test/orm/test_recursive_loaders.py