:released: December 11, 2015
.. change::
:tags: bug, ext
:tickets: 3605
Added support for the ``dict.pop()`` and ``dict.popitem()`` methods
to the :class:`.mutable.MutableDict` class.
.. change::
:tags: change, tests
The ORM and Core tutorials, which have always been in doctest format,
are now exercised within the normal unit test suite in both Python
2 and Python 3.
.. change::
:tags: bug, sql
:tickets: 3603
Fixed issue within the :meth:`_expression.Insert.from_select` construct whereby
the :class:`_expression.Select` construct would have its ``._raw_columns``
collection mutated in-place when compiling the :class:`_expression.Insert`
construct, when the target :class:`_schema.Table` has Python-side defaults.
The :class:`_expression.Select` construct would compile standalone with the
erroneous column present subsequent to compilation of the
:class:`_expression.Insert`, and the :class:`_expression.Insert` statement itself would
fail on a second compile attempt due to duplicate bound parameters.
.. change::
:tags: bug, mysql
:tickets: 3602
Fixed bug in MySQL reflection where the "fractional sections portion"
of the :class:`.mysql.DATETIME`, :class:`.mysql.TIMESTAMP` and
:class:`.mysql.TIME` types would be incorrectly placed into the
``timezone`` attribute, which is unused by MySQL, instead of the
``fsp`` attribute.
.. change::
:tags: bug, orm
:tickets: 3599
Fixed issue where post_update on a many-to-one relationship would
fail to emit an UPDATE in the case where the attribute were set to
None and not previously loaded.
.. change::
:tags: bug, sql, postgresql
:tickets: 3598
Fixed bug where CREATE TABLE with a no-column table, but a constraint
such as a CHECK constraint would render an erroneous comma in the
definition; this scenario can occur such as with a PostgreSQL
INHERITS table that has no columns of its own.
.. change::
:tags: bug, mssql
:tickets: 3585
Added the error "20006: Write to the server failed" to the list
of disconnect errors for the pymssql driver, as this has been observed
to render a connection unusable.
.. change::
:tags: bug, postgresql
:tickets: 3573
Fixed issue where the "FOR UPDATE OF" PostgreSQL-specific SELECT
modifier would fail if the referred table had a schema qualifier;
PG needs the schema name to be omitted. Pull request courtesy
Diana Clarke.
.. change::
:tags: bug, postgresql
Fixed bug where some varieties of SQL expression passed to the
"where" clause of :class:`_postgresql.ExcludeConstraint` would fail
to be accepted correctly. Pull request courtesy aisch.
.. change::
:tags: bug, orm, declarative
Fixed bug where in Py2K a unicode literal would not be accepted as the
string name of a class or other argument within declarative using
:func:`.backref` on :func:`_orm.relationship`. Pull request courtesy
Nils Philippsen.
.. change::
:tags: bug, mssql
A descriptive ValueError is now raised in the event that SQL server
returns an invalid date or time format from a DATE or TIME
column, rather than failing with a NoneType error. Pull request
courtesy Ed Avis.
.. change::
:tags: bug, py3k
Updates to internal getargspec() calls, some py36-related
fixture updates, and alterations to two iterators to "return" instead
of raising StopIteration, to allow tests to pass without
errors or warnings on Py3.5, Py3.6, pull requests courtesy
Jacob MacDonald, Luri de Silvio, and Phil Jones.
.. change::
:tags: bug, ext
:tickets: 3597
Fixed an issue in baked queries where the .get() method, used either
directly or within lazy loads, didn't consider the mapper's "get clause"
as part of the cache key, causing bound parameter mismatches if the
clause got re-generated. This clause is cached by mappers
on the fly but in highly concurrent scenarios may be generated more
than once when first accessed.
.. change::
:tags: feature, sql
Added support for parameter-ordered SET clauses in an UPDATE
statement. This feature is available by passing the
:paramref:`~.sqlalchemy.sql.expression.update.preserve_parameter_order`
flag either to the core :class:`_expression.Update` construct or alternatively
adding it to the :paramref:`.Query.update.update_args` dictionary at
the ORM-level, also passing the parameters themselves as a list of 2-tuples.
Thanks to Gorka Eguileor for implementation and tests.
.. seealso::
:ref:`tutorial_parameter_ordered_updates`
.. change::
:tags: bug, orm
:tickets: 3593
Fixed bug which is actually a regression that occurred between
versions 0.8.0 and 0.8.1, due :ticket:`2714`. The case where
joined eager loading needs to join out over a subclass-bound
relationship when "with_polymorphic" were also used would fail
to join from the correct entity.
.. change::
:tags: bug, orm
:tickets: 3592
Fixed joinedload bug which would occur when a. the query includes
limit/offset criteria that forces a subquery b. the relationship
uses "secondary" c. the primaryjoin of the relationship refers to
a column that is either not part of the primary key, or is a PK
col in a joined-inheritance subclass table that is under a different
attribute name than the parent table's primary key column d. the
query defers the columns that are present in the primaryjoin, typically
via not being included in load_only(); the necessary column(s) would
not be present in the subquery and produce invalid SQL.
.. change::
:tags: bug, orm
:tickets: 2696
A rare case which occurs when a :meth:`.Session.rollback` fails in the
scope of a :meth:`.Session.flush` operation that's raising an
exception, as has been observed in some MySQL SAVEPOINT cases, prevents
the original database exception from being observed when it was
emitted during flush, but only on Py2K because Py2K does not support
exception chaining; on Py3K the originating exception is chained. As
a workaround, a warning is emitted in this specific case showing at
least the string message of the original database error before we
proceed to raise the rollback-originating exception.
.. change::
:tags: bug, postgresql
:tickets: 3571
Fixed the ``.python_type`` attribute of :class:`_postgresql.INTERVAL`
to return ``datetime.timedelta`` in the same way as that of
:obj:`.types.Interval.python_type`, rather than raising
``NotImplementedError``.
.. change::
:tags: bug, mssql
Fixed issue where DDL generated for the MSSQL types DATETIME2,
TIME and DATETIMEOFFSET with a precision of "zero" would not generate
the precision field. Pull request courtesy Jacobo de Vera.
.. changelog::