[modwsgi] Re: threading.local

2008-10-05 Thread Graham Dumpleton
2008/10/6 gert [EMAIL PROTECTED]: But how would you launch a mysql connection so i can do loc = threading.local() db = loc.db db.execute(SELECT * FROM Graham,()) when WSGIApplicationGroup %{GLOBAL} is set At a guess, something like: import threading local = threading.local() def

[modwsgi] Re: threading.local

2008-10-05 Thread gert
dammit threading sucks :( http://87.98.218.86/bench.txt http://87.98.218.86/bench.htm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups modwsgi group. To post to this group, send email to modwsgi@googlegroups.com To

[modwsgi] RuntimeError with Trac

2008-10-05 Thread Todd O'Bryan
I just started hosting some Mercurial repositories on my server with mod_wsgi, and, maybe coincidentally, my Trac setup has started throwing the very popular RuntimeError: instance.__dict__ not accessible in restricted mode. Since it had never done that before, I thought the problem might be a

[modwsgi] Re: RuntimeError with Trac

2008-10-05 Thread Graham Dumpleton
2008/10/6 Todd O'Bryan [EMAIL PROTECTED]: I just started hosting some Mercurial repositories on my server with mod_wsgi, and, maybe coincidentally, my Trac setup has started throwing the very popular RuntimeError: instance.__dict__ not accessible in restricted mode. Since it had never done

[modwsgi] Re: threading.local

2008-10-05 Thread Graham Dumpleton
That is because you didn't read the example properly. The threading.local() instance is meant to be at global scope in module. # Global !!! local = threading.local() def application(environ, start_response): try: db = local.db except: local.db =

[modwsgi] Re: threading.local

2008-10-05 Thread gert
But how would you launch a mysql connection so i can do loc = threading.local() db = loc.db db.execute(SELECT * FROM Graham,()) when WSGIApplicationGroup %{GLOBAL} is set --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[modwsgi] Re: RuntimeError with Trac

2008-10-05 Thread Todd O'Bryan
Sorry, but where do I look for the stack trace? I did find this in the error_log, but it's weird because I'm using Ubuntu with the package system, so it really should have sorted this out, I think. [Mon Oct 06 00:42:39 2008] [warn] mod_wsgi: Compiled for Python/2.5.1. [Mon Oct 06 00:42:39 2008]