Commented: (MODPYTHON-227) PythonOptimize and doc strings.
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache Mod-Python > Commented: (MODPYTHON-227) PythonOptimize and doc strings.




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Commented: (MODPYTHON-227) PythonOptimize and doc strings.  
Graham Dumpleton (JIRA)


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
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 ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:22 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register