]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
apply basic escaping to anon_labels unconditionally
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 27 Oct 2022 13:28:02 +0000 (09:28 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 27 Oct 2022 14:25:49 +0000 (10:25 -0400)
commitd8910c442ed609892f786fe89383a7176f1d94a9
tree5394f7171c4154d660e3aeaf0e2a1c443d83055e
parentdbae24ab4c5f1e02e81d7211c94e1c7d9fc3562f
apply basic escaping to anon_labels unconditionally

Fixed issue which prevented the :func:`_sql.literal_column` construct from
working properly within the context of a :class:`.Select` construct as well
as other potential places where "anonymized labels" might be generated, if
the literal expression contained characters which could interfere with
format strings, such as open parenthesis, due to an implementation detail
of the "anonymous label" structure.

Fixes: #8724
Change-Id: I3089124fbd055a011c8a245964258503b717d941
(cherry picked from commit caa9f0ff98d44359f5162bca8e7fe7bcaa2989a7)
doc/build/changelog/unreleased_14/8724.rst [new file with mode: 0644]
lib/sqlalchemy/sql/elements.py
test/sql/test_labels.py