]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
use ensure_closed() for async close, close() for terminate
authorGord Thompson <gord@gordthompson.com>
Sun, 14 Jan 2024 16:49:11 +0000 (09:49 -0700)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 17 Jan 2024 15:35:20 +0000 (10:35 -0500)
commit1c1f60a2e3f199b626edc565ae4a67687e192015
tree765d480f09898b35e7c5b616bcfcafd703b057d9
parent0f5144597501bf846b966af37d620616fc045a7b
use ensure_closed() for async close, close() for terminate

Fixed issue in asyncio dialects asyncmy and aiomysql, where their
``.close()`` method is apparently not a graceful close.  replace with
non-standard ``.ensure_closed()`` method that's awaitable and move
``.close()`` to the so-called "terminate" case.

Fixes: #10893
Change-Id: I33d871e67854d85f770c46f699e41a6e73b6fbe0
(cherry picked from commit 4201b90210dcf60f9830df299be016dee315753b)
doc/build/changelog/unreleased_20/10893.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/aiomysql.py
lib/sqlalchemy/dialects/mysql/asyncmy.py