From 1b774516a89d9acd615c7c40eb0c16d8befc6014 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 17 Dec 2010 19:27:01 -0500 Subject: [PATCH] this innocuous change allows sqlite to work with pypy. sadly, pypy is twice as slow even if i run the same test script four or five times to prime the jit. --- lib/sqlalchemy/dialects/sqlite/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/sqlalchemy/dialects/sqlite/base.py b/lib/sqlalchemy/dialects/sqlite/base.py index a74ea0c3c9..707bc1630e 100644 --- a/lib/sqlalchemy/dialects/sqlite/base.py +++ b/lib/sqlalchemy/dialects/sqlite/base.py @@ -439,10 +439,10 @@ class SQLiteDialect(default.DefaultDialect): qtable = quote(table_name) cursor = _pragma_cursor(connection.execute("%stable_info(%s)" % (pragma, qtable))) row = cursor.fetchone() - + # consume remaining rows, to work around # http://www.sqlite.org/cvstrac/tktview?tn=1884 - while cursor.fetchone() is not None: + while not cursor.closed and cursor.fetchone() is not None: pass return (row is not None) -- 2.47.2