<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-packages/sqlalchemy.git/lib/sqlalchemy/engine, branch ticket_5648</title>
<subtitle>github.com: zzzeek/sqlalchemy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/'/>
<entry>
<title>ensure event handlers called for all do_ping</title>
<updated>2023-03-01T21:20:36+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-02-24T21:15:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=45d0a501609e3588f1accac59c08358c4c6c74a1'/>
<id>45d0a501609e3588f1accac59c08358c4c6c74a1</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove `typing.Self` workaround</title>
<updated>2023-02-08T14:23:40+00:00</updated>
<author>
<name>Yurii Karabas</name>
<email>1998uriyyo@gmail.com</email>
</author>
<published>2023-02-07T22:43:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=7e4c4b8d5c18100b0db58f4d29fac5494fc95b52'/>
<id>7e4c4b8d5c18100b0db58f4d29fac5494fc95b52</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "fix post-production typo for #9174"</title>
<updated>2023-01-30T17:21:59+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-01-30T17:21:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=e17a81107db99300abef404b33d075a0238c2290'/>
<id>e17a81107db99300abef404b33d075a0238c2290</id>
<content type='text'>
This reverts commit 3b60c3f53eab8ee5896b3fde525bcf31d4233658.

some scratch code for isolation levels got pushed :(
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 3b60c3f53eab8ee5896b3fde525bcf31d4233658.

some scratch code for isolation levels got pushed :(
</pre>
</div>
</content>
</entry>
<entry>
<title>fix post-production typo for #9174</title>
<updated>2023-01-30T17:21:02+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-01-30T17:21:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=3b60c3f53eab8ee5896b3fde525bcf31d4233658'/>
<id>3b60c3f53eab8ee5896b3fde525bcf31d4233658</id>
<content type='text'>
merged in cae662a6383d3ae8f3673c70c3118ea3a1a1606e with one
typo fix afterwards

Fixes: #9174
Change-Id: I5a525da8a95f40c75da627fed49ce828bd498248
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
merged in cae662a6383d3ae8f3673c70c3118ea3a1a1606e with one
typo fix afterwards

Fixes: #9174
Change-Id: I5a525da8a95f40c75da627fed49ce828bd498248
</pre>
</div>
</content>
</entry>
<entry>
<title>Result.__enter__ annotation</title>
<updated>2023-01-23T16:00:02+00:00</updated>
<author>
<name>Martin Baláž</name>
<email>embeembe@gmail.com</email>
</author>
<published>2023-01-22T16:16:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=d663f4d5bd3685eb8e074b3ec8d9a5c7baba3d32'/>
<id>d663f4d5bd3685eb8e074b3ec8d9a5c7baba3d32</id>
<content type='text'>
Fixed typing issue where the object type when using :class:`_engine.Result`
as a context manager were not preserved, indicating :class:`_engine.Result`
in all cases rather than the specific :class:`_engine.Result` sub-type.
Pull request courtesy Martin Baláž.

Fixes: #9136
Closes: #9135
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9135
Pull-request-sha: 97a9829db59db359fbb400ec0d913bdf8954f00a

Change-Id: I60a7f89ba39bf0f9fc5e6e7bf09f642167fe476f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixed typing issue where the object type when using :class:`_engine.Result`
as a context manager were not preserved, indicating :class:`_engine.Result`
in all cases rather than the specific :class:`_engine.Result` sub-type.
Pull request courtesy Martin Baláž.

Fixes: #9136
Closes: #9135
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/9135
Pull-request-sha: 97a9829db59db359fbb400ec0d913bdf8954f00a

Change-Id: I60a7f89ba39bf0f9fc5e6e7bf09f642167fe476f
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove redundant 1.x reference (#9115)</title>
<updated>2023-01-18T19:33:05+00:00</updated>
<author>
<name>Sam Bull</name>
<email>aa6bs0@sambull.org</email>
</author>
<published>2023-01-18T19:33:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=f2e8ce8853789064e2522f89e14d9bcd1c961091'/>
<id>f2e8ce8853789064e2522f89e14d9bcd1c961091</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>replace @decorated_property decorator</title>
<updated>2023-01-12T17:36:25+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-01-12T17:33:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=ae7e74487e5aff1b9ebb832a704055ddcf042567'/>
<id>ae7e74487e5aff1b9ebb832a704055ddcf042567</id>
<content type='text'>
This decorator is no longer necessary as of Mypy
0.981 [1].

In current mypy versions, we require direct use of
`@property` for return types of these methods to be
recognized

[1] https://github.com/python/mypy/issues/1362

Change-Id: Ibc36083dec854c5f9140a9b621e9bf9d5bb4fb61
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This decorator is no longer necessary as of Mypy
0.981 [1].

In current mypy versions, we require direct use of
`@property` for return types of these methods to be
recognized

[1] https://github.com/python/mypy/issues/1362

Change-Id: Ibc36083dec854c5f9140a9b621e9bf9d5bb4fb61
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "warn and skip for FKs that refer to invisible cols for Oracle" into main</title>
<updated>2023-01-09T18:16:15+00:00</updated>
<author>
<name>Federico Caselli</name>
<email>cfederico87@gmail.com</email>
</author>
<published>2023-01-09T18:16:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=f7580186cd50ab9174083f2df7dbf26fc54b9f40'/>
<id>f7580186cd50ab9174083f2df7dbf26fc54b9f40</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>warn and skip for FKs that refer to invisible cols for Oracle</title>
<updated>2023-01-09T14:51:03+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-01-05T15:34:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=3aeb30ea104ca6cbe6972f7ec64233cadbaccd82'/>
<id>3aeb30ea104ca6cbe6972f7ec64233cadbaccd82</id>
<content type='text'>
Supported use case for foreign key constraints where the local column is
marked as "invisible". The errors normally generated when a
:class:`.ForeignKeyConstraint` is created that check for the target column
are disabled when reflecting, and the constraint is skipped with a warning
in the same way which already occurs for an :class:`.Index` with a similar
issue.

tests are added for indexes, unique constraints, and primary key
constraints, which were already working; indexes and uniques warn,
primary keys don't which we would assume is because we never see those
PK columns in the first place.

Constraints now raise an informative ConstraintColumnNotFoundError
in the general case for strings in the "pending colargs" collection
not being resolvable.

Fixes: #9059
Change-Id: I400cf0bff6abba0e0c75f38b07617be1a8ec3453
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Supported use case for foreign key constraints where the local column is
marked as "invisible". The errors normally generated when a
:class:`.ForeignKeyConstraint` is created that check for the target column
are disabled when reflecting, and the constraint is skipped with a warning
in the same way which already occurs for an :class:`.Index` with a similar
issue.

tests are added for indexes, unique constraints, and primary key
constraints, which were already working; indexes and uniques warn,
primary keys don't which we would assume is because we never see those
PK columns in the first place.

Constraints now raise an informative ConstraintColumnNotFoundError
in the general case for strings in the "pending colargs" collection
not being resolvable.

Fixes: #9059
Change-Id: I400cf0bff6abba0e0c75f38b07617be1a8ec3453
</pre>
</div>
</content>
</entry>
<entry>
<title>revert MySQL to use DESCRIBE for has_table()</title>
<updated>2023-01-05T14:38:04+00:00</updated>
<author>
<name>Mike Bayer</name>
<email>mike_mp@zzzcomputing.com</email>
</author>
<published>2023-01-05T04:32:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/python-packages/sqlalchemy.git/commit/?id=7505cc5db44f2d3a84827519d3a7d926a9cdec23'/>
<id>7505cc5db44f2d3a84827519d3a7d926a9cdec23</id>
<content type='text'>
Restored the behavior of :meth:`.Inspector.has_table` to report on
temporary tables for MySQL / MariaDB. This is currently the behavior for
all other included dialects, but was removed for MySQL in 1.4 due to no
longer using the DESCRIBE command; there was no documented support for temp
tables being reported by the :meth:`.Inspector.has_table` method in this
version or on any previous version, so the previous behavior was undefined.

As SQLAlchemy 2.0 has added formal support for temp table status via
:meth:`.Inspector.has_table`, the MySQL /MariaDB dialect has been reverted
to use the "DESCRIBE" statement as it did in the SQLAlchemy 1.3 series and
previously, and test support is added to include MySQL / MariaDB for
this behavior.   The previous issues with ROLLBACK being emitted which
1.4 sought to improve upon don't apply in SQLAlchemy 2.0 due to
simplifications in how :class:`.Connection` handles transactions.

DESCRIBE is necessary as MariaDB in particular has no consistently
available public information schema of any kind in order to report on temp
tables other than DESCRIBE/SHOW COLUMNS, which rely on throwing an error
in order to report no results.

Fixes: #9058
Change-Id: Ic511bd5989ec17beb37b7cddd913732b626af0e6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Restored the behavior of :meth:`.Inspector.has_table` to report on
temporary tables for MySQL / MariaDB. This is currently the behavior for
all other included dialects, but was removed for MySQL in 1.4 due to no
longer using the DESCRIBE command; there was no documented support for temp
tables being reported by the :meth:`.Inspector.has_table` method in this
version or on any previous version, so the previous behavior was undefined.

As SQLAlchemy 2.0 has added formal support for temp table status via
:meth:`.Inspector.has_table`, the MySQL /MariaDB dialect has been reverted
to use the "DESCRIBE" statement as it did in the SQLAlchemy 1.3 series and
previously, and test support is added to include MySQL / MariaDB for
this behavior.   The previous issues with ROLLBACK being emitted which
1.4 sought to improve upon don't apply in SQLAlchemy 2.0 due to
simplifications in how :class:`.Connection` handles transactions.

DESCRIBE is necessary as MariaDB in particular has no consistently
available public information schema of any kind in order to report on temp
tables other than DESCRIBE/SHOW COLUMNS, which rely on throwing an error
in order to report no results.

Fixes: #9058
Change-Id: Ic511bd5989ec17beb37b7cddd913732b626af0e6
</pre>
</div>
</content>
</entry>
</feed>
