[Twisted-Python] Some news about currently-pending code-reviews

Gerrat Rickert grickert at coldstorage.com
Thu Dec 24 09:41:11 EST 2009


[snip]
>http://twistedmatrix.com/trac/ticket/3956
>Add arraysize option to runQuery in adbapi
>
> - The "arraysize" property is the only writable cursor property
defined
>   by DBAPI2. Setting it can make the .fetchall() method faster with
>   some DB modules, but Twisted's adbapi module offers no way to set
it.
> - This ticket has a patch that adds an "cp_arraysize" keyword argument
>   to ConnectionPool.runQuery() to set the .arraysize property, but
this
>   could interfere with DB modules that accept a "cp_arraysize" keyword
>   parameter to cursor.execute().
> - I looked up the API docs for as many Python DB modules as I could
>   think of, and none of them attach any significance to
>   a "cp_arraysize" keyword parameter.
> - However, at least cx_Oracle supports using keyword parameters for
>   populating parameterised queries, like this:
>
>    cursor.execute("select :name from dual;", name="Fred")
>
>So, my questions to the Twisted community are:
> - How many of you are using adbapi.ConnectionPool with cx_Oracle, or
>   another DB module that supports arbitrary keyword arguments to
>   cursor.execute?
> - Of those, how many of you are using parameterised queries or
prepared
>   statements with placeholders named "arraysize" or "cp_arraysize"?
>

Well, as the guy who initiated this ticket, I'm certainly using 
adbapi.ConnectionPool with cx_Oracle.  I'm not currently using any 
placeholders named "arraysize" or "cp_arraysize".

This kind of informal poll *might* help us "rule out" using these (if
someone 
says they're currently using them) - but it won't be very definitive;
and this
change will still technically be backwards-incompatible.  
Perhaps the only reasonable backwards-compatible change that could be
made 
would be adding either an attribute or method to the ConnectionPool to
set the 
arraysize. 

Gerrat




More information about the Twisted-Python mailing list