clean up doubling of percent signs, base on paramstyle alone and make consistent
Currently, literal_column() doubles up percent signs as the base compiler.py level, which is inconsistent with the behavior of text() and column(), which both do it at the per-dialect level. But also, at the per-dialect level, the mysqldb and psycopg2 compilers hardcode this behavior in two separate places for text(), column(), and the modulus operator.
doubling of percents should be done based on paramstyle alone and can be done by default in the base compiler. literal_column() should not unconditionaly double percents as this is legacy behavior.
Comments (8)
-
reporter -
reporter Issue
#3737was marked as a duplicate of this issue. -
reporter - changed status to resolved
Double percent signs based on paramstyle, not dialect
This patch moves the "doubling" of percent signs into the base compiler and makes it completely a product of whether or not the paramstyle is format/pyformat or not. Without this paramstyle, percent signs are not doubled across text(), literal_column(), and column().
Change-Id: Ie2f278ab1dbb94b5078f85c0096d74dbfa049197 Fixes:
#3740→ <<cset 8feba9a25f48>>
-
@zzzeek When would be the Milestone 1.2 released? Because, when I tried to find the release date, there was no information, as we would find in github about the milestone end date.
-
reporter - changed status to open
this was not resolved at all, an errant push of a bunch of branches seems to have tripped the resolution here.
-
reporter we don't at the moment have a fixed timetable for releases either major or minor. However, we are in the 1.1 beta series right now. Typically, 1.2 would not be until sometime in 2017, unless the pace of development were sped up. This is a behavioral change which can break existing code (for example, if someone is relying upon those percent signs being doubled up) so it can't be released in the middle of a series.
-
agree with your last reasoning. would be nice to see in 1.2
-
reporter - changed status to resolved
Double percent signs based on paramstyle, not dialect
This patch moves the "doubling" of percent signs into the base compiler and makes it completely a product of whether or not the paramstyle is format/pyformat or not. Without this paramstyle, percent signs are not doubled across text(), literal_column(), and column().
Change-Id: Ie2f278ab1dbb94b5078f85c0096d74dbfa049197 Fixes:
#3740→ <<cset 86ef507cc73e>>
- Log in to comment
https://gerrit.sqlalchemy.org/138