2.0.28
2.0.28
Released: March 4, 2024
orm
-
[orm] [performance] [bug] [regression] Adjusted the fix made in #10570, released in 2.0.23, where new
logic was added to reconcile possibly changing bound parameter values
across cache key generations used within the_orm.with_expression()
construct. The new logic changes the approach by which the new bound
parameter values are associated with the statement, avoiding the need to
deep-copy the statement which can result in a significant performance
penalty for very deep / complex SQL constructs. The new approach no longer
requires this deep-copy step.References: #11085
-
[orm] [bug] [regression] Fixed regression caused by #9779 where using the "secondary" table
in a relationshipand_()
expression would fail to be aliased to match
how the "secondary" table normally renders within a
_sql.Select.join()
expression, leading to an invalid query.References: #11010
engine
-
[engine] [usecase] Added new core execution option
_engine.Connection.execution_options.preserve_rowcount
. When
set, thecursor.rowcount
attribute from the DBAPI cursor will be
unconditionally memoized at statement execution time, so that whatever
value the DBAPI offers for any kind of statement will be available using
the_engine.CursorResult.rowcount
attribute from the
_engine.CursorResult
. This allows the rowcount to be accessed for
statments such as INSERT and SELECT, to the degree supported by the DBAPI
in use. Theengine_insertmanyvalues
also supports this option and
will ensure_engine.CursorResult.rowcount
is correctly set for a
bulk INSERT of rows when set.References: #10974
asyncio
-
[asyncio] [bug] An error is raised if a
QueuePool
or other non-asyncio pool class
is passed to_asyncio.create_async_engine()
. This engine only
accepts asyncio-compatible pool classes including
AsyncAdaptedQueuePool
. Other pool classes such as
NullPool
are compatible with both synchronous and asynchronous
engines as they do not perform any locking.References: #8771
tests
- [tests] [change] pytest support in the tox.ini file has been updated to support pytest 8.1.