gives application developers the full power and flexibility of SQL.
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.
|
2024-06-19 11:49:58 by Adam Ciarcinski | Files touched by this commit (3) |  |
Log message:
py-sqlalchemy: updated to 2.0.31
2.0.31
Released: June 18, 2024
general
[general] [bug]
Set up full Python 3.13 support to the extent currently possible, repairing \
issues within internal language helpers as well as the serializer extension \
module.
orm
[orm] [usecase]
Added missing parameter with_polymorphic.name that allows specifying the name of \
returned AliasedClass.
[orm] [bug]
Fixed issue where a MetaData collection would not be serializable, if an Enum or \
Boolean datatype were present which had been adapted. This specific scenario in \
turn could occur when using the Enum or Boolean within ORM Annotated Declarative \
form where type objects frequently get copied.
[orm] [bug]
Fixed issue where the selectinload() and subqueryload() loader options would \
fail to take effect when made against an inherited subclass that itself included \
a subclass-specific Mapper.with_polymorphic setting.
[orm] [bug]
Fixed very old issue involving the joinedload.innerjoin parameter where making \
use of this parameter mixed into a query that also included joined eager loads \
along a self-referential or other cyclical relationship, along with complicating \
factors like inner joins added for secondary tables and such, would have the \
chance of splicing a particular inner join to the wrong part of the query. \
Additional state has been added to the internal method that does this splice to \
make a better decision as to where splicing should proceed.
[orm] [bug] [regression]
Fixed bug in ORM Declarative where the __table__ directive could not be declared \
as a class function with declared_attr() on a superclass, including an \
__abstract__ class as well as coming from the declarative base itself. This was \
a regression since 1.4 where this was working, and there were apparently no \
tests for this particular use case.
sql
[sql] [bug]
Fixed issue when serializing an over() clause with unbounded range or rows.
[sql] [bug]
Added missing methods FunctionFilter.within_group() and WithinGroup.filter()
[sql] [bug]
Fixed bug in FunctionFilter.filter() that would mutate the existing function \
in-place. It now behaves like the rest of the SQLAlchemy API, returning a new \
instance instead of mutating the original one.
schema
[schema] [usecase]
Added Column.insert_default as an alias of Column.default for compatibility with \
mapped_column().
mysql
[mysql] [usecase] [reflection]
Added missing foreign key reflection option SET DEFAULT in the MySQL and MariaDB \
dialects. Pull request courtesy of Quentin Roche.
|
2024-04-02 20:11:22 by Adam Ciarcinski | Files touched by this commit (2) |  |
Log message:
py-sqlalchemy: updated to 2.0.29
2.0.29
Released: March 23, 2024
orm
[orm] [usecase]
Added support for the PEP 695 TypeAliasType construct as well as the python 3.12 \
native type keyword to work with ORM Annotated Declarative form when using these \
constructs to link to a PEP 593 Annotated container, allowing the resolution of \
the Annotated to proceed when these constructs are used in a Mapped typing \
container.
[orm] [bug]
Fixed Declarative issue where typing a relationship using Relationship rather \
than Mapped would inadvertently pull in the “dynamic” relationship loader \
strategy for that attribute.
[orm] [bug]
Fixed issue in ORM annotated declarative where using mapped_column() with an \
mapped_column.index or mapped_column.unique setting of False would be overridden \
by an incoming Annotated element that featured that parameter set to True, even \
though the immediate mapped_column() element is more specific and should take \
precedence. The logic to reconcile the booleans has been enhanced to accommodate \
a local value of False as still taking precedence over an incoming True value \
from the annotated element.
[orm] [bug] [regression]
Fixed regression from version 2.0.28 caused by the fix for 11085 where the newer \
method of adjusting post-cache bound parameter values would interefere with the \
implementation for the subqueryload() loader option, which has some more legacy \
patterns in use internally, when the additional loader criteria feature were \
used with this loader option.
engine
[engine] [bug]
Fixed issue in “Insert Many Values” Behavior for INSERT statements feature \
where using a primary key column with an “inline execute” default generator \
such as an explicit Sequence with an explcit schema name, while at the same time \
using the Connection.execution_options.schema_translate_map feature would fail \
to render the sequence or the parameters properly, leading to errors.
[engine] [bug]
Made a change to the adjustment made in version 2.0.10 for 9618, which added the \
behavior of reconciling RETURNING rows from a bulk INSERT to the parameters that \
were passed to it. This behavior included a comparison of already-DB-converted \
bound parameter values against returned row values that was not always \
“symmetrical” for SQL column types such as UUIDs, depending on specifics of \
how different DBAPIs receive such values versus how they return them, \
necessitating the need for additional “sentinel value resolver” methods on \
these column types. Unfortunately this broke third party column types such as \
UUID/GUID types in libraries like SQLModel which did not implement this special \
method, raising an error “Can’t match sentinel values in result set to \
parameter sets”. Rather than attempt to further explain and document this \
implementation detail of the “insertmanyvalues” feature including a public \
version of the new method, the approach is intead revised to
no longer need this extra conversion step, and the logic that does the \
comparison now works on the pre-converted bound parameter value compared to the \
post-result-processed value, which should always be of a matching datatype. In \
the unusual case that a custom SQL column type that also happens to be used in a \
“sentinel” column for bulk INSERT is not receiving and returning the same \
value type, the “Can’t match” error will be raised, however the mitigation \
is straightforward in that the same Python datatype should be passed as that \
returned.
sql
[sql] [bug] [regression]
Fixed regression from the 1.4 series where the refactor of the \
TypeEngine.with_variant() method introduced at “with_variant()” clones the \
original TypeEngine rather than changing the type failed to accommodate for the \
.copy() method, which will lose the variant mappings that are set up. This \
becomes an issue for the very specific case of a “schema” type, which \
includes types such as Enum and ARRAY, when they are then used in the context of \
an ORM Declarative mapping with mixins where copying of types comes into play. \
The variant mapping is now copied as well.
typing
[typing] [bug]
Fixed typing issue allowing asyncio run_sync() methods to correctly type the \
parameters according to the callable that was passed, making use of PEP 612 \
ParamSpec variables. Pull request courtesy Francisco R. Del Roio.
postgresql
[postgresql] [usecase]
The PostgreSQL dialect now returns DOMAIN instances when reflecting a column \
that has a domain as type. Previously, the domain data type was returned \
instead. As part of this change, the domain reflection was improved to also \
return the collation of the text types. Pull request courtesy of Thomas \
Stephenson.
tests
[tests] [bug]
Backported to SQLAlchemy 2.0 an improvement to the test suite with regards to \
how asyncio related tests are run, now using the newer Python 3.11 \
asyncio.Runner or a backported equivalent, rather than relying on the previous \
implementation based on asyncio.get_running_loop(). This should hopefully \
prevent issues with large suite runs on CPU loaded hardware where the event loop \
seems to become corrupted, leading to cascading failures.
|
2024-03-31 21:19:12 by Adam Ciarcinski | Files touched by this commit (2) |
Log message:
py-sqlalchemy: requires py-cython; fix PLIST; bump revision
|
2024-03-06 22:40:57 by Thomas Klausner | Files touched by this commit (3) |  |
Log message:
py-sqlalchemy: update to 2.0.28.
This is a major new version, lots of code cleanups and
adaptations to work better with Python 3.
|