I agree with Graham on the whole, but I'd like to point out a few things.

1) The current publisher implementation, with its own dynamic loading
mechanism, already fixes
http://issues.apache.org/jira/browse/MODPYTHON-9
http://issues.apache.org/jira/browse/MODPYTHON-10
http://issues.apache.org/jira/browse/MODPYTHON-11 and a bit of
http://issues.apache.org/jira/browse/MODPYTHON-8 . So I think we
should keep it until we have a "unified importing theory".

2) The only thing I'm not too proud of, retrospectively, is
publisher.get_page. Like Graham wrote, this introduces a third way for
a developer to handle imports, which is bad. So I agree that even if
we keep the current implementation of the publisher, we should remove
publisher.get_page.

3) My suggestion for an "unified importing theory" is :
a) static importing should be done with import and end up in sys.modules
b) dynamic importing should be done with apache.import_module and end
up in its own module cache, not polluting sys.modules.
c) root level handlers should be imported statically, published pages
and application specific code should be imported dynamically
d) to be practical in a shared hosting environment, dynamic importing
should support reloading, of course, with dependencies, so that
restarting the server whenever published pages or application-specific
code is modified would not be needed.

4) Graham, I don't know what it takes to be a member of the
development team, but to me you are one :).

Regards,
Nicolas

2005/6/26, Gregory (Grisha) Trubetskoy <[EMAIL PROTECTED]>:
> 
> On Sun, 26 Jun 2005, Graham Dumpleton wrote:
> 
> > Anyway, the point of this mail is simply to register my viewpoint that the
> > new publisher specific import mechanism should not be included.
> 
> What does everyone think? I'm inclined to agree, especially given that
> Graham is working on documenting the issue (see below) which may affect
> the ultimate design.
> 
> Grisha
> 
> > I am not at this time going to be drawn into further discussions about
> > how to fix the current import mechanism though. I am working on a
> > document which describes the basics of how the module importer works and
> > all its problems and issues. When I am finished that, then we might
> > start discussing it again. I am about half done on this document and
> > hopefully in another week it will be ready to be used as the basis of
> > some discussions on how to progress this issue.
> >
> > Graham
> >
> >
> >
>

Reply via email to