| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Upgrade to release 1.4.6:
orm:
- Fixed regression where a deprecated form of Query.join() were
used, passing a series of entities to join from without any ON
clause in a single Query.join() call, would fail to function
correctly.
- Fixed critical regression where the Query.yield_per() method in
the ORM would set up the internal Result to yield chunks at a
time, however made use of the new Result.unique() method which
uniques across the entire result.
sql:
- Fixed further regressions in the same area as that of #6173
released in 1.4.5, where a “postcompile” parameter, again most
typically those used for LIMIT/OFFSET rendering in Oracle and
SQL Server, would fail to be processed correctly if the same
parameter rendered in multiple places in the statement.
- Executing a Subquery using Connection.execute() is deprecated
and will emit a deprecation warning; this use case was an
oversight that should have been removed from 1.4.
schema:
- The Table object now raises an informative error message if it
is instantiated without passing at least the Table.name and
Table.metadata arguments positionally. Previously, if these were
passed as keyword arguments, the object would silently fail to
initialize correctly.
mypy:
- Applied a series of refactorings and fixes to accommodate for
Mypy "incremental" mode across multiple files, which previously
was not taken into account. In this mode the Mypy plugin has to
accommodate Python datatypes expressed in other files coming in
with less information than they have on a direct run.
- Fixed issue where the Mypy plugin would fail to interpret the
"collection_class" of a relationship if it were a callable and
not a class. Also improved type matching and error reporting for
collection-oriented relationships.
asyncio:
- Added accessors .sqlstate and synonym .pgcode to the .orig
attribute of the SQLAlchemy exception class raised by the
asyncpg DBAPI adapter, that is, the intermediary exception
object that wraps on top of that raised by the asyncpg
library itself, but below the level of the SQLAlchemy dialect.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
(cherry picked from commit b649e45ab1f87346c535ef77052343594391bd39)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
|
|
|
Upgrade to release 1.4.5:
orm:
- Fixed regression where the joinedload() loader strategy would
not successfully joinedload to a mapper that is mapper against
a CTE construct.
- 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.
sql:
- Fixed bug in new 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.
- Fixed regression where use of the Operators.in_() method with a
Select object against a non-table-bound column would produce an
AttributeError, or more generally using a ScalarSelect that has
no datatype in a binary expression would produce invalid state.
- Added a new flag to the Dialect class called
Dialect.supports_statement_cache. This flag now needs to be
present directly on a dialect class in order for SQLAlchemy's
query cache 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
iwithin the compilation phase.
schema:
- Introduce a new parameter Enum.omit_aliases in 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
iflag is not specified and the passed enum contains aliases.
mypy:
- Fixed issue in mypy plugin where newly added support for
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.
asyncio:
- Fixed issue where the asyncio extension could not be loaded if
running Python 3.6 with the backport library of contextvars
installed.
postgresql:
- Fixed regression where the PostgreSQL cast operator applied to
elements within an 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 Variant adapter.
- Fixed typo in the fix 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.
- Fixed issue where the PostgreSQL PGInspector, when generated
against an 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.
mysql:
- 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.
mssql:
- Fixed a regression in MSSQL 2012+ that prevented the order by
clause to be rendered when offset=0 is used in a subquery.
oracle:
- 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.
Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
(cherry picked from commit b8230b6a66018b370fdae7e32e7e5286234afe78)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
|