Path to this page:
Subject: CVS commit: pkgsrc/databases/py-sqlalchemy
From: Adam Ciarcinski
Date: 2025-01-22 09:19:30
Message id: 20250122081931.07DB9FBDF@cvs.NetBSD.org
Log Message:
py-sqlalchemy: updated to 2.0.37
2.0.37
Released: January 9, 2025
orm
[orm] [bug]
Fixed issue regarding Union types that would be present in the \
registry.type_annotation_map of a registry or declarative base class, where a \
Mapped element that included one of the subtypes present in that Union would be \
matched to that entry, potentially ignoring other entries that matched exactly. \
The correct behavior now takes place such that an entry should only match in \
registry.type_annotation_map exactly, as a Union type is a self-contained type. \
For example, an attribute with Mapped[float] would previously match to a \
registry.type_annotation_map entry Union[float, Decimal]; this will no longer \
match and will now only match to an entry that states float. Pull request \
courtesy Frazer McLean.
[orm] [bug]
Fixed bug in how type unions were handled within registry.type_annotation_map as \
well as Mapped that made the lookup behavior of a | b different from that of \
Union[a, b].
[orm] [bug]
Consistently handle TypeAliasType (defined in PEP 695) obtained with the type X \
= int syntax introduced in python 3.12. Now in all cases one such alias must be \
explicitly added to the type map for it to be usable inside Mapped. This change \
also revises the approach added in 11305, now requiring the TypeAliasType to be \
added to the type map. Documentation on how unions and type alias types are \
handled by SQLAlchemy has been added in the Customizing the Type Map section of \
the documentation.
[orm] [bug]
Fixed regression caused by an internal code change in response to recent Mypy \
releases that caused the very unusual case of a list of ORM-mapped attribute \
expressions passed to ColumnOperators.in_() to no longer be accepted.
[orm] [bug]
Fixed issues in type handling within the registry.type_annotation_map feature \
which prevented the use of unions, using either pep-604 or Union syntaxes under \
future annotations mode, which contained multiple generic types as elements from \
being correctly resolvable.
[orm] [bug]
Fixed issue in event system which prevented an event listener from being \
attached and detached from multiple class-like objects, namely the sessionmaker \
or scoped_session targets that assign to Session subclasses.
sql
[sql] [bug]
Fixed issue in “lambda SQL” feature where the tracking of bound parameters \
could be corrupted if the same lambda were evaluated across multiple compile \
phases, including when using the same lambda across multiple engine instances or \
with statement caching disabled.
postgresql
[postgresql] [usecase]
The Range type now supports Range.__contains__(). Pull request courtesy of \
Frazer McLean.
[postgresql] [bug]
Fixes issue in Dialect.get_multi_indexes() in the PostgreSQL dialect, where an \
error would be thrown when attempting to use alembic with a vector index from \
the pgvecto.rs extension.
[postgresql] [bug]
Fixed issue where creating a table with a primary column of SmallInteger and \
using the asyncpg driver would result in the type being compiled to SERIAL \
rather than SMALLSERIAL.
[postgresql] [bug]
Adjusted the asyncpg dialect so that an empty SQL string, which is valid for \
PostgreSQL server, may be successfully processed at the dialect level, such as \
when using Connection.exec_driver_sql(). Pull request courtesy Andrew Jackson.
mysql
[mysql] [usecase] [mariadb]
Added support for the LIMIT clause with DELETE for the MySQL and MariaDB \
dialects, to complement the already present option for UPDATE. The \
Delete.with_dialect_options() method of the delete() construct accepts \
parameters for mysql_limit and mariadb_limit, allowing users to specify a limit \
on the number of rows deleted. Pull request courtesy of Pablo Nicolás Estevez.
[mysql] [bug] [mariadb]
Added logic to ensure that the mysql_limit and mariadb_limit parameters of \
Update.with_dialect_options() and Delete.with_dialect_options() when compiled to \
string will only compile if the parameter is passed as an integer; a ValueError \
is raised otherwise.
mariadb
[mariadb] [usecase]
Added sql types INET4 and INET6 in the MariaDB dialect. Pull request courtesy \
Adam Žurek.
sqlite
[sqlite] [usecase]
Added SQLite table option to enable STRICT tables. Pull request courtesy of \
Guilherme Crocetti.
oracle
[oracle] [feature]
Added new table option oracle_tablespace to specify the TABLESPACE option when \
creating a table in Oracle. This allows users to define the tablespace in which \
the table should be created. Pull request courtesy of Miguel Grillo.
[oracle] [usecase]
Use the connection attribute max_identifier_length available in oracledb since \
version 2.5 when determining the identifier length in the Oracle dialect.
[oracle] [bug]
Fixed compilation of TABLE function when used in a FROM clause in Oracle \
Database dialect.
[oracle] [bug]
Fixed issue in oracledb / cx_oracle dialects where output type handlers for CLOB \
were being routed to NVARCHAR rather than VARCHAR, causing a double conversion \
to take place.
Files: