]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Cache every key in reflection_cache
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 31 Oct 2019 13:30:12 +0000 (09:30 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 31 Oct 2019 13:34:55 +0000 (09:34 -0400)
commitb1103f345385ed43a11b262ff83696214c23ae51
tree4aefd8fda07e24cca0b7ea0ee903e3932031c987
parenta82c7d2992f7d6180f1b6a5c08207ec665950d2d
Cache every key in reflection_cache

Fixed bug in :class:`.Inspector` where the cache key generation did not
take into account arguments passed in the form of tuples, such as the tuple
of view name styles to return for the PostgreSQL dialect. This would lead
the inspector to cache too generally for a more specific set of criteria.
The logic has been adjusted to include every keyword element in the cache,
as every argument is expected to be appropriate for a cache else the
caching decorator should be bypassed by the dialect.

Fixes: #4955
Change-Id: Icd97744323407977a3f7db26e8a63a1a5c576010
(cherry picked from commit 9fc54801c8235a6327e0ce80b145f7ba756ae47a)
doc/build/changelog/unreleased_13/4955.rst [new file with mode: 0644]
lib/sqlalchemy/engine/reflection.py
test/dialect/postgresql/test_reflection.py