05-16-07 06:12 AM
[ https://issues.apache.org/jira/brow...action_12496169 ]
Graham Dumpleton commented on MODPYTHON-227:
--------------------------------------------
BTW, workaround at present is to set in environment of Apache user the envir
onment variable:
PYTHONOPTIMIZE=1
This will take precedence over the directive due to the order in which thing
s are set.
> PythonOptimize and doc strings.
> -------------------------------
>
> Key: MODPYTHON-227
> URL: https://issues.apache.org/jira/browse/MODPYTHON-227
> Project: mod_python
> Issue Type: Improvement
> Components: core
> Affects Versions: 3.3.1
> Reporter: Graham Dumpleton
> Priority: Minor
>
> When PythonOptimize directive is used and set to "On", the effect is the same as i
f the options '-O -O' had been supplied to the 'python' executable. Because the high
est level of optimisation is enabled, as well as basic optimisations being enabled,
any
doc strings in modules are discarded. This will cause a problem with any Python modules whic
h make use of doc strings in the way they work. It is suspected for example that this may ca
use issues with running 'matplotlib'. See:
> http://www.modpython.org/pipermail/...May/023641.html
> for further details.
> Because someone may want to enable optimisation but not have doc strings b
e discarded, the PythonOptimize directive should perhaps accept 'Basic' and
'Full' as options instead of just 'On'. For backward compatibility 'On' woul
d equate to 'Full'.
> Note that the documentation is also wrong as it says that PythonOptimize i
s only equivalent to '-O'.
> Finally, it doesn't currently matter what you set as the value to PythonOp
timize, it always turns the feature on, ie., even if you have:
> PythonOptimize Off
> The code should check for valid values.
[ Post a follow-up to this message ]
|