From: Mike Bayer Date: Tue, 26 Dec 2017 18:27:39 +0000 (-0500) Subject: - move this migration note to the correct section X-Git-Tag: rel_1_2_0~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=17e69210168ed3747ec92c9ea567988fbc94a983;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - move this migration note to the correct section Change-Id: I321a29b4a7705221e905b2e5ca88bae8d04b7e99 --- diff --git a/doc/build/changelog/migration_12.rst b/doc/build/changelog/migration_12.rst index cd2a49dd49..c4ae0f9f5d 100644 --- a/doc/build/changelog/migration_12.rst +++ b/doc/build/changelog/migration_12.rst @@ -1037,41 +1037,6 @@ localized to the current VALUES clause being processed:: Key Behavioral Changes - ORM ============================ -.. _change_3740: - -Percent signs in literal_column() now conditionally escaped ------------------------------------------------------------ - -The :obj:`.literal_column` construct now escapes percent sign characters -conditionally, based on whether or not the DBAPI in use makes use of a -percent-sign-sensitive paramstyle or not (e.g. 'format' or 'pyformat'). - -Previously, it was not possible to produce a :obj:`.literal_column` -construct that stated a single percent sign:: - - >>> from sqlalchemy import literal_column - >>> print(literal_column('some%symbol')) - some%%symbol - -The percent sign is now unaffected for dialects that are not set to -use the 'format' or 'pyformat' paramstyles; dialects such most MySQL -dialects which do state one of these paramstyles will continue to escape -as is appropriate:: - - >>> from sqlalchemy import literal_column - >>> print(literal_column('some%symbol')) - some%symbol - >>> from sqlalchemy.dialects import mysql - >>> print(literal_column('some%symbol').compile(dialect=mysql.dialect())) - some%%symbol - -As part of this change, the doubling that has been present when using -operators like :meth:`.ColumnOperators.contains`, -:meth:`.ColumnOperators.startswith` and :meth:`.ColumnOperators.endswith` -is also refined to only occur when appropriate. - -:ticket:`3740` - .. _change_3934: The after_rollback() Session event now emits before the expiration of objects @@ -1480,6 +1445,42 @@ for on-the-fly boolean operators:: x -%> :x_1 +.. _change_3740: + +Percent signs in literal_column() now conditionally escaped +----------------------------------------------------------- + +The :obj:`.literal_column` construct now escapes percent sign characters +conditionally, based on whether or not the DBAPI in use makes use of a +percent-sign-sensitive paramstyle or not (e.g. 'format' or 'pyformat'). + +Previously, it was not possible to produce a :obj:`.literal_column` +construct that stated a single percent sign:: + + >>> from sqlalchemy import literal_column + >>> print(literal_column('some%symbol')) + some%%symbol + +The percent sign is now unaffected for dialects that are not set to +use the 'format' or 'pyformat' paramstyles; dialects such most MySQL +dialects which do state one of these paramstyles will continue to escape +as is appropriate:: + + >>> from sqlalchemy import literal_column + >>> print(literal_column('some%symbol')) + some%symbol + >>> from sqlalchemy.dialects import mysql + >>> print(literal_column('some%symbol').compile(dialect=mysql.dialect())) + some%%symbol + +As part of this change, the doubling that has been present when using +operators like :meth:`.ColumnOperators.contains`, +:meth:`.ColumnOperators.startswith` and :meth:`.ColumnOperators.endswith` +is also refined to only occur when appropriate. + +:ticket:`3740` + + .. _change_3785: The column-level COLLATE keyword now quotes the collation name