2.0.30
Released: May 5, 2024
orm
-
[orm] [bug] Added new attribute
_orm.ORMExecuteState.is_from_statement
to
detect statements created using_sql.Select.from_statement()
, and
enhancedFromStatement
to set_orm.ORMExecuteState.is_select
,
_orm.ORMExecuteState.is_insert
,
_orm.ORMExecuteState.is_update
, and
_orm.ORMExecuteState.is_delete
according to the element that is
sent to the_sql.Select.from_statement()
method itself.References: #11220
-
[orm] [bug] Fixed issue in
_orm.selectin_polymorphic()
loader option where
attributes defined with_orm.composite()
on a superclass would cause
an internal exception on load.References: #11291
-
[orm] [bug] [regression] Fixed regression from 1.4 where using
_orm.defaultload()
in
conjunction with a non-propagating loader like_orm.contains_eager()
would nonetheless propagate the_orm.contains_eager()
to a lazy load
operation, causing incorrect queries as this option is only intended to
come from an original load.References: #11292
-
[orm] [bug] Fixed issue in ORM Annotated Declarative where typing issue where literals
defined using PEP 695 type aliases would not work with inference of
Enum
datatypes. Pull request courtesy of Alc-Alc.References: #11305
-
[orm] [bug] Fixed issue in
_orm.selectin_polymorphic()
loader option where the
SELECT emitted would only accommodate for the child-most class among the
result rows that were returned, leading intermediary-class attributes to be
unloaded if there were no concrete instances of that intermediary-class
present in the result. This issue only presented itself for multi-level
inheritance hierarchies.References: #11327
-
[orm] [bug] Fixed issue in
_orm.Session.bulk_save_objects()
where the form of the
identity key produced when usingreturn_defaults=True
would be
incorrect. This could lead to an errors during pickling as well as identity
map mismatches.References: #11332
-
[orm] [bug] Fixed issue where attribute key names in
_orm.Bundle
would not be
correct when using ORM enabled_sql.select
vs.
_orm.Query
, when the statement contained duplicate column names.References: #11347
engine
-
[engine] [bug] Fixed issue in the
_engine.Connection.execution_options.logging_token
option,
where changing the value oflogging_token
on a connection that has
already logged messages would not be updated to reflect the new logging
token. This in particular prevented the use of
_orm.Session.connection()
to change the option on the connection,
since the BEGIN logging message would already have been emitted.References: #11210
-
[engine] [bug] Fixed issue in cursor handling which affected handling of duplicate
_sql.Column
or similar objcts in the columns clause of
_sql.select()
, both in combination with arbitary_sql.text()
clauses in the SELECT list, as well as when attempting to retrieve
_engine.Result.mappings()
for the object, which would lead to an
internal error.References: #11306
typing
-
[typing] [bug] [regression] Fixed typing regression caused by #11055 in version 2.0.29 that
addedParamSpec
to the asynciorun_sync()
methods, where using
_asyncio.AsyncConnection.run_sync()
with
_schema.MetaData.reflect()
would fail on mypy due to a mypy issue.
Pull request courtesy of Francisco R. Del Roio.References: #11200
-
[typing] [bug] Fixed issue in typing for
_orm.Bundle
where creating a nested
_orm.Bundle
structure were not allowed.
misc
-
[bug] [test] Ensure the
PYTHONPATH
variable is properly initialized when
usingsubprocess.run
in the tests.References: #11268
-
[bug] [installation] Fixed an internal class that was testing for unexpected attributes to work
correctly under upcoming Python 3.13. Pull request courtesy Edgar
Ramírez-Mondragón.References: #11334