On 13/08/2006, at 12:35 AM, Jim Gallacher wrote:

Graham,

In your JIRA cleanup session you made the comment a number of times that
the new importer is not likely to be the default in 3.3. I'm just
wondering why it can't be the default, with the old importer as an
option? Maybe:

PythonOption mod_python.legacy.importer *

If we were to do this we'd likely want a longer 3.3 beta test period,
but if it takes care of the ongoing module import issues it might be
worth it.

I wasn't looking at it as being the default as I only know of one person so far
who has been even trying to use it, thus feedback on it has been very
limited. It may be that the lack of negative feedback means that there are no problems in the code, but it would help to get some positive feedback from
anyone who is using it on real world code examples even if only in a
development setup, that it is working okay. That way I would feel more
comfortable about making it the default.

By making it the default and therefore a first class citizen and not just the hanger on it is now, then also opens up the possibility of introducing
some new directives to control it, rather than using PythonOption for
some things.

For example, if one is to introduce a feature whereby a global search path can be specified for modules like PythonPath does for sys.path, then I would prefer it to be a directive, perhaps calling it PythonModulePath. The reason for making it a directive is that with the new directive I proposed in recent
JIRA issue, one could say:

  PythonModulePath '["/some/path"]'
  PythonAllowOverride -ModulePath

This makes how to configure it more visible and at the same time allows
the main Apache configuration to set where extra modules can be found
but then prohibit a user from changing it.

One slight problem with prohibiting overrides, is that even for directives, a user can get in and modify the table object returned by req.get_config() which could screw things up. To fix that, I think perhaps that the table object should be able to be created as read only so that handlers can't modify it.
As with introducing PythonAllowOverride in the first place, making it so
the config table object is read only is another step in making it possible to
restrict what can be done in handlers thereby making it perhaps a bit
friendlier to ISPs who want to make mod_python available and know that
one user can't screw up another users stuff.

Anyway, if we can make a decision that we will make new importer the
default in 3.3 that would be great and would allow me to progress with other ideas. When I have raised this question before though, never really got any
responses or agreement on whether to proceed with making it the default.

Graham


Reply via email to