github sqlalchemy/sqlalchemy rel_1_1_5


Released: January 17, 2017


  • [orm] [bug] Fixed bug involving joined eager loading against multiple entities
    when polymorphic inheritance is also in use which would throw
    "'NoneType' object has no attribute 'isa'". The issue was introduced
    by the fix for #3611.

    This change is also backported to: 1.0.17

    References: #3884

  • [orm] [bug] Fixed bug in subquery loading where an object encountered as an
    "existing" row, e.g. already loaded from a different path in the
    same query, would not invoke subquery loaders for unloaded attributes
    that specified this loading. This issue is in the same area
    as that of #3431, #3811 which involved
    similar issues with joined loading.

    References: #3854

  • [orm] [bug] The Session.no_autoflush context manager now ensures that
    the autoflush flag is reset within a "finally" block, so that if
    an exception is raised within the block, the state still resets
    appropriately. Pull request courtesy Emin Arakelian.

  • [orm] [bug] Fixed bug where the single-table inheritance query criteria would not
    be inserted into the query in the case that the Bundle
    construct were used as the selection criteria.

    References: #3874

  • [orm] [bug] Fixed bug related to #3177, where a UNION or other set operation
    emitted by a Query would apply "single-inheritance" criteria
    to the outside of the union (also referencing the wrong selectable),
    even though this criteria is now expected to
    be already present on the inside subqueries. The single-inheritance
    criteria is now omitted once union() or another set operation is
    called against Query in the same way as Query.from_self().

    References: #3856


  • [engine] [bug] The "extend_existing" option of Table reflection would
    cause indexes and constraints to be doubled up in the case that the parameter
    were used with MetaData.reflect() (as the automap extension does)
    due to tables being reflected both within the foreign key path as well
    as directly. A new de-duplicating set is passed through within the
    MetaData.reflect() sequence to prevent double reflection in this

    References: #3861


  • [sql] [bug] Fixed bug originally introduced in 0.9 via #1068 where
    order_by() would order by the label name based on name
    alone, that is, even if the labeled expression were not at all the same
    expression otherwise present, implicitly or explicitly, in the
    selectable. The logic that orders by label now ensures that the
    labeled expression is related to the one that resolves to that name
    before ordering by the label name; additionally, the name has to
    resolve to an actual label explicit in the expression elsewhere, not
    just a column name. This logic is carefully kept separate from the
    order by(textual name) feature that has a slightly different purpose.

  • [sql] [bug] Fixed 1.1 regression where "import *" would not work for
    sqlalchemy.sql.expression, due to mis-spelled any_ and all_

    References: #3878

  • [sql] [bg] Fixed bug where literal_binds compiler flag was not honored by the
    Insert construct for the "multiple values" feature; the
    subsequent values are now rendered as literals.

    References: #3880

  • [sql] [bug] The engine URL embedded in the exception for "could not reflect"
    in MetaData.reflect() now conceals the password; also
    the __repr__ for TLEngine now acts like that of
    Engine, concealing the URL password. Pull request courtesy
    Valery Yundin.

  • [sql] [bug] Fixed issue in Variant where the "right hand coercion" logic,
    inherited from TypeDecorator, would
    coerce the right-hand side into the Variant itself, rather than
    what the default type for the Variant would do. In the
    case of Variant, we want the type to act mostly like the base
    type so the default logic of TypeDecorator is now overridden
    to fall back to the underlying wrapped type's logic. Is mostly relevant
    for JSON at the moment.

    References: #3859


  • [postgresql] [bug] Fixed bug in new "ON CONFLICT DO UPDATE" feature where the "set"
    values for the UPDATE clause would not be subject to type-level
    processing, as normally takes effect to handle both user-defined
    type level conversions as well as dialect-required conversions, such
    as those required for JSON datatypes. Additionally, clarified that
    the keys in the set_ dictionary should match the "key" of the
    column, if distinct from the column name. A warning is emitted
    for remaining column names that don't match column keys; for
    compatibility reasons, these are emitted as they were previously.

    References: #3888

  • [postgresql] [bug] The postgresql.TIME and postgresql.TIMESTAMP
    datatypes now support a setting of zero for "precision"; previously
    a zero would be ignored. Pull request courtesy Ionuț Ciocîrlan.


  • [mysql] [feature] Added a new parameter mysql_prefix supported by the Index
    construct, allows specification of MySQL-specific prefixes such as
    "FULLTEXT". Pull request courtesy Joseph Schorr.

  • [mysql] [bug] The MySQL dialect now will not warn when a reflected column has a
    "COMMENT" keyword on it, but note however the comment is not yet
    reflected; this is on the roadmap for a future release. Pull request
    courtesy Lele Long.

    References: #3867


  • [mssql] [bug] Fixed bug where SQL Server dialects would attempt to select the
    last row identity for an INSERT from SELECT, failing in the case when
    the SELECT has no rows. For such a statement,
    the inline flag is set to True indicating no last primary key
    should be fetched.

    References: #3876


  • [oracle] [bug] [postgresql] Fixed bug where an INSERT from SELECT where the source table contains
    an autoincrementing Sequence would fail to compile correctly.

    References: #3877

  • [oracle] [bug] Fixed bug where the "COMPRESSION" keyword was used in the ALL_TABLES
    query on Oracle 9.2; even though Oracle docs state table compression
    was introduced in 9i, the actual column is not present until

    References: #3875


  • [firebird] [bug] Ported the fix for Oracle quoted-lowercase names to Firebird, so that
    a table name that is quoted as lower case can be reflected properly
    including when the table name comes from the get_table_names()
    inspection function.

    References: #3548


  • [bug] [py3k] Fixed Python 3.6 DeprecationWarnings related to escaped strings without
    the 'r' modifier, and added test coverage for Python 3.6.

    This change is also backported to: 1.0.17

    References: #3886

  • [bug] [examples] Fixed two issues with the versioned_history example, one is that
    the history table now gets autoincrement=False to avoid 1.1's new
    errors regarding composite primary keys with autoincrement; the other
    is that the sqlite_autoincrement flag is now used to ensure on SQLite,
    unique identifiers are used for the lifespan of a table even if
    some rows are deleted. Pull request courtesy Carlos García Montoro.

    References: #3872

latest releases: rel_1_3_20, rel_1_3_19, rel_1_3_18...
14 months ago