]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
- The "auto close" for :class:`.ResultProxy` is now a "soft" close.
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 17 Mar 2015 16:32:33 +0000 (12:32 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 17 Mar 2015 16:32:33 +0000 (12:32 -0400)
commitb7e151ac5cf5a0c13b9a30bc6841ed0cfe322536
tree039e129fb13d3fbafd2dcc718c15a5a2ea85a49f
parent2cadd768aa48d1180e24600cf133586a343ea10b
- The "auto close" for :class:`.ResultProxy` is now a "soft" close.
That is, after exhausing all rows using the fetch methods, the
DBAPI cursor is released as before and the object may be safely
discarded, but the fetch methods may continue to be called for which
they will return an end-of-result object (None for fetchone, empty list
for fetchmany and fetchall).   Only if :meth:`.ResultProxy.close`
is called explicitly will these methods raise the "result is closed"
error.
fixes #3330 fixes #3329
doc/build/changelog/changelog_10.rst
doc/build/changelog/migration_10.rst
doc/build/core/connections.rst
lib/sqlalchemy/dialects/sqlite/base.py
lib/sqlalchemy/engine/base.py
lib/sqlalchemy/engine/default.py
lib/sqlalchemy/engine/result.py
lib/sqlalchemy/testing/suite/test_insert.py
test/engine/test_execute.py
test/sql/test_query.py