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 > http://www.webwareforpython.org/downloads/DBUtils/DBUtils-1.0pre.tar.gz > > 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 ? bye -- William Dodé - http://flibuste.net Informaticien Indépendant ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Webware-devel mailing list Webware-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/webware-devel