]> 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:40 +0000 (15:21 -0500)
commitdfbc8128b2f4047b03bb1b5fe6fb2b6cc4a7e096
tree747a8fa9f450e39c1df649b18838b2ca94755a6d
parentdeb71a9b4079dea57ce81875cbf34425c7f8e731
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
(cherry picked from commit 90f8ff08a4b15c7706778eb10088cd239591e4cc)
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