# HG changeset patch # User Alexander Smishlajev # Date 1146932367 0 # Node ID b31a2e35be804772aee8d38e36a07c80e71c77f6 # Parent f12722c7b9ee4797c87247f0adedc10dcc0b63ee pysqlite 1.1.6 does not allow to pass a list of tuples to cursor.execute(). according to PEP249, this kind of usage is deprecated: executemany() should be used instead. diff -r f12722c7b9ee -r b31a2e35be80 roundup/backends/indexer_rdbms.py --- a/roundup/backends/indexer_rdbms.py Thu Apr 27 06:33:18 2006 +0000 +++ b/roundup/backends/indexer_rdbms.py Sat May 06 16:19:27 2006 +0000 @@ -1,4 +1,4 @@ -#$Id: indexer_rdbms.py,v 1.13 2006-04-27 06:33:18 richard Exp $ +#$Id: indexer_rdbms.py,v 1.14 2006-05-06 16:19:27 a1s Exp $ ''' This implements the full-text indexer over two RDBMS tables. The first is a mapping of words to occurance IDs. The second maps the IDs to (Class, propname, itemid) instances. @@ -69,7 +69,7 @@ # for each word, add an entry in the db sql = 'insert into __words (_word, _textid) values (%s, %s)'%(a, a) words = [(word, id) for word in words] - self.db.cursor.execute(sql, words) + self.db.cursor.executemany(sql, words) def find(self, wordlist): '''look up all the words in the wordlist.