]> 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:33:35 +0000 (10:33 -0500)
commit4201b90210dcf60f9830df299be016dee315753b
tree1b26663334cdffae6141fd3897097268a5634c6c
parent2c8a05244a8f7919c3954e0b6e1efaa996792772
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
doc/build/changelog/unreleased_20/10893.rst [new file with mode: 0644]
lib/sqlalchemy/dialects/mysql/aiomysql.py
lib/sqlalchemy/dialects/mysql/asyncmy.py