Copterfly / modwsgi

Automatically exported from code.google.com/p/modwsgi
0 stars 0 forks source link

Add directive to run Python 2.6 in 3.0 migration mode. #109

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In Python 2.6 there exists the -3 option to run Python code in 3.0 migration 
mode. Need to allow 
this to be enabled through a configuration directive.

Name of variable that needs setting a C code level is Py_Py3kWarningFlag.

Original issue reported on code.google.com by Graham.Dumpleton@gmail.com on 17 Sep 2008 at 9:07

GoogleCodeExporter commented 8 years ago
In interim, Python code module could be imported using PythonImportScript and 
run:

import ctypes 
def engage_py3k_warning(): 
     flag = ctypes.c_int.in_dll(ctypes.pythonapi, "Py_Py3kWarningFlag") 
     flag.value = 1 

Original comment by Graham.Dumpleton@gmail.com on 17 Sep 2008 at 9:08

GoogleCodeExporter commented 8 years ago
Added WSGIPy3kWarningFlag when Python 2.6 is being used. This should have same 
effect as -3 option. Note 
that you cannot be using mod_python at same time.

Committed in revision 1075 of trunk.

Original comment by Graham.Dumpleton@gmail.com on 17 Sep 2008 at 11:36

GoogleCodeExporter commented 8 years ago
Version 3.0 of mod_wsgi now released with WSGIPy3kWarningFlag directive.

Original comment by Graham.Dumpleton@gmail.com on 22 Nov 2009 at 2:55