]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
add close=False parameter to engine.dispose()
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 31 Mar 2022 13:08:11 +0000 (09:08 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 31 Mar 2022 13:57:39 +0000 (09:57 -0400)
commitdf3b4522c0f9e199cb05fe1129f53473e7da26fb
treef64e6f688c50615535a6372267eb216d9b741e9b
parentaade1973639517dff06d9f5147c2ec67fc5e3a8d
add close=False parameter to engine.dispose()

Added new parameter :paramref:`.Engine.dispose.close`, defaulting to True.
When False, the engine disposal does not touch the connections in the old
pool at all, simply dropping the pool and replacing it. This use case is so
that when the original pool is transferred from a parent process, the
parent process may continue to use those connections.

Fixes: #7877
Change-Id: I88b0808442381ba5e50674787cdb64f0e77d8b54
(cherry picked from commit 87a0f7183de4e8454483c7348bf486265bfe1c4d)
doc/build/changelog/unreleased_14/7877.rst [new file with mode: 0644]
doc/build/core/connections.rst
doc/build/core/pooling.rst
lib/sqlalchemy/engine/base.py
test/engine/test_execute.py