gives application developers the full power and flexibility of SQL.
2025-05-16 14:54:01 by Adam Ciarcinski | Files touched by this commit (3) |  |
Log message:
py-sqlalchemy: updated to 2.0.41
2.0.41
platform
[platform] [bug]
Adjusted the test suite as well as the ORM’s method of scanning classes for \
annotations to work under current beta releases of Python 3.14 (currently \
3.14.0b1) as part of an ongoing effort to support the production release of this \
Python release. Further changes to Python’s means of working with annotations \
is expected in subsequent beta releases for which SQLAlchemy’s test suite will \
need further adjustments.
engine
[engine] [bug]
The error message that is emitted when a URL cannot be parsed no longer includes \
the URL itself within the error message.
typing
[typing] [bug]
Removed __getattr__() rule from sqlalchemy/__init__.py that appeared to be \
trying to correct for a previous typographical error in the imports. This rule \
interferes with type checking and is removed.
postgresql
[postgresql] [usecase]
Added support for postgresql_include keyword argument to UniqueConstraint and \
PrimaryKeyConstraint. Pull request courtesy Denis Laxalde.
See also
PostgreSQL Constraint Options
mysql
[mysql] [bug]
Fixed regression caused by the DEFAULT rendering changes in version 2.0.40 via \
12425 where using lowercase on update in a MySQL server default would \
incorrectly apply parenthesis, leading to errors when MySQL interpreted the \
rendered DDL. Pull request courtesy Alexander Ruehe.
sqlite
[sqlite] [bug]
Fixed and added test support for some SQLite SQL functions hardcoded into the \
compiler, most notably the localtimestamp function which rendered with incorrect \
internal quoting.
oracle
[oracle] [usecase]
Added new datatype VECTOR and accompanying DDL and DQL support to fully support \
this type for Oracle Database. This change includes the base VECTOR type that \
adds new type-specific methods l2_distance, cosine_distance, inner_product as \
well as new parameters oracle_vector for the Index construct, allowing vector \
indexes to be configured, and oracle_fetch_approximate for the Select.fetch() \
clause. Pull request courtesy Suraj Shaw.
See also
VECTOR Datatype
misc
[bug] [installation]
Removed the “license classifier” from setup.cfg for SQLAlchemy 2.0, which \
eliminates loud deprecation warnings when building the package. SQLAlchemy 2.1 \
will use a full PEP 639 configuration in pyproject.toml while SQLAlchemy 2.0 \
remains using setup.cfg for setup.
|
2025-04-14 13:11:05 by Adam Ciarcinski | Files touched by this commit (3) |  |
Log message:
py-sqlalchemy: updated to 2.0.40
2.0.40
Released: March 27, 2025
orm
[orm] [bug]
Fixed regression which occurred as of 2.0.37 where the checked ArgumentError \
that’s raised when an inappropriate type or object is used inside of a Mapped \
annotation would raise TypeError with “boolean value of this clause is not \
defined” if the object resolved into a SQL expression in a boolean context, \
for programs where future annotations mode was not enabled. This case is now \
handled explicitly and a new error message has also been tailored for this case. \
In addition, as there are at least half a dozen distinct error scenarios for \
intepretation of the Mapped construct, these scenarios have all been unified \
under a new subclass of ArgumentError called MappedAnnotationError, to provide \
some continuity between these different scenarios, even though specific \
messaging remains distinct.
[orm] [bug]
Fixed regression in ORM Annotated Declarative class interpretation caused by \
typing_extension==4.13.0 that introduced a different implementation for \
TypeAliasType while SQLAlchemy assumed that it would be equivalent to the typing \
version, leading to pep-695 type annotations not resolving to SQL types as \
expected.
sql
[sql] [usecase]
Implemented support for the GROUPS frame specification in window functions by \
adding over.groups option to over() and FunctionElement.over(). Pull request \
courtesy Kaan Dikmen.
[sql] [bug]
Fixed issue in CTE constructs involving multiple DDL Insert statements with \
multiple VALUES parameter sets where the bound parameter names generated for \
these parameter sets would conflict, generating a compile time error.
[sql] [bug]
Fixed regression caused by 7471 leading to a SQL compilation issue where name \
disambiguation for two same-named FROM clauses with table aliasing in use at the \
same time would produce invalid SQL in the FROM clause with two “AS” clauses \
for the aliased table, due to double aliasing.
asyncio
[asyncio] [bug]
Fixed issue where AsyncSession.get_transaction() and \
AsyncSession.get_nested_transaction() would fail with NotImplementedError if the \
“proxy transaction” used by AsyncSession were garbage collected and needed \
regeneration.
postgresql
[postgresql] [usecase]
Added support for specifying a list of columns for SET NULL and SET DEFAULT \
actions of ON DELETE clause of foreign key definition on PostgreSQL. Pull \
request courtesy Denis Laxalde.
See also
PostgreSQL Constraint Options
[postgresql] [usecase]
When building a PostgreSQL ARRAY literal using array with an empty clauses \
argument, the array.type_ parameter is now significant in that it will be used \
to render the resulting ARRAY[] SQL expression with a cast, such as \
ARRAY[]::INTEGER. Pull request courtesy Denis Laxalde.
mysql
[mysql] [bug]
Support has been re-added for the MySQL-Connector/Python DBAPI using the \
mysql+mysqlconnector:// URL scheme. The DBAPI now works against modern MySQL \
versions as well as MariaDB versions (in the latter case it’s required to pass \
charset/collation explicitly). Note however that server side cursor support is \
disabled due to unresolved issues with this driver.
[mysql] [bug]
Fixed issue in MySQL server default reflection where a default that has spaces \
would not be correctly reflected. Additionally, expanded the rules for when to \
apply parenthesis to a server default in DDL to suit the general case of a \
default string that contains non-word characters such as spaces or operators and \
is not a string literal.
sqlite
[sqlite] [bug]
Expanded the rules for when to apply parenthesis to a server default in DDL to \
suit the general case of a default string that contains non-word characters such \
as spaces or operators and is not a string literal.
|
2025-03-12 15:32:54 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-sqlalchemy: updated to 2.0.39
2.0.39
orm
[orm] [bug]
Fixed bug where using DML returning such as Insert.returning() with an ORM model \
that has column_property() constructs that contain subqueries would fail with an \
internal error.
[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.
[orm] [bug]
Fixed issue where the “is ORM” flag of a select() or other ORM statement \
would not be propagated to the ORM Session based on a multi-part operator \
expression alone, e.g. such as Cls.attr + Cls.attr + Cls.attr or similar, \
leading to ORM behaviors not taking place for such statements.
[orm] [bug]
Fixed issue where using aliased() around a CTE construct could cause \
inappropriate “duplicate CTE” errors in cases where that aliased construct \
appeared multiple times in a single statement.
sql
[sql] [bug]
Added new parameters AddConstraint.isolate_from_table and \
DropConstraint.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.
typing
[typing] [usecase]
Support generic types for compound selects (union(), union_all(), \
Select.union(), Select.union_all(), etc) returning the type of the first select. \
Pull request courtesy of Mingyu Park.
asyncio
[asyncio] [bug]
Fixed bug where AsyncResult.scalar(), AsyncResult.scalar_one_or_none(), and \
AsyncResult.scalar_one() would raise an AttributeError due to a missing internal \
attribute. Pull request courtesy Allen Ho.
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.
[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 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 INET, CIDR, MACADDR, 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.
[postgresql] [bug]
Fixed compiler issue in the PostgreSQL dialect where incorrect keywords would be \
passed when using “FOR UPDATE OF” inside of a subquery.
sqlite
[sqlite] [bug]
Fixed issue that omitted the comma between multiple SQLite table extension \
clauses, currently WITH ROWID and STRICT, when both options \
Table.sqlite_with_rowid and Table.sqlite_strict were configured at their \
non-default settings at the same time. Pull request courtesy david-fed.
|
2025-03-04 10:31:35 by Thomas Klausner | Files touched by this commit (1) |
Log message:
py-sqlalchemy: fix wheel name with latest setuptools and depend on it
Bump PKGREVISION.
|
2025-02-07 08:14:34 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-sqlalchemy: updated to 2.0.38
2.0.38
engine
[engine] [bug]
Fixed event-related issue where invoking Engine.execution_options() on a Engine \
multiple times while making use of event-registering parameters such as \
isolation_level would lead to internal errors involving event registration.
sql
[sql] [bug]
Reorganized the internals by which the .c collection on a FromClause gets \
generated so that it is resilient against the collection being accessed in \
concurrent fashion. An example is creating a Alias or Subquery and accessing it \
as a module level variable. This impacts the Oracle dialect which uses such \
module-level global alias objects but is of general use as well.
[sql] [bug]
Fixed SQL composition bug which impacted caching where using a None value inside \
of an in_() expression would bypass the usual “expanded bind parameter” \
logic used by the IN construct, which allows proper caching to take place.
postgresql
[postgresql] [usecase] [asyncio]
Added an additional asyncio.shield() call within the connection terminate \
process of the asyncpg driver, to mitigate an issue where terminate would be \
prevented from completing under the anyio concurrency library.
[postgresql] [bug]
Adjusted the asyncpg connection wrapper so that the connection.transaction() \
call sent to asyncpg sends None for isolation_level if not otherwise set in the \
SQLAlchemy dialect/wrapper, thereby allowing asyncpg to make use of the server \
level setting for isolation_level in the absense of a client-level setting. \
Previously, this behavior of asyncpg was blocked by a hardcoded read_committed.
mariadb
[mariadb] [bug] [dml] [mysql]
Fixed a bug where the MySQL statement compiler would not properly compile \
statements where Insert.on_duplicate_key_update() was passed values that \
included ORM-mapped attributes (e.g. InstrumentedAttribute objects) as keys. \
Pull request courtesy of mingyu.
sqlite
[sqlite] [bug] [aiosqlite] [asyncio] [pool]
Changed default connection pool used by the aiosqlite dialect from NullPool to \
AsyncAdaptedQueuePool; this change should have been made when 2.0 was first \
released as the pysqlite dialect was similarly changed to use QueuePool as \
detailed in The SQLite dialect uses QueuePool for file-based databases.
|
2025-01-22 09:19:30 by Adam Ciarcinski | Files touched by this commit (2) |  |
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.
|
2024-11-11 08:29:31 by Thomas Klausner | Files touched by this commit (862) |
Log message:
py-*: remove unused tool dependency
py-setuptools includes the py-wheel functionality nowadays
|
2024-09-07 07:22:04 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-sqlalchemy: updated to 2.0.34
2.0.34
orm
[orm] [bug]
Fixed regression caused by issue 11814 which broke support for certain flavors \
of PEP 593 Annotated in the type_annotation_map when builtin types such as list, \
dict were used without an element type. While this is an incomplete style of \
typing, these types nonetheless previously would be located in the \
type_annotation_map correctly.
sqlite
[sqlite] [bug]
Fixed regression in SQLite reflection caused by 11677 which interfered with \
reflection for CHECK constraints that were followed by other kinds of \
constraints within the same table definition. Pull request courtesy Harutaka \
Kawamura.
|