- update to version 1.4.42:
* orm
+ The Session.execute.bind_arguments dictionary is no longer
mutated when passed to Session.execute() and similar; instead,
it’s copied to an internal dictionary for state changes. Among
other things, this fixes and issue where the “clause” passed to
the Session.get_bind() method would be incorrectly referring to
the Select construct used for the “fetch” synchronization
strategy, when the actual query being emitted was a Delete or
Update. This would interfere with recipes for “routing
sessions”. References: #8614
+ A warning is emitted in ORM configurations when an explicit
remote() annotation is applied to columns that are local to the
immediate mapped class, when the referenced class does not
include any of the same table columns. Ideally this would raise
an error at some point as it’s not correct from a mapping point
of view. References: #7094
+ A warning is emitted when attempting to configure a mapped class
within an inheritance hierarchy where the mapper is not given
any polymorphic identity, however there is a polymorphic
discriminator column assigned. Such classes should be abstract
if they never intend to load directly. References: #7545
+ Fixed regression for 1.4 in contains_eager() where the “wrap in
subquery” logic of joinedload() would be inadvertently triggered
for use of the contains_eager() function with similar statements
(e.g. those that use distinct(), limit() or offset()), which
would then lead to secondary issues with queries that used some
combinations of SQL label names and aliasing. This “wrapping” is
not appropriate for contains_eager() which has always had the
contract that the user-defined SQL statement is unmodified with
OBS-URL: https://build.opensuse.org/request/show/1030996
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-SQLAlchemy?expand=0&rev=101
- update to 1.4.41:
* Fixed issue where use of the :func:`_sql.table` construct, passing a string
for the :paramref:`_sql.table.schema` parameter, would fail to take the
"schema" string into account when producing a cache key, thus leading to
caching collisions if multiple, same-named :func:`_sql.table` constructs
with different schemas were used.
* Fixed event listening issue where event listeners added to a superclass
would be lost if a subclass were created which then had its own listeners
associated. The practical example is that of the :class:`.sessionmaker`
class created after events have been associated with the
:class:`_orm.Session` class.
* Hardened the cache key strategy for the :func:`_orm.aliased` and
:func:`_orm.with_polymorphic` constructs. While no issue involving actual
statements being cached can easily be demonstrated (if at all), these two
constructs were not including enough of what makes them unique in their
cache keys for caching on the aliased construct alone to be accurate.
* Fixed regression appearing in the 1.4 series where a joined-inheritance
query placed as a subquery within an enclosing query for that same entity
would fail to render the JOIN correctly for the inner query. The issue
manifested in two different ways prior and subsequent to version 1.4.18
(related issue 🎫`6595`), in one case rendering JOIN twice, in the
other losing the JOIN entirely. To resolve, the conditions under which
"polymorphic loading" are applied have been scaled back to not be invoked
for simple joined inheritance queries.
* Fixed issue in :mod:`sqlalchemy.ext.mutable` extension where collection
links to the parent object would be lost if the object were merged with
:meth:`.Session.merge` while also passing :paramref:`.Session.merge.load`
as False.
* Fixed issue involving :func:`_orm.with_loader_criteria` where a closure
variable used as bound parameter value within the lambda would not carry
OBS-URL: https://build.opensuse.org/request/show/1004264
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-SQLAlchemy?expand=0&rev=100
* Fixed issue where use of the :func:`_sql.table` construct, passing a string
for the :paramref:`_sql.table.schema` parameter, would fail to take the
"schema" string into account when producing a cache key, thus leading to
caching collisions if multiple, same-named :func:`_sql.table` constructs
with different schemas were used.
* Fixed event listening issue where event listeners added to a superclass
would be lost if a subclass were created which then had its own listeners
associated. The practical example is that of the :class:`.sessionmaker`
class created after events have been associated with the
:class:`_orm.Session` class.
* Hardened the cache key strategy for the :func:`_orm.aliased` and
:func:`_orm.with_polymorphic` constructs. While no issue involving actual
statements being cached can easily be demonstrated (if at all), these two
constructs were not including enough of what makes them unique in their
cache keys for caching on the aliased construct alone to be accurate.
* Fixed regression appearing in the 1.4 series where a joined-inheritance
query placed as a subquery within an enclosing query for that same entity
would fail to render the JOIN correctly for the inner query. The issue
manifested in two different ways prior and subsequent to version 1.4.18
(related issue 🎫`6595`), in one case rendering JOIN twice, in the
other losing the JOIN entirely. To resolve, the conditions under which
"polymorphic loading" are applied have been scaled back to not be invoked
for simple joined inheritance queries.
* Fixed issue in :mod:`sqlalchemy.ext.mutable` extension where collection
links to the parent object would be lost if the object were merged with
:meth:`.Session.merge` while also passing :paramref:`.Session.merge.load`
as False.
* Fixed issue involving :func:`_orm.with_loader_criteria` where a closure
variable used as bound parameter value within the lambda would not carry
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=217
* details on https://docs.sqlalchemy.org/en/14/changelog/changelog_14.html#change-1.4.37
* Fixed issue where using a column_property() construct containing a subquery
against an already-mapped column attribute would not correctly apply
ORM-compilation behaviors to the subquery, including that the “IN” expression
added for a single-table inherits expression would fail to be included.
* Fixed issue where ORM results would apply incorrect key names to the
returned Row objects in the case where the set of columns to be selected
were changed, such as when using Select.with_only_columns().
* Fixed bug, likely a regression from 1.3, where usage of column names that
require bound parameter escaping, more concretely when using Oracle with
column names that require quoting such as those that start with an
underscore, or in less common cases with some PostgreSQL drivers when using
column names that contain percent signs, would cause the ORM versioning
feature to not work correctly if the versioning column itself had such a
name, as the ORM assumes certain bound parameter naming conventions that
were being interfered with via the quotes. This issue is related to #8053
and essentially revises the approach towards fixing this, revising the
original issue #5653 that created the initial implementation for
generalized bound-parameter name quoting.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=211
- update to 1.4.36:
* details on https://docs.sqlalchemy.org/en/14/changelog/changelog_14.html#change-1.4.36
* Fixed regression where the change made for #7861, released in version
1.4.33, that brought the Insert construct to be partially recognized as an
ORM-enabled statement
* Modified the DeclarativeMeta metaclass to pass cls.__dict__ into the
declarative scanning process to look for attributes, rather than the
separate dictionary passed to the type’s __init__() method
* Fixed a memory leak in the C extensions which could occur when calling upon
named members of Row when the member does not exist under Python 3
* Added a warning regarding a bug which exists in the Result.columns() method
when passing 0 for the index in conjunction with a Result that will return
a single ORM entity, which indicates that the current behavior of
Result.columns() is broken in this case as the Result object will yield scalar
values and not Row objects
* Fixed bug where ForeignKeyConstraint naming conventions using the
referred_column_0 naming convention key would not work if the foreign key
constraint were set up as a ForeignKey object rather than an explicit
ForeignKeyConstraint object.
OBS-URL: https://build.opensuse.org/request/show/975001
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-SQLAlchemy?expand=0&rev=96
* details on https://docs.sqlalchemy.org/en/14/changelog/changelog_14.html#change-1.4.36
* Fixed regression where the change made for #7861, released in version
1.4.33, that brought the Insert construct to be partially recognized as an
ORM-enabled statement
* Modified the DeclarativeMeta metaclass to pass cls.__dict__ into the
declarative scanning process to look for attributes, rather than the
separate dictionary passed to the type’s __init__() method
* Fixed a memory leak in the C extensions which could occur when calling upon
named members of Row when the member does not exist under Python 3
* Added a warning regarding a bug which exists in the Result.columns() method
when passing 0 for the index in conjunction with a Result that will return
a single ORM entity, which indicates that the current behavior of
Result.columns() is broken in this case as the Result object will yield scalar
values and not Row objects
* Fixed bug where ForeignKeyConstraint naming conventions using the
referred_column_0 naming convention key would not work if the foreign key
constraint were set up as a ForeignKey object rather than an explicit
ForeignKeyConstraint object.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=209
- update to version 1.4.26:
* a repair to the workings of the update() statement in an ORM context when
used with hybrid and composite attributes.
* Fixes for the with_loader_criteria() ORM option
* adjustments to the ORM Session interface to accommodate for new API features
* some new legacy warnings for lesser used patterns with Query.join()
* SQL / ORM fixes for the use case of selecting from repeated, non-labeled
column expressions, typically the null() construct when used as a
placeholder in a UNION statement.
* For PostgreSQL, refinements to the "expanding IN" SQL feature when used
with PostgreSQL ARRAY datatypes as well as fixes for the mostly
PostgreSQL-specific any_() and all_() column methods.
* For MySQL, repaired support for new behaviors in MariaDB 10.6
* For SQL Server, reflection fixes and improvements for foreign key
constraints as well table /view detection.
OBS-URL: https://build.opensuse.org/request/show/928869
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-SQLAlchemy?expand=0&rev=89
* a repair to the workings of the update() statement in an ORM context when
used with hybrid and composite attributes.
* Fixes for the with_loader_criteria() ORM option
* adjustments to the ORM Session interface to accommodate for new API features
* some new legacy warnings for lesser used patterns with Query.join()
* SQL / ORM fixes for the use case of selecting from repeated, non-labeled
column expressions, typically the null() construct when used as a
placeholder in a UNION statement.
* For PostgreSQL, refinements to the "expanding IN" SQL feature when used
with PostgreSQL ARRAY datatypes as well as fixes for the mostly
PostgreSQL-specific any_() and all_() column methods.
* For MySQL, repaired support for new behaviors in MariaDB 10.6
* For SQL Server, reflection fixes and improvements for foreign key
constraints as well table /view detection.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=197
* Fixed regression due to 🎫`7024` where the reorganization of the
"platform machine" names used by the ``greenlet`` dependency mis-spelled
"aarch64" and additionally omitted uppercase "AMD64" as is needed for
Windows machines.
* Fixed a bug in :meth:`_asyncio.AsyncSession.execute` and
:meth:`_asyncio.AsyncSession.stream` that required ``execution_options``
to be an instance of ``immutabledict`` when defined. It now
correctly accepts any mapping.
* Improve the interface used by adapted drivers, like the asyncio ones,
to access the actual connection object returned by the driver.
* Implemented missing methods in :class:`_functions.FunctionElement` which,
while unused, would lead pylint to report them as unimplemented abstract
methods.
* Fixed an issue where :meth:`_reflection.has_table` returned
``True`` for local temporary tables that actually belonged to a
different SQL Server session (connection). An extra check is now
performed to ensure that the temp table detected is in fact owned
by the current session.
* Fixed issue where the ability of the
:meth:`_events.ConnectionEvents.before_execute` method to alter the SQL
statement object passed, returning the new object to be invoked, was
inadvertently removed. This behavior has been restored.
* Ensure that ``str()`` is called on the an
:paramref:`_url.URL.create.password` argument, allowing usage of objects
that implement the ``__str__()`` method as password attributes. Also
clarified that one such object is not appropriate to dynamically change the
password for each database connection; the approaches at
:ref:`engines_dynamic_tokens` should be used instead.
* Fixed ORM issue where column expressions passed to ``query()`` or
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=196
- update to version 1.4.20:
* orm
+ [orm] [bug] [regression] Fixed regression in ORM regarding
an internal reconstitution step for the with_polymorphic()
construct, when the user-facing object is garbage collected
as the query is processed. The reconstitution was not
ensuring the sub-entities for the “polymorphic” case were
handled, leading to an AttributeError.
References: #6680
+ [orm] [bug] [regression] Adjusted Query.union() and similar
set operations to be correctly compatible with the new
capabilities just added in #6661, with SQLAlchemy 1.4.19,
such that the SELECT statements rendered as elements of the
UNION or other set operation will include directly mapped
columns that are mapped as deferred; this both fixes a
regression involving unions with multiple levels of nesting
that would produce a column mismatch, and also allows the
undefer() option to be used at the top level of such a Query
without having to apply the option to each of the elements
within the UNION.
References: #6678
+ [orm] [bug] Adjusted the check in the mapper for a callable
object that is used as a @validates validator function or a
@reconstructor reconstruction function, to check for
“callable” more liberally such as to accommodate objects
based on fundamental attributes like __func__ and __call___,
rather than testing for MethodType / FunctionType, allowing
things like cython functions to work properly. Pull request
courtesy Miłosz Stypiński.
References: #6538
OBS-URL: https://build.opensuse.org/request/show/905719
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=194
- update to 1.4.13:
orm
* Fixed regression in selectinload loader strategy that would
cause it to cache its internal state incorrectly when handling
relationships that join across more than one column, such as
when using a composite foreign key. The invalid caching would
then cause other unrelated loader operations to fail.
References: #6410
* Fixed regression where Query.filter_by() would not work if the
lead entity were a SQL function or other expression derived
from the primary entity in question, rather than a simple
entity or column of that entity. Additionally, improved the
behavior of Select.filter_by() overall to work with column
expressions even in a non-ORM context. References: #6414
* Fixed regression where using selectinload() and subqueryload()
to load a two-level-deep path would lead to an attribute error.
References: #6419
* Fixed regression where using the noload() loader strategy in
conjunction with a “dynamic” relationship would lead to an
attribute error as the noload strategy would attempt to apply
itself to the dynamic loader. References: #6420
engine
* Restored a legacy transactional behavior that was inadvertently
removed from the Connection as it was never tested as a known
use case in previous versions, where calling upon the
Connection.begin_nested() method, when no transaction is
present, does not create a SAVEPOINT at all and instead starts
an outer transaction, returning a RootTransaction object
instead of a NestedTransaction object. This RootTransaction
then will emit a real COMMIT on the database connection when
OBS-URL: https://build.opensuse.org/request/show/890304
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=188