- Switch documentation to be within the main package.
- Update to 2.0.15
# orm
* As more projects are using new-style “2.0” ORM querying, it’s
becoming apparent that the conditional nature of “autoflush”,
being based on whether or not the given statement refers to ORM
entities, is becoming more of a key behavior. Up until now, the
“ORM” flag for a statement has been loosely based around
whether or not the statement returns rows that correspond to
ORM entities or columns; the original purpose of the “ORM” flag
was to enable ORM-entity fetching rules which apply
post-processing to Core result sets as well as ORM loader
strategies to the statement. For statements that don’t build on
rows that contain ORM entities, the “ORM” flag was considered
to be mostly unnecessary.
* It still may be the case that “autoflush” would be better
taking effect for all usage of Session.execute() and related
methods, even for purely Core SQL constructs. However, this
still could impact legacy cases where this is not expected and
may be more of a 2.1 thing. For now however, the rules for the
“ORM-flag” have been opened up so that a statement that
includes ORM entities or attributes anywhere within, including
in the WHERE / ORDER BY / GROUP BY clause alone, within scalar
subqueries, etc. will enable this flag. This will cause
“autoflush” to occur for such statements and also be visible
via the ORMExecuteState.is_orm_statement event-level attribute.
References: #9805
# postgresql
* Repaired the base Uuid datatype for the PostgreSQL dialect to
OBS-URL: https://build.opensuse.org/request/show/1089853
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-SQLAlchemy?expand=0&rev=107
- 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