[ 
http://issues.apache.org/jira/browse/MODPYTHON-116?page=comments#action_12364187
 ] 

Graham Dumpleton commented on MODPYTHON-116:
--------------------------------------------

Whoops, forgot to reference back to my problem list for completeness. :-)

This problem is listed as ISSUE 13 in my list of module importer problems. See:

  http://www.dscpl.com.au/articles/modpython-003.html

> Attributes removed from module code file still accessible until restart.
> ------------------------------------------------------------------------
>
>          Key: MODPYTHON-116
>          URL: http://issues.apache.org/jira/browse/MODPYTHON-116
>      Project: mod_python
>         Type: Bug
>   Components: core
>     Versions: 3.2, 3.1.4
>     Reporter: Graham Dumpleton

>
> When using "apache.import_module()" directly, or when it is used indirectly 
> by the "Python*Handler" directives, and automatic module reloading occurs, 
> modules are reloaded on top of the existing module. One of the problems with 
> this is that if an attribute such as a function or data value is removed from 
> the code file on disk, when the module is reloaded, that attribute doesn't 
> get removed from the in memory module held by mod_python. The only way to 
> eliminate such an attributed from the in memory module currently is to 
> restart Apache, automatic module reloading doesn't help.
> A good example of the problems this can cause is with mod_python.publisher. 
> Because attributes can be arbitrarily mapped to by a URL, if you forget to 
> prefix variables or functions with an underscore they will be visible to a 
> request. If such a mistake was realised and you change the source code to add 
> an underscore prefix and relied on automatic module reloading, it wouldn't 
> actually get rid of the incorrectly named attribute in the module held in the 
> mod_python cache. Thus, the restart of Apache is still required.
> As it stands for mod_python.publisher, the problem is fixed in 3.2.6, but it 
> still exists for direct use of "apache.import_module()" and "Python*Handler" 
> directives. The consequences outside of mod_python.publisher may not be as 
> problematic, bu depends on specific user code.
> A scheme whereby new modules are reloaded into a new module instance would 
> eliminate this problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to