| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The support for pool ping listeners to receive exception events via the
:meth:`.ConnectionEvents.handle_error` event added in 2.0.0b1 for
:ticket:`5648` failed to take into account dialect-specific ping routines
such as that of MySQL and PostgreSQL. The dialect feature has been reworked
so that all dialects participate within event handling. Additionally,
a new boolean element :attr:`.ExceptionContext.is_pre_ping` is added
which identifies if this operation is occurring within the pre-ping
operation.
For this release, third party dialects which implement a custom
:meth:`_engine.Dialect.do_ping` method can opt in to the newly improved
behavior by having their method no longer catch exceptions or check
exceptions for "is_disconnect", instead just propagating all exceptions
outwards. Checking the exception for "is_disconnect" is now done by an
enclosing method on the default dialect, which ensures that the event hook
is invoked for all exception scenarios before testing the exception as a
"disconnect" exception. If an existing ``do_ping()`` method continues to
catch exceptions and check "is_disconnect", it will continue to work as it
did previously, but ``handle_error`` hooks will not have access to the
exception if it isn't propagated outwards.
Fixes: #5648
Change-Id: I6535d5cb389e1a761aad8c37cfeb332c548b876d
|
|
|
|
|
| |
Fixes: #9361
Change-Id: I9c433960664aa2b75cd03925d9dcf2e1ff27d8ce
|
|
|
|
|
| |
Fixes: #9339
Change-Id: I44542166417776733245e2ba39cd5de89b6d748b
|
| |
|
| |
|
|
|
| |
The `crate-0.30.0` package offers compatibility with SQLAlchemy 2.0.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed issue where new :paramref:`_orm.mapped_column.use_existing_column`
feature would not work if the two same-named columns were mapped under
attribute names that were differently-named from the explicit name given to
the column itself. The attribute names can now be differently named when
using this parameter.
Fixes: #9332
Change-Id: I43716b8ca2b089e54a2b078db28b6c4770468bdd
|
|
|
|
| |
Change-Id: Idf68d2c5e40a3b072ad1cd479638f9eb364ba15f
|
|
|
|
|
|
|
| |
I can only see issues in the docs when they're live on the
site, sorry
Change-Id: I948b7c8e37657ca85d02843211cbfdb03aa5da75
|
|
|
|
| |
Change-Id: I547e66b60f5a7b2901a76ebc59469bce018e05ff
|
| |
|
| |
|
|
|
|
| |
Change-Id: Id28c5ae101cf462609740a698a1b188cce01bc5a
|
|
|
|
|
|
|
| |
we have a very complicated story to tell and we need to
keep it within "reference doc" mode as much as we can
Change-Id: I873b7d95aea7b5a1d04de0c78a4e88651c908b35
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
To accommodate a change in column ordering used by ORM Declarative in
SQLAlchemy 2.0, a new parameter :paramref:`_orm.mapped_column.sort_order`
has been added that can be used to control the order of the columns defined
in the table by the ORM, for common use cases such as mixins with primary
key columns that should appear first in tables. The change notes at
:ref:`change_9297` illustrate the default change in ordering behavior
(which is part of all SQLAlchemy 2.0 releases) as well as use of the
:paramref:`_orm.mapped_column.sort_order` to control column ordering when
using mixins and multiple classes (new in 2.0.4).
Fixes: #9297
Change-Id: Ic7163d64efdc0eccb53d6ae0dd89ec83427fb675
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Improved the typing support for the :ref:`hybrids_toplevel`
extension, updated all documentation to use ORM Annotated Declarative
mappings, and added a new modifier called :attr:`.hybrid_property.inplace`.
This modifier provides a way to alter the state of a :class:`.hybrid_property`
**in place**, which is essentially what very early versions of hybrids
did, before SQLAlchemy version 1.2.0 :ticket:`3912` changed this to
remove in-place mutation. This in-place mutation is now restored on an
**opt-in** basis to allow a single hybrid to have multiple methods
set up, without the need to name all the methods the same and without the
need to carefully "chain" differently-named methods in order to maintain
the composition. Typing tools such as Mypy and Pyright do not allow
same-named methods on a class, so with this change a succinct method
of setting up hybrids with typing support is restored.
Change-Id: Iea88025f023428f9f006846d09fbb4be391f5ebb
References: #9321
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed issue where element types of a tuple value would be hardcoded to take
on the types from a compared-to tuple, when the comparison were using the
:meth:`.ColumnOperators.in_` operator. This was inconsistent with the usual
way that types are determined for a binary expression, which is that the
actual element type on the right side is considered first before applying
the left-hand-side type.
Fixes: #9313
Change-Id: Ia8874c09682a6512fcf4084cf14481024959c461
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
This is a private class, mark as such as some users
may have used this class directly in end-user code.
Change-Id: I2657eff1f9f11b59c0483922ac67d6420a082906
References: #9299
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added new parameter ``dataclasses_callable`` to both the
:class:`_orm.MappedAsDataclass` class as well as the
:meth:`_orm.registry.mapped_as_dataclass` method which allows an
alternative callable to Python ``dataclasses.dataclass`` to be used in
order to produce dataclasses. The use case here is to drop in Pydantic's
dataclass function instead. Adjustments have been made to the mixin support
added for :ticket:`9179` in version 2.0.1 so that the ``__annotations__``
collection of the mixin is rewritten to not include the
:class:`_orm.Mapped` container, in the same way as occurs with mapped
classes, so that the Pydantic dataclasses constructor is not exposed to
unknown types.
Fixes: #9266
Change-Id: Ia0fab6f20b93a5cb853799dcf1b70a0386837c14
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The :meth:`_orm.Session.refresh` method will now immediately load a
relationship-bound attribute that is explicitly named within the
:paramref:`_orm.Session.refresh.attribute_names` collection even if it is
currently linked to the "select" loader, which normally is a "lazy" loader
that does not fire off during a refresh. The "lazy loader" strategy will
now detect that the operation is specifically a user-initiated
:meth:`_orm.Session.refresh` operation which named this attribute
explicitly, and will then call upon the "immediateload" strategy to
actually emit SQL to load the attribute. This should be helpful in
particular for some asyncio situations where the loading of an unloaded
lazy-loaded attribute must be forced, without using the actual lazy-loading
attribute pattern not supported in asyncio.
Fixes: #9298
Change-Id: I9b50f339bdf06cdb2ec98f8e5efca2b690895dd7
|
|
|
|
|
|
|
|
| |
asyncmy 0.2.7 has had a loss in float precision for even
very low numbers of significant digits.
Change-Id: Iec6d2650943eeaa8e854f21990f6565d73331f8c
References: https://github.com/long2ice/asyncmy/issues/56
|
|
|
|
| |
Change-Id: Ie514c76b4f6b3241bba5083219a3eae19c2b7aae
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Adjusted ``oracledb`` thick mode flag to make ``thick_mode=False`` not
enable thick mode. Previously only ``None`` was accepted as off value.
Fixes: #9295
Change-Id: I1a8397c19d065dfc2dda597e719922fc8d31acb1
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added public property :attr:`_sql.Table.autoincrement_column` that
returns the column identified as autoincrementing in the column.
Fixes: #9277
Change-Id: If60d6f92e0df94f57d00ff6d89d285c61b02f5a4
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | | |
had no test support for this, seems to work. gets
grabbed in annotations and applied correctly.
Change-Id: I2cd7ad7b376f38f945d2007b316a1316271f9a0f
|
| | |
| | |
| | | |
see #9294
|
|/ /
| |
| |
| |
| | |
Fixes: #9305
Change-Id: I9f0ab24f609f6f557b5780209a85f0abe82b363e
|
| |
| |
| |
| | |
Change-Id: I3307e1844237b58486dcce334eab80689e116bb8
|
| |
| |
| |
| |
| |
| |
| |
| | |
Sphinx refuses to write the correct docstring for these without
placing a completely literal string with no interpolation of
any kind. Current site has blank for these.
Change-Id: Ie19a0b89d05b45509708585e6efca1a35f30adb5
|
| |
| |
| |
| |
| | |
Change-Id: I520c18ac8c84923558e2042265943b6340700788
References: #9294
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Fix docs for `case` expression to match new syntax
Previously (before v1.4), the `whens` arg (when `value` is *not* used) used to be a list of
conditions (a 2 item-tuple of condition + value). From v1.4, these are passed
as positional args and the old syntax is not supported anymore.
* Fix long lines
|
|/
|
|
|
|
| |
eb0861e8e69f8ce702301c558e552e1aeb2e9eba
Change-Id: I78c12a58eef59ff577a88880a8752151051fd939
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fix in #9217 opened up adapt_on_names to more kinds of
expressions than it was prepared for; adjust that logic
and also refine in the ORM where we are using it, as we
dont need it (yet) for the DML RETURNING use case.
Fixed regression introduced in version 2.0.2 due to :ticket:`9217` where
using DML RETURNING statements, as well as
:meth:`_sql.Select.from_statement` constructs as was "fixed" in
:ticket:`9217`, in conjunction with ORM mapped classes that used
expressions such as with :func:`_orm.column_property`, would lead to an
internal error within Core where it would attempt to match the expression
by name. The fix repairs the Core issue, and also adjusts the fix in
:ticket:`9217` to not take effect for the DML RETURNING use case, where it
adds unnecessary overhead.
Fixes: #9273
Change-Id: Ie0344efb12ff7df48f21e71e62dc598c76a6a0de
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed critical regression in SQL expression formulation in the 2.0 series
due to :ticket:`7744` which improved support for SQL expressions that
contained many elements against the same operator repeatedly; parenthesis
grouping would be lost with expression elements beyond the first two
elements.
Fixes: #9271
Change-Id: Ib6ed5b71efe0f6816dab75bda622297fc89e3b49
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sphinx-copybutton introduced a new feature
in 0.5.1 which includes a default configuration
that breaks the regexp prompt matching scheme.
set copybutton_exclude to not include ".gp" as that's the class
where we exactly look for the prompts we are matching.
While we're there, use this new feature to exclude our sql
styles, even though this is not strictly necessary in our case.
pin sphinx-copybutton at 0.5.1 to avoid future problems.
Change-Id: I8eaeab13995c032b9ee3afd1f08dae5929009d45
References: https://github.com/executablebooks/sphinx-copybutton/issues/185
|
|
|
|
| |
Change-Id: I3075472de51b9d0d429f7f6204093f3e481fc121
|
|
|
| |
Fixes #9268
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove ``typing.Self`` workaround, now using :pep:`673` for most methods
that return ``Self``. Pull request courtesy Yurii Karabas.
Fixes: #9254
Closes: #9255
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9255
Pull-request-sha: 2947df8ada79f5c3afe9c838e65993302199c2f7
Change-Id: Ic32015ad52e95a61f3913d43ea436aa9402804df
|
|\ \
| |/
|/| |
|