[Twisted-Python] patch implementing 'fetchmany' from enterprise.adbapi

Andrew Bennetts andrew-twisted at puzzling.org
Tue Mar 4 05:58:57 MST 2003


On Tue, Mar 04, 2003 at 09:01:09AM +0000, Clark C. Evans wrote:
> On Tue, Mar 04, 2003 at 02:55:16AM -0500, I wrote:
> |     import mxODBC
> |     mxODBC.threadsafety = mxODBC.threadlevel
> | 
> 
> I tried that before I hacked.  However, the threadsaftey attribute
> doesn't seem to be picked up within the ConnectionPool constructor,
> which is passed the fully qualified class as a string.  I'm sure
> there is another way to do it...  in any case, that part of the
> patch can be easily dropped.   Following is the modified patch 
> without the threadsaftey hack.  ;) Clark

I've done this succesfully before:
    http://twistedmatrix.com/pipermail/twisted-python/2002-August/001447.html

IIRC, the trick is to twiddle with the module *before* creating your
ConnectionPool, so that it's fixed by the time it imports the module and
checks its threadsafety attribute.

-Andrew.





More information about the Twisted-Python mailing list