2.0.39
Released: March 11, 2025
orm
-
[orm] [bug] Fixed bug where using DML returning such as
Insert.returning()
with an ORM model that has_orm.column_property()
constructs that contain subqueries would fail with an internal error.References: #12326
-
[orm] [bug] Fixed bug in ORM enabled UPDATE (and theoretically DELETE) where using a multi-table DML statement would not allow ORM mapped columns from mappers other than the primary UPDATE mapper to be named in the RETURNING clause; they would be omitted instead and cause a column not found exception.
References: #12328
-
[orm] [bug] Fixed issue where the "is ORM" flag of a
select()
or other ORM statement would not be propagated to the ORMSession
based on a multi-part operator expression alone, e.g. such asCls.attr + Cls.attr + Cls.attr
or similar, leading to ORM behaviors not taking place for such statements.References: #12357
-
[orm] [bug] Fixed issue where using
_orm.aliased()
around aCTE
construct could cause inappropriate "duplicate CTE" errors in cases where that aliased construct appeared multiple times in a single statement.References: #12364
sql
-
[sql] [bug] Added new parameters
AddConstraint.isolate_from_table
andDropConstraint.isolate_from_table
, defaulting to True, which both document and allow to be controllable the long-standing behavior of these two constructs blocking the given constraint from being included inline within the "CREATE TABLE" sequence, under the assumption that separate add/drop directives were to be used.References: #12382
typing
-
[typing] [usecase] Support generic types for compound selects (
_sql.union()
,_sql.union_all()
,_sql.Select.union()
,_sql.Select.union_all()
, etc) returning the type of the first select. Pull request courtesy of Mingyu Park.References: #11922
asyncio
-
[asyncio] [bug] Fixed bug where
_asyncio.AsyncResult.scalar()
,_asyncio.AsyncResult.scalar_one_or_none()
, and_asyncio.AsyncResult.scalar_one()
would raise anAttributeError
due to a missing internal attribute. Pull request courtesy Allen Ho.References: #12338
postgresql
-
[postgresql] [bug] Add SQL typing to reflection query used to retrieve a the structure of IDENTITY columns, adding explicit JSON typing to the query to suit unusual PostgreSQL driver configurations that don't support JSON natively.
References: #11751
-
[postgresql] [bug] Fixed issue affecting PostgreSQL 17.3 and greater where reflection of domains with "NOT NULL" as part of their definition would include an invalid constraint entry in the data returned by
_postgresql.PGInspector.get_domains()
corresponding to an additional "NOT NULL" constraint that isn't a CHECK constraint; the existing"nullable"
entry in the dictionary already indicates if the domain includes a "not null" constraint. Note that such domains also cannot be reflected on PostgreSQL 17.0 through 17.2 due to a bug on the PostgreSQL side; if encountering errors in reflection of domains which include NOT NULL, upgrade to PostgreSQL server 17.3 or greater. -
[postgresql] [bug] Fixed issue in PostgreSQL network types
_postgresql.INET
,_postgresql.CIDR
,_postgresql.MACADDR
,_postgresql.MACADDR8
where sending string values to compare to these types would render an explicit CAST to VARCHAR, causing some SQL / driver combinations to fail. Pull request courtesy Denis Laxalde.References: #12060
-
[postgresql] [bug] Fixed compiler issue in the PostgreSQL dialect where incorrect keywords would be passed when using "FOR UPDATE OF" inside of a subquery.
References: #12417
sqlite
-
[sqlite] [bug] Fixed issue that omitted the comma between multiple SQLite table extension clauses, currently
WITH ROWID
andSTRICT
, when both optionsTable.sqlite_with_rowid
andTable.sqlite_strict
were configured at their non-default settings at the same time. Pull request courtesy david-fed.References: #12368