1.2.0
Released: December 27, 2017
-
[bug] [sql] Fixed bug where
__repr__
ofColumnDefault
would fail
if the argument were a tuple. Pull request courtesy Nicolas Caniart.This change is also backported to: 1.1.15
References: #4126
-
[bug] [declarative] [orm] Fixed bug where a descriptor that is elsewhere a mapped column
or relationship within a hierarchy based onAbstractConcreteBase
would be referred towards during a refresh operation, causing an error
as the attribute is not mapped as a mapper property.
A similar issue can arise for other attributes like the "type" column
added byAbstractConcreteBase
if the class fails to include
"concrete=True" in its mapper, however the check here should also
prevent that scenario from causing a problem.This change is also backported to: 1.1.15
References: #4124
-
[bug] [ext] [orm] Fixed bug where the association proxy would inadvertently link itself
to anAliasedClass
object if it were called first with
theAliasedClass
as a parent, causing errors upon subsequent
usage.This change is also backported to: 1.1.15
References: #4116
-
[bug] [mysql] MySQL 5.7.20 now warns for use of the @tx_isolation variable; a version
check is now performed and uses @transaction_isolation instead
to prevent this warning.This change is also backported to: 1.1.15
References: #4120
-
[feature] [orm] Added a new data member to the identity key tuple
used by the ORM's identity map, known as the
"identity_token". This token defaults to None but
may be used by database sharding schemes to differentiate
objects in memory with the same primary key that come
from different databases. The horizontal sharding
extension integrates this token applying the shard
identifier to it, thus allowing primary keys to be
duplicated across horizontally sharded backends.References: #4137
-
[bug] [mysql] Fixed regression from issue 1.2.0b3 where "MariaDB" version comparison can
fail for some particular MariaDB version strings under Python 3.References: #4115
-
[enhancement] [sql] Implemented "DELETE..FROM" syntax for PostgreSQL, MySQL, MS SQL Server
(as well as within the unsupported Sybase dialect) in a manner similar
to how "UPDATE..FROM" works. A DELETE statement that refers to more than
one table will switch into "multi-table" mode and render the appropriate
"USING" or multi-table "FROM" clause as understood by the database.
Pull request courtesy Pieter Mulder.References: #959
-
[bug] [sql] Reworked the new "autoescape" feature introduced in
change_2694
in 1.2.0b2 to be fully automatic; the escape
character now defaults to a forwards slash"/"
and
is applied to percent, underscore, as well as the escape
character itself, for fully automatic escaping. The
character can also be changed using the "escape" parameter.References: #2694
-
[bug] [sql] Fixed bug where the
Table.tometadata()
method would not properly
accommodateIndex
objects that didn't consist of simple
column expressions, such as indexes against atext()
construct,
indexes that used SQL expressions orfunc
, etc. The routine
now copies expressions fully to a newIndex
object while
substituting all table-boundColumn
objects for those
of the target table.References: #4147
-
[bug] [sql] Changed the "visit name" of
ColumnElement
from "column" to
"column_element", so that when this element is used as the basis for a
user-defined SQL element, it is not assumed to behave like a table-bound
ColumnClause
when processed by various SQL traversal utilities,
as are commonly used by the ORM.References: #4142
-
[bug] [ext] [sql] Fixed issue in
ARRAY
datatype which is essentially the same
issue as that of #3832, except not a regression, where
column attachment events on top ofARRAY
would not fire
correctly, thus interfering with systems which rely upon this. A key
use case that was broken by this is the use of mixins to declare
columns that make use ofMutableList.as_mutable()
.References: #4141
-
[engine] [feature] The "password" attribute of the
url.URL
object can now be
any user-defined or user-subclassed string object that responds to the
Pythonstr()
builtin. The object passed will be maintained as the
datamemberurl.URL.password_original
and will be consulted
when theurl.URL.password
attribute is read to produce the
string value.References: #4089
-
[bug] [orm] Fixed bug in
contains_eager()
query option where making use of a
path that usedPropComparator.of_type()
to refer to a subclass
across more than one level of joins would also require that the "alias"
argument were provided with the same subtype in order to avoid adding
unwanted FROM clauses to the query; additionally, using
contains_eager()
across subclasses that usealiased()
objects
of subclasses as thePropComparator.of_type()
argument will also
render correctly.References: #4130
-
[feature] [postgresql] Added new
postgresql.MONEY
datatype. Pull request courtesy
Cleber J Santos. -
[bug] [sql] Fixed bug in new "expanding bind parameter" feature whereby if multiple
params were used in one statement, the regular expression would not
match the parameter name correctly.References: #4140
-
[enhancement] [ext] Added new method
baked.Result.with_post_criteria()
to baked
query system, allowing non-SQL-modifying transformations to take place
after the query has been pulled from the cache. Among other things,
this method can be used withhorizontal_shard.ShardedQuery
to set the shard identifier.horizontal_shard.ShardedQuery
has also been modified such that itsShardedQuery.get()
method
interacts correctly with that ofbaked.Result
.References: #4135
-
[bug] [oracle] Added some additional rules to fully handle
Decimal('Infinity')
,
Decimal('-Infinity')
values with cx_Oracle numerics when using
asdecimal=True
.References: #4064
-
[bug] [mssql] Fixed bug where sqltypes.BINARY and sqltypes.VARBINARY datatypes
would not include correct bound-value handlers for pyodbc,
which allows the pyodbc.NullParam value to be passed that
helps with FreeTDS.References: #4121
-
[feature] [misc] Added a new errors section to the documentation with background
about common error messages. Selected exceptions within SQLAlchemy
will include a link in their string output to the relevant section
within this page. -
[bug] [orm] The
Query.exists()
method will now disable eager loaders for when
the query is rendered. Previously, joined-eager load joins would be rendered
unnecessarily as well as subquery eager load queries would be needlessly
generated. The new behavior matches that of theQuery.subquery()
method.References: #4032