On 26/06/2005, at 1:28 AM, Jim Gallacher wrote:
Changed import mechanism.
(I wasn't paying too much attention to this whole discussion, so
maybe someone else could comment on how this changed and the possible
impact on user code?)

New version attribute.

Added publisher.get_page() which allows the import of a published page.

I know I am not part of the development team, so can only make suggestions, but I personally don't believe that the new import mechanism which has been
developed just for publisher should be included.

There are already problems which can arise due to the mixing of the "import"
statement and "apache.import_module()", and now a third system is being
brought into the picture which behaves different enough that in itself may cause confusion, but when wrongly mixed with the others could result in a
mess. I know I don't want to have to be answering questions about it and
if it did come down to it, I probably wouldn't.

Thus, I would be suggesting leaving this feature out. You shouldn't however let this delay 3.2. People understand that module importing is broken and
how to work around it, leaving it that way a bit longer is not going to
cause any new harm. At least, less harm than if this new scheme has to be
ripped out at a later date.

Instead, fixing of the main module importer should be carried out. I know that others disagree with some of my ideas on that, but I do believe it can be fixed and the only features you would loose would be the ability to import parts of packages when using "apache.import_module()" explicitly and this only because to support packages properly when autoreloading is supported
overly complicates the design to the point that it isn't practical. This
ability of the current importer to deal with packages is actually broken
in various ways anyway and I don't think dropping it would cause any real problem. Note that this wouldn't prevent use of packages or parts of packages
from standard Python locations from any of the Handler directives.

Anyway, the point of this mail is simply to register my viewpoint that the
new publisher specific import mechanism should not be included. 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