- 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
* 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
- added gpg pub key for source validation
- Update to version 1.3.20
pytest_depr_from_parent.patch is obsolete again
orm
* An ArgumentError with more detail is now raised if the target
parameter for Query.join() is set to an unmapped object. Prior
to this change a less detailed AttributeError was raised. Pull
request courtesy Ramon Williams. References: #4428
* Fixed issue where using a loader option against a string attribute
name that is not actually a mapped attribute, such as a plain
Python descriptor, would raise an uninformative AttributeError;
a descriptive error is now raised. References: #4589
engine
* Fixed issue where a non-string object sent to SQLAlchemyError or a
subclass, as occurs with some third party dialects, would fail to
stringify correctly. Pull request courtesy Andrzej Bartosiński.
References: #5599
* Repaired a function-level import that was not using SQLAlchemy’s
standard late-import system within the sqlalchemy.exc module.
References: #5632
sql
* Fixed issue where the pickle.dumps() operation against Over construct
would produce a recursion overflow. References: #5644
* Fixed bug where an error was not raised in the case where a column()
were added to more than one table() at a time. This raised correctly
for the Column and Table objects. An ArgumentError is now raised when
this occurs. References: #5618
postgresql
* The psycopg2 dialect now support PostgreSQL multiple host connections,
by passing host/port combinations to the query string.
OBS-URL: https://build.opensuse.org/request/show/842694
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=176
- update to 1.3.19
* Adjusted the workings of the Mapper.all_orm_descriptors()
* The name of the virtual column used when using the AbstractConcreteBase
and ConcreteBase classes can now be customized
* Repaired an issue where the “ORDER BY” clause rendering a label name rather
than a complete expression
* The LookupError message will now provide the user with up to four possible
values that a column is constrained to via the Enum
* Fixed issue where the Connection.execution_options.schema_translate_map
feature would not take effect when the Sequence.next_value() function
for a Sequence were used in the Column.server_default parameter
and the create table DDL were emitted.
* Added a **kw argument to the DeclarativeMeta.__init__() method
OBS-URL: https://build.opensuse.org/request/show/828161
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-SQLAlchemy?expand=0&rev=78
* Adjusted the workings of the Mapper.all_orm_descriptors()
* The name of the virtual column used when using the AbstractConcreteBase
and ConcreteBase classes can now be customized
* Repaired an issue where the “ORDER BY” clause rendering a label name rather
than a complete expression
* The LookupError message will now provide the user with up to four possible
values that a column is constrained to via the Enum
* Fixed issue where the Connection.execution_options.schema_translate_map
feature would not take effect when the Sequence.next_value() function
for a Sequence were used in the Column.server_default parameter
and the create table DDL were emitted.
* Added a **kw argument to the DeclarativeMeta.__init__() method
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=172
- update to 1.3.15:
* Adjusted the error message emitted by :meth:`.Query.join` when a left hand
side can't be located that the :meth:`.Query.select_from` method is the
best way to resolve the issue. Also, within the 1.3 series, used a
deterministic ordering when determining the FROM clause from a given column
entity passed to :class:`.Query` so that the same expression is determined
each time.
* Fixed regression in 1.3.14 due to 🎫`4849` where a sys.exc_info()
call failed to be invoked correctly when a flush error would occur. Test
coverage has been added for this exception case.
* Fixed bug where a CTE of an INSERT/UPDATE/DELETE that also uses RETURNING
could then not be SELECTed from directly, as the internal state of the
compiler would try to treat the outer SELECT as a DELETE statement itself
and access nonexistent state.
* Fixed regression caused in 1.3.13 by 🎫`5056` where a refactor of the
ORM path registry system made it such that a path could no longer be
compared to an empty tuple, which can occur in a particular kind of joined
eager loading path. The "empty tuple" use case has been resolved so that
the path registry is compared to a path registry in all cases;
- Fix build for older distributions by buildrequiring a new-enough pytest
- Fix build without python2
OBS-URL: https://build.opensuse.org/request/show/787144
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-SQLAlchemy?expand=0&rev=74
* Adjusted the error message emitted by :meth:`.Query.join` when a left hand
side can't be located that the :meth:`.Query.select_from` method is the
best way to resolve the issue. Also, within the 1.3 series, used a
deterministic ordering when determining the FROM clause from a given column
entity passed to :class:`.Query` so that the same expression is determined
each time.
* Fixed regression in 1.3.14 due to 🎫`4849` where a sys.exc_info()
call failed to be invoked correctly when a flush error would occur. Test
coverage has been added for this exception case.
* Fixed bug where a CTE of an INSERT/UPDATE/DELETE that also uses RETURNING
could then not be SELECTed from directly, as the internal state of the
compiler would try to treat the outer SELECT as a DELETE statement itself
and access nonexistent state.
* Fixed regression caused in 1.3.13 by 🎫`5056` where a refactor of the
ORM path registry system made it such that a path could no longer be
compared to an empty tuple, which can occur in a particular kind of joined
eager loading path. The "empty tuple" use case has been resolved so that
the path registry is compared to a path registry in all cases;
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=163
- update to version 1.3.12:
* [orm] [bug] Fixed issue involving lazy="raise" strategy where an ORM delete
of an object would raise for a simple “use-get” style many-to-one relationship
that had lazy=”raise” configured. This is inconsistent vs. the change
introduced in 1.3 as part of #4353, where it was established that a history
operation that does not expect emit SQL should bypass the lazy="raise" check,
and instead effectively treat it as lazy="raise_on_sql" for this case. The fix
adjusts the lazy loader strategy to not raise for the case where the lazy load
was instructed that it should not emit SQL if the object were not present.
* [orm] [bug] Fixed regression introduced in 1.3.0 related to the association
proxy refactor in #4351 that prevented composite() attributes from working in
terms of an association proxy that references them.
* [orm] [bug] Setting persistence-related flags on relationship() while also
setting viewonly=True will now emit a regular warning, as these flags do not
make sense for a viewonly=True relationship. In particular, the “cascade”
settings have their own warning that is generated based on the individual
values, such as “delete, delete-orphan”, that should not apply to a viewonly
relationship. Note however that in the case of “cascade”, these settings are
still erroneously taking effect even though the relationship is set up as
“viewonly”. In 1.4, all persistence-related cascade settings will be disallowed
on a viewonly=True relationship in order to resolve this issue.
* [orm] [bug] [py3k] Fixed issue where when assigning a collection to itself
as a slice, the mutation operation would fail as it would first erase the
assigned collection inadvertently. As an assignment that does not change the
contents should not generate events, the operation is now a no-op. Note that
the fix only applies to Python 3; in Python 2, the __setitem__ hook isn’t
called in this case; __setslice__ is used instead which recreates the list
item-by-item in all cases.
* [orm] [bug] Fixed issue where by if the “begin” of a transaction failed at
the Core engine/connection level, such as due to network error or database is
OBS-URL: https://build.opensuse.org/request/show/758623
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-SQLAlchemy?expand=0&rev=72
* [orm] [bug] Fixed issue involving lazy="raise" strategy where an ORM delete
of an object would raise for a simple “use-get” style many-to-one relationship
that had lazy=”raise” configured. This is inconsistent vs. the change
introduced in 1.3 as part of #4353, where it was established that a history
operation that does not expect emit SQL should bypass the lazy="raise" check,
and instead effectively treat it as lazy="raise_on_sql" for this case. The fix
adjusts the lazy loader strategy to not raise for the case where the lazy load
was instructed that it should not emit SQL if the object were not present.
* [orm] [bug] Fixed regression introduced in 1.3.0 related to the association
proxy refactor in #4351 that prevented composite() attributes from working in
terms of an association proxy that references them.
* [orm] [bug] Setting persistence-related flags on relationship() while also
setting viewonly=True will now emit a regular warning, as these flags do not
make sense for a viewonly=True relationship. In particular, the “cascade”
settings have their own warning that is generated based on the individual
values, such as “delete, delete-orphan”, that should not apply to a viewonly
relationship. Note however that in the case of “cascade”, these settings are
still erroneously taking effect even though the relationship is set up as
“viewonly”. In 1.4, all persistence-related cascade settings will be disallowed
on a viewonly=True relationship in order to resolve this issue.
* [orm] [bug] [py3k] Fixed issue where when assigning a collection to itself
as a slice, the mutation operation would fail as it would first erase the
assigned collection inadvertently. As an assignment that does not change the
contents should not generate events, the operation is now a no-op. Note that
the fix only applies to Python 3; in Python 2, the __setitem__ hook isn’t
called in this case; __setslice__ is used instead which recreates the list
item-by-item in all cases.
* [orm] [bug] Fixed issue where by if the “begin” of a transaction failed at
the Core engine/connection level, such as due to network error or database is
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=158
- update to version 1.3.6
+ orm
* [feature] Added new loader option method Load.options()
which allows loader options to be constructed hierarchically,
so that many sub-options can be applied to a particular path
without needing to call defaultload() many times.
* [bug] Fixed regression caused by #4365 where a join from an
entity to itself without using aliases no longer raises an
informative error message, instead failing on an assertion.
The informative error condition has been restored.
* [bug] Fixed an issue where the orm._ORMJoin.join() method,
which is a not-internally-used ORM-level method that exposes
what is normally an internal process of Query.join(), did
not propagate the full and outerjoin keyword arguments
correctly.
* [bug] Fixed bug where a many-to-one relationship that
specified uselist=True would fail to update correctly during
a primary key change where a related column needs to change.
* [bug] Fixed bug where the detection for many-to-one or
one-to-one use with a “dynamic” relationship, which is an
invalid configuration, would fail to raise if the
relationship were configured with uselist=True. The current
fix is that it warns, instead of raises, as this would
otherwise be backwards incompatible, however in a future
release it will be a raise.
* [bug] Fixed bug where a synonym created against a mapped
attribute that does not exist yet, as is the case when it
refers to backref before mappers are configured, would raise
recursion errors when trying to test for attributes on it
which ultimately don’t exist (as occurs when the classes are
run through Sphinx autodoc), as the unconfigured state of
the synonym would put it into an attribute not found loop.
* [performance] The optimzation applied to selectin loading
in #4340 where a JOIN is not needed to eagerly load related
items is now applied to many-to-one relationships as well,
so that only the related table is queried for a simple join
condition. In this case, the related items are queried based
on the value of a foreign key column on the parent; if these
columns are deferred or otherwise not loaded on any of the
parent objects in the collection, the loader falls back to the
JOIN method.
+ engine
* [bug] Fixed bug where using reflection function such as
MetaData.reflect() with an Engine object that had execution
options applied to it would fail, as the resulting
OptionEngine proxy object failed to include a .engine
attribute used within the reflection routines.
+ sql
* [bug] Adjusted the initialization for Enum to minimize how
often it invokes the .__members__ attribute of a given
PEP-435 enumeration object, to suit the case where this
attribute is expensive to invoke, as is the case for some
popular third party enumeration libraries.
* [bug] [postgresql] Fixed issue where the array_agg construct
in combination with FunctionElement.filter() would not
produce the correct operator precedence in combination
with the array index operator.
* [bug] Fixed an unlikely issue where the “corresponding
column” routine for unions and other CompoundSelect objects
could return the wrong column in some overlapping column
situtations, thus potentially impacting some ORM operations
when set operations are in use, if the underlying select()
constructs were used previously in other similar kinds of
routines, due to a cached value not being cleared.
+ postgresql
* [usecase] Added support for reflection of indexes on
PostgreSQL partitioned tables, which was added to PostgreSQL
as of version 11.
* [usecase] Added support for multidimensional Postgresql array
literals via nesting the postgresql.array object within
another one. The multidimensional array type is detected
automatically.
+ mysql
* [bug] Fixed bug where the special logic to render “NULL” for
the TIMESTAMP datatype when nullable=True would not work if the
column’s datatype were a TypeDecorator or a Variant. The logic
now ensures that it unwraps down to the original TIMESTAMP so
that this special case NULL keyword is correctly rendered when
requested.
* [bug] Enhanced MySQL/MariaDB version string parsing to
accommodate for exotic MariaDB version strings where the
“MariaDB” word is embedded among other alphanumeric
characters such as “MariaDBV1”. This detection is critical
in order to correctly accommodate for API features that have
split between MySQL and MariaDB such as the
“transaction_isolation” system variable.
+ sqlite
* [usecase] Added support for composite (tuple) IN operators
with SQLite, by rendering the VALUES keyword for this backend.
As other backends such as DB2 are known to use the same syntax,
the syntax is enabled in the base compiler using a dialect-level
flag tuple_in_values. The change also includes support for
“empty IN tuple” expressions for SQLite when using “in_()”
between a tuple value and an empty set.
+ mssql
* [bug] Ensured that the queries used to reflect indexes and
view definitions will explicitly CAST string parameters into
NVARCHAR, as many SQL Server drivers frequently treat string
values, particularly those with non-ascii characters or
larger string values, as TEXT which often don’t compare
correctly against VARCHAR characters in SQL Server’s
information schema tables for some reason. These CAST
operations already take place for reflection queries against
SQL Server information_schema. tables but were missing from
three additional queries that are against sys.tables.
OBS-URL: https://build.opensuse.org/request/show/717941
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=145
- update to version 1.2.11:
* orm declarative
+ [bug] [declarative] [orm] Fixed issue in previously untested use
case, allowing a declarative mapped class to inherit from a
classically-mapped class outside of the declarative base,
including that it accommodates for unmapped intermediate
classes. An unmapped intermediate class may specify
__abstract__, which is now interpreted correctly, or the
intermediate class can remain unmarked, and the classically
mapped base class will be detected within the hierarchy
regardless. In order to anticipate existing scenarios which may
be mixing in classical mappings into existing declarative
hierarchies, an error is now raised if multiple mapped bases are
detected for a given class. References: #4321
* sql
+ [sql] [bug] Fixed issue that is closely related to #3639 where
an expression rendered in a boolean context on a non-native
boolean backend would be compared to 1/0 even though it is
already an implcitly boolean expression, when
ColumnElement.self_group() were used. While this does not affect
the user-friendly backends (MySQL, SQLite) it was not handled by
Oracle (and possibly SQL Server). Whether or not the expression
is implicitly boolean on any database is now determined up front
as an additional check to not generate the integer comparison
within the compliation of the statement. References: #4320
+ [sql] [bug] Added missing window function parameters
WithinGroup.over.range_ and WithinGroup.over.rows parameters to
the WithinGroup.over() and FunctionFilter.over() methods, to
correspond to the range/rows feature added to the “over” method
of SQL functions as part of #3049 in version 1.1. References:
#4322
+ [sql] [bug] Fixed bug where the multi-table support for UPDATE
and DELETE statements did not consider the additional FROM
elements as targets for correlation, when a correlated SELECT
were also combined with the statement. This change now includes
that a SELECT statement in the WHERE clause for such a statement
will try to auto-correlate back to these additional tables in
the parent UPDATE/DELETE or unconditionally correlate if
Select.correlate() is used. Note that auto-correlation raises an
error if the SELECT statement would have no FROM clauses as a
result, which can now occur if the parent UPDATE/DELETE
specifies the same tables in its additional set of tables;
specify Select.correlate() explicitly to resolve. References:
#4313
* oracle
+ [oracle] [bug] For cx_Oracle, Integer datatypes will now be
bound to “int”, per advice from the cx_Oracle
developers. Previously, using cx_Oracle.NUMBER caused a loss in
precision within the cx_Oracle 6.x series. References: #4309
* misc
+ [bug] [py3k] Started importing “collections” from
“collections.abc” under Python 3.3 and greater for Python 3.8
compatibility. Pull request courtesy Nathaniel Knight.
+ Fixed issue where the “schema” name used for a SQLite database
within table reflection would not quote the schema name
correctly. Pull request courtesy Phillip Cloud.
OBS-URL: https://build.opensuse.org/request/show/631537
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=119
- update to version 1.2.8:
* orm
+ [orm] [bug] Fixed regression in 1.2.7 caused by #4228, which
itself was fixing a 1.2-level regression, where the query_cls
callable passed to a Session was assumed to be a subclass of
Query with class method availability, as opposed to an
arbitrary callable. In particular, the dogpile caching example
illustrates query_cls as a function and not a Query subclass.
References: #4256
+ [orm] [bug] Fixed a long-standing regression that occurred in
version 1.0, which prevented the use of a custom MapperOption
that alters the _params of a Query object for a lazy load,
since the lazy loader itself would overwrite those parameters.
This applies to the “temporal range” example on the wiki. Note
however that the Query.populate_existing() method is now
required in order to rewrite the mapper options associated with
an object already loaded in the identity map.
As part of this change, a custom defined MapperOption will now
cause lazy loaders related to the target object to use a non-
baked query by default unless the
MapperOption._generate_cache_key() method is implemented. In
particular, this repairs one regression which occured when
using the dogpile.cache “advanced” example, which was not
returning cached results and instead emitting SQL due to an
incompatibility with the baked query loader; with the change,
the RelationshipCache option included for many releases in the
dogpile example will disable the “baked” query altogether. Note
that the dogpile example is also modernized to avoid both of
these issues as part of issue #4258. References: #4128
+ [orm] [bug] Fixed bug where the new
OBS-URL: https://build.opensuse.org/request/show/618391
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=112
- specfile:
* run spec-cleaner
- update to version 1.2.6:
* orm
+ [orm] [bug] Fixed bug where using Mutable.associate_with() or
Mutable.as_mutable() in conjunction with a class that has non-
primary mappers set up with alternatively-named attributes would
produce an attribute error. Since non-primary mappers are not
used for persistence, the mutable extension now excludes
non-primary mappers from its instrumentation steps. References:
#4215
* engine
+ [engine] [bug] Fixed bug in connection pool where a connection
could be present in the pool without all of its “connect” event
handlers called, if a previous “connect” handler threw an
exception; note that the dialects themselves have connect
handlers that emit SQL, such as those which set transaction
isolation, which can fail if the database is in a non-available
state, but still allows a connection. The connection is now
invalidated first if any of the connect handlers fail.
References: #4225
* sql
+ [sql] [bug] Fixed a regression that occurred from the previous
fix to #4204 in version 1.2.5, where a CTE that refers to itself
after the CTE.alias() method has been called would not refer to
iself correctly. References: #4204
* postgresql
+ [postgresql] [feature] Added support for “PARTITION BY” in
Postgresql table definitions, using
“postgresql_partition_by”. Pull request courtesy Vsevolod
Solovyov.
* mssql
+ [mssql] [bug] Adjusted the SQL Server version detection for
pyodbc to only allow for numeric tokens, filtering out
non-integers, since the dialect does tuple- numeric comparisons
with this value. This is normally true for all known SQL Server
/ pyodbc drivers in any case. References: #4227
* oracle
+ [oracle] [bug] The minimum cx_Oracle version supported is 5.2
(June 2015). Previously, the dialect asserted against version
5.0 but as of 1.2.2 we are using some symbols that did not
appear until 5.2. References: #4211
* misc
+ [bug] [declarative] Removed a warning that would be emitted when
calling upon __table_args__, __mapper_args__ as named with a
@declared_attr method, when called from a non-mapped declarative
mixin. Calling these directly is documented as the approach to
use when one is overidding one of these methods on a mapped
class. The warning still emits for regular attribute names.
References: #4221
OBS-URL: https://build.opensuse.org/request/show/594666
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=108
- update to 0.7.10:
* orm
+ [bug] Fixed Session accounting bug whereby replacing
a deleted object in the identity map with another
object of the same primary key would raise a
"conflicting state" error on rollback(),
if the replaced primary key were established either
via non-unitofwork-established INSERT statement
or by primary key switch of another instance.
[ticket:2583]
* oracle
+ [bug] changed the list of cx_oracle types that are
excluded from the setinputsizes() step to only include
STRING and UNICODE; CLOB and NCLOB are removed. This
is to work around cx_oracle behavior which is broken
for the executemany() call. In 0.8, this same change
is applied however it is also configurable via the
exclude_setinputsizes argument. [ticket:2561]
* mysql
+ [feature] Added "raise_on_warnings" flag to OurSQL
dialect. [ticket:2523]
+ [feature] Added "read_timeout" flag to MySQLdb
dialect. [ticket:2554]
- update to 0.7.10:
* orm
+ [bug] Fixed Session accounting bug whereby replacing
a deleted object in the identity map with another
object of the same primary key would raise a
"conflicting state" error on rollback(),
OBS-URL: https://build.opensuse.org/request/show/157972
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-SQLAlchemy?expand=0&rev=18
* orm
+ [bug] Fixed Session accounting bug whereby replacing
a deleted object in the identity map with another
object of the same primary key would raise a
"conflicting state" error on rollback(),
if the replaced primary key were established either
via non-unitofwork-established INSERT statement
or by primary key switch of another instance.
[ticket:2583]
* oracle
+ [bug] changed the list of cx_oracle types that are
excluded from the setinputsizes() step to only include
STRING and UNICODE; CLOB and NCLOB are removed. This
is to work around cx_oracle behavior which is broken
for the executemany() call. In 0.8, this same change
is applied however it is also configurable via the
exclude_setinputsizes argument. [ticket:2561]
* mysql
+ [feature] Added "raise_on_warnings" flag to OurSQL
dialect. [ticket:2523]
+ [feature] Added "read_timeout" flag to MySQLdb
dialect. [ticket:2554]
- update to 0.7.10:
* orm
+ [bug] Fixed Session accounting bug whereby replacing
a deleted object in the identity map with another
object of the same primary key would raise a
"conflicting state" error on rollback(),
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=37
* orm
- [bug] Fixed issue in unit of work whereby setting a non-None
self-referential many-to-one relationship to None would fail
to persist the change if the former value was not already loaded.
[ticket:2477].
- [feature] Added prefix_with() method to Query, calls upon
select().prefix_with() to allow placement of MySQL SELECT
directives in statements. Courtesy Diana Clarke [ticket:2443]
- [bug] Fixed bug in 0.7.6 introduced by [ticket:2409] whereby
column_mapped_collection used against columns that were mapped as
joins or other indirect selectables would fail to function.
- [feature] Added new flag to @validates include_removes. When True,
collection remove and attribute del events will also be sent to
the validation function, which accepts an additional argument
"is_remove" when this flag is used.
- [bug] Fixed bug whereby polymorphic_on column that's not otherwise
mapped on the class would be incorrectly included in a merge()
operation, raising an error. [ticket:2449]
- [bug] Fixed bug in expression annotation mechanics which could
lead to incorrect rendering of SELECT statements with aliases
and joins, particularly when using column_property(). [ticket:2453]
- [bug] Fixed bug which would prevent OrderingList from being
pickleable [ticket:2454]. Courtesy Jeff Dairiki
- [bug] Fixed bug in relationship comparisons whereby calling
unimplemented methods like SomeClass.somerelationship.like()
would produce a recursion overflow, instead of NotImplementedError.
* sql
- [bug] Removed warning when Index is created with no columns;
while this might not be what the user intended, it is a valid use case
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-SQLAlchemy?expand=0&rev=22
oid sha256:b607489dd4a54de56984a0c7656247504bd5523d9d0ba799aef59d4add009484
size 9524110
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.