Kevin Dangoor wrote:
On 1/18/06, Ian Bicking <[EMAIL PROTECTED]> wrote:
I would like the interface to be suggestive of the features the plugins
should implement. If people want to make reusable applications at all,
this should be considered a bare minimum feature for that.
I'm sold that we need to add search path. I don't think I want to hold
up the initial 0.9 release for this, but I *do* think this should get
in soon after that.
There's a couple options then:
1. Later a new entry point is created for the new interface. E.g.,
'python.templating.engines2'.
2. The spec is changed immediately to allow arbitrary keywords, and
plugins are expected to ignore keywords they don't understand. Later
keywords can be added to control aspects, hopefully with reasonable
compatibility. For instance, it is not horrible if a template plugin
ignores the search path (confusing, maybe).
3. The plugin instances grow a new method like "set_search_path()".
Consumers should check for the existance of this method, and call it if
necessary.
4. We standardize the meaning of an option. This is not unlike 2,
except doesn't require any changes to anything. That makes it easy.
Options are no longer completely template-specific.
5. We add the option right now, but some plugins may ignore it (but
they'll have to update their signatures).
Maybe 4 is easiest, but with it and some of the others you might get
developer confusion when the path isn't respected (and it'll be the
frustrating why-doesn't-anything-I-do-effect-the-output kind of problem).
--
Ian Bicking / [EMAIL PROTECTED] / http://blog.ianbicking.org