summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/sql/elements.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-12-14 15:36:38 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2019-12-14 15:36:38 -0500
commit5411bef285c50b03ea6d8b45193d43c207d4746b (patch)
tree29f7ebeec3e1c69fe9bcf067a1aa3380dfb124de /lib/sqlalchemy/sql/elements.py
parent89bf6d80a999eb31ee4a69b229b887fbfb2ed12a (diff)
downloadsqlalchemy-5411bef285c50b03ea6d8b45193d43c207d4746b.tar.gz
Ensure cache keys are hashable in the test
Change-Id: I962ff15194e2416844086f03dddadb49f48a6c8d
Diffstat (limited to 'lib/sqlalchemy/sql/elements.py')
-rw-r--r--lib/sqlalchemy/sql/elements.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
index da7568330..464c2a4d6 100644
--- a/lib/sqlalchemy/sql/elements.py
+++ b/lib/sqlalchemy/sql/elements.py
@@ -3263,7 +3263,15 @@ class BinaryExpression(ColumnElement):
("right", self.right._gen_cache_key(anon_map, bindparams)),
("operator", self.operator),
("negate", self.negate),
- ("modifiers", self.modifiers),
+ (
+ "modifiers",
+ tuple(
+ (key, self.modifiers[key])
+ for key in sorted(self.modifiers)
+ )
+ if self.modifiers
+ else None,
+ ),
)
def __init__(