]> 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:19:46 +0000 (09:19 -0400)
commit169ab546a99f91d696ff85c81d9e5403236dc748
treeb7c887636ae4ca91123c5ba02a4dd7b2224eea20
parent12b67ae68309e715e3ab1b3d533f5a329dd5b6c6
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
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