summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-08-03 11:55:12 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2010-08-03 11:55:12 -0400
commitddf4210552fdff864a885b1ec6aa238105b16e8f (patch)
treeae6e1c4231385954a8dd5252ffb715b5da6f5a4b /lib/sqlalchemy/dialects
parent5cd1d43bec73db77d26e6f663e2449e911520737 (diff)
downloadsqlalchemy-ddf4210552fdff864a885b1ec6aa238105b16e8f.tar.gz
- Calling fetchone() or similar on a result that
has already been exhausted, has been closed, or is not a result-returning result now raises ResourceClosedError, a subclass of InvalidRequestError, in all cases, regardless of backend. Previously, some DBAPIs would raise ProgrammingError (i.e. pysqlite), others would return None leading to downstream breakages (i.e. MySQL-python). - Connection, ResultProxy, as well as Session use ResourceClosedError for all "this connection/transaction/result is closed" types of errors.
Diffstat (limited to 'lib/sqlalchemy/dialects')
-rw-r--r--lib/sqlalchemy/dialects/sqlite/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py
index 2d9e56baf..b84b18e68 100644
--- a/lib/sqlalchemy/dialects/sqlite/base.py
+++ b/lib/sqlalchemy/dialects/sqlite/base.py
@@ -600,5 +600,5 @@ def _pragma_cursor(cursor):
"""work around SQLite issue whereby cursor.description is blank when PRAGMA returns no rows."""
if cursor.closed:
- cursor._fetchone_impl = lambda: None
+ cursor.fetchone = lambda: None
return cursor