On 06-10-2008, Christoph Zwerschke wrote:
> William Dode schrieb:
>> With python >= 2.4 you use threading.local in PersistentDB, but with
>> some server (mod_wsgi) threading.local is not kept between requests
>> because of the C implementation. We can also imagine that somes wsgi
>> server will clean threading.local.
>> If we force to use the python implementation it works (and there is
>> a python implementation in PersistentDB.py)
> Thanks for making me aware of that. So if you change PersistentDB to do
> "from _threading_local import local" instead of "from threading import
> local" or if you raise an ImportError so that the implementation in
> PersistentDB is used, then it works?
Yes, theses two solutions works
> That means we should probably make this configurable or always use the
> Python implementation (but the C implementation is faster). Other ideas?
Maybe the python implementation by default and an option tu use the
C implementation (did you bench it ?). Like that most of the people will
have nothing to do.
> By the way, a pre-release of DBUtils 1.0 is available at
> If there are other things to consider for DBUtils 1.0, let me know.
I just see that you added a closeable attribute, fine.
There is no close method for all the pool of PersistentDB ?
Why the _close method of the connection to force it is not public ?
William Dodé - http://flibuste.net