summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/base.py
diff options
context:
space:
mode:
authormike bayer <mike_mp@zzzcomputing.com>2021-12-07 15:46:54 +0000
committerGerrit Code Review <gerrit@ci3.zzzcomputing.com>2021-12-07 15:46:54 +0000
commitca186ff935718e3e57bf9ecbf2619cd6109996d0 (patch)
tree568cc3ed1315feb68af2c78344a5edef89014e64 /lib/sqlalchemy/sql/base.py
parent1411f0bc4898737e3a575933e30c85a84b0bfb02 (diff)
parent22deafe15289d2be55682e1632016004b02b62c0 (diff)
downloadsqlalchemy-ca186ff935718e3e57bf9ecbf2619cd6109996d0.tar.gz
Merge "Warn when caching is disabled / document" into main
Diffstat (limited to 'lib/sqlalchemy/sql/base.py')
-rw-r--r--lib/sqlalchemy/sql/base.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/sqlalchemy/sql/base.py b/lib/sqlalchemy/sql/base.py
index 6b0182751..4165751ca 100644
--- a/lib/sqlalchemy/sql/base.py
+++ b/lib/sqlalchemy/sql/base.py
@@ -769,11 +769,13 @@ class CacheableOptions(Options, HasCacheKey):
return HasCacheKey._generate_cache_key_for_object(self)
-class ExecutableOption(HasCopyInternals, HasCacheKey):
+class ExecutableOption(HasCopyInternals):
_annotations = util.EMPTY_DICT
__visit_name__ = "executable_option"
+ _is_has_cache_key = False
+
def _clone(self, **kw):
"""Create a shallow copy of this ExecutableOption."""
c = self.__class__.__new__(self.__class__)
@@ -847,7 +849,8 @@ class Executable(roles.StatementRole, Generative):
"""
self._with_options += tuple(
- coercions.expect(roles.HasCacheKeyRole, opt) for opt in options
+ coercions.expect(roles.ExecutableOptionRole, opt)
+ for opt in options
)
@_generative