]> 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:33:58 +0000 (09:33 -0400)
commit9fc54801c8235a6327e0ce80b145f7ba756ae47a
treefcdf4786cc495a85d9b44b8ed43c6c650ed6d9f7
parent77adce762b2a9ea19fcd72a28482faf63cef4844
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
doc/build/changelog/unreleased_13/4955.rst [new file with mode: 0644]
lib/sqlalchemy/engine/reflection.py
test/dialect/postgresql/test_reflection.py