On 11 February 2011 06:06, Ole Laursen <[email protected]> wrote:
> On Feb 10, 2:47 pm, Graham Dumpleton <[email protected]>
> wrote:
>> Haven't look at the pyodbc code, but that is possibly a correct
>> analysis. Certainly, the postgresql had that problem and the function
>> you point out in there code was specifically added to cope with it.
>
> In case you're interested, the pyodbc code is here
>
> https://github.com/mkleehammer/pyodbc/blob/master/src/pyodbcmodule.cpp
>
> The problem seems to be in import_types which is called in a module
> init function and sets the global "decimal_type". I'm impressed you
> found out what the problem with psycopg2 was, it's really weird. Weird
> and ugly.

Definitely same issue. Likely they copied what an earlier version of
pyscopg2 was doing as an example.

Anyway, in summary for anyone reading, force WSGI application using
pyodbc to run in main Python interpreter using:

  WSGIApplicationGroup %{GLOBAL}

and you should avoid the problem.

Just be careful if you have multiple WSGI applications and do this for
more than one, as some WSGI applications don't like having multiple
instances running in same interpreter of a process, eg. Django.

Graham

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to