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

Andrew Bennetts andrew-twisted at puzzling.org
Tue Mar 4 07:58:57 EST 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:

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.


More information about the Twisted-Python mailing list