id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux
411,CursorDebugWrapper does not support pyformat paramstyle.,imaurer@…,adrian,"According to the Python Database API Specification v2.0, the paramters provided to the cursor.execute() method can be sequences or mappings.
http://www.python.org/peps/pep-0249.html
Right now, the CursorDebugWrapper is converting all params to tuples before appending it to the queries list. This is causing my calls that use the pyformat paramstyle to fail during DEBUG mode. Below I removed the 'tuple()' function call which fixes my error. Of course, if there is a reason for this explicit conversion to tuple type that I do not see then a better work around would be needed.
{{{
class CursorDebugWrapper:
def __init__(self, cursor, db):
self.cursor = cursor
self.db = db
def execute(self, sql, params=[]):
start = time()
result = self.cursor.execute(sql, params)
stop = time()
self.db.queries.append({
'sql': sql % params,
'time': ""%.3f"" % (stop - start),
})
return result
}}}
",defect,closed,"Database layer (models, ORM)",,trivial,fixed,,,Unreviewed,0,0,0,0,,