github sqlalchemy/sqlalchemy rel_1_4_5
1.4.5

latest releases: rel_2_0_30, rel_2_0_29, rel_2_0_28...
3 years ago

1.4.5

Released: April 2, 2021

orm

  • [orm] [bug] [regression] Fixed regression where the _orm.joinedload() loader strategy would
    not successfully joinedload to a mapper that is mapper against a
    CTE construct.

    References: #6172

  • [orm] [bug] [regression] Scaled back the warning message added in #5171 to not warn for
    overlapping columns in an inheritance scenario where a particular
    relationship is local to a subclass and therefore does not represent an
    overlap.

    References: #6171

sql

  • [sql] [bug] [postgresql] Fixed bug in new _functions.FunctionElement.render_derived() feature
    where column names rendered out explicitly in the alias SQL would not have
    proper quoting applied for case sensitive names and other non-alphanumeric
    names.

    References: #6183

  • [sql] [bug] [regression] Fixed regression where use of the Operators.in_() method with a
    _sql.Select object against a non-table-bound column would produce
    an AttributeError, or more generally using a _sql.ScalarSelect
    that has no datatype in a binary expression would produce invalid state.

    References: #6181

  • [sql] [bug] Added a new flag to the _engine.Dialect class called
    _engine.Dialect.supports_statement_cache. This flag now needs to be present
    directly on a dialect class in order for SQLAlchemy's
    query cache <sql_caching> to take effect for that dialect. The
    rationale is based on discovered issues such as #6173 revealing
    that dialects which hardcode literal values from the compiled statement,
    often the numerical parameters used for LIMIT / OFFSET, will not be
    compatible with caching until these dialects are revised to use the
    parameters present in the statement only. For third party dialects where
    this flag is not applied, the SQL logging will show the message "dialect
    does not support caching", indicating the dialect should seek to apply this
    flag once they have verified that no per-statement literal values are being
    rendered within the compilation phase.

    References: #6184

schema

  • [schema] [bug] Introduce a new parameter _types.Enum.omit_aliases in
    _types.Enum type allow filtering aliases when using a pep435 Enum.
    Previous versions of SQLAlchemy kept aliases in all cases, creating
    database enum type with additional states, meaning that they were treated
    as different values in the db. For backward compatibility this flag
    defaults to False in the 1.4 series, but will be switched to True
    in a future version. A deprecation warning is raise if this flag is not
    specified and the passed enum contains aliases.

    References: #6146

mypy

  • [mypy] [bug] Fixed issue in mypy plugin where newly added support for
    _orm.as_declarative() needed to more fully add the
    DeclarativeMeta class to the mypy interpreter's state so that it does
    not result in a name not found error; additionally improves how global
    names are setup for the plugin including the Mapped name.

    References: #sqlalchemy/sqlalchemy2-stubs/#14

asyncio

  • [asyncio] [bug] Fixed issue where the asyncio extension could not be loaded
    if running Python 3.6 with the backport library of
    contextvars installed.

    References: #6166

postgresql

  • [postgresql] [bug] [regression] Fixed regression caused by #6023 where the PostgreSQL cast
    operator applied to elements within an _types.ARRAY when using
    psycopg2 would fail to use the correct type in the case that the datatype
    were also embedded within an instance of the _types.Variant
    adapter.

    Additionally, repairs support for the correct CREATE TYPE to be emitted
    when using a Variant(ARRAY(some_schema_type)).

    This change is also backported to: 1.3.25

    References: #6182

  • [postgresql] [bug] Fixed typo in the fix for #6099 released in 1.4.4 that completely
    prevented this change from working correctly, i.e. the error message did not match
    what was actually emitted by pg8000.

    References: #6099

  • [postgresql] [bug] Fixed issue where the PostgreSQL PGInspector, when generated
    against an _engine.Engine, would fail for .get_enums(),
    .get_view_names(), .get_foreign_table_names() and
    .get_table_oid() when used against a "future" style engine and not the
    connection directly.

    References: #6170

mysql

  • [mysql] [bug] [regression] Fixed regression in the MySQL dialect where the reflection query used to
    detect if a table exists would fail on very old MySQL 5.0 and 5.1 versions.

    References: #6163

mssql

  • [mssql] [bug] Fixed a regression in MSSQL 2012+ that prevented the order by clause
    to be rendered when offset=0 is used in a subquery.

    References: #6163

oracle

  • [oracle] [bug] [regression] Fixed critical regression where the Oracle compiler would not maintain the
    correct parameter values in the LIMIT/OFFSET for a select due to a caching
    issue.

    References: #6173

Don't miss a new sqlalchemy release

NewReleases is sending notifications on new releases.