[
https://issues.apache.org/jira/browse/MODPYTHON-116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Graham Dumpleton closed MODPYTHON-116.
--------------------------------------
> Attributes removed from module code file still accessible until restart.
> ------------------------------------------------------------------------
>
> Key: MODPYTHON-116
> URL: https://issues.apache.org/jira/browse/MODPYTHON-116
> Project: mod_python
> Issue Type: Bug
> Components: core
> Affects Versions: 3.1.4, 3.2.7
> Reporter: Graham Dumpleton
> Assigned To: Graham Dumpleton
> Fix For: 3.3
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.