[Zope-dev] ZConfig: a wish list
    barry at zope.com 
    barry at zope.com
       
    Mon Dec 29 14:12:00 EST 2003
    
    
  
As I mentioned, I've been experimenting with Mailman 3 lately, using
ZConfig as the configuration language for basic functionality.  There
are many things I like about ZConfig, but of course I have a few nits.
Since the wiki Fred created on zope.org doesn't (or didn't) seem to
work, I'll post my wish list here.  Feel free to tell me why I don't
really want what I think I want. :)
- import honors prefixy
  In my schemas, I have a number of import statements, each with
  package and file attributes (since the default component.xml naming
  scheme doesn't work for my code layout).  Unfortunately, if my
  <schema> tag has a prefix attribute, import's package attribute
  doesn't honor it, so there's a lot of duplication.  For example:
  <schema prefix="mailman.config.components">
      <import file="databases.xml">
      <import file="domains.xml">
      ...
- $ substitutions in defaults
  Often, my defaults for keys can be expressed in terms of $
  substitutions that are more general for my system.  Unfortunately,
  there doesn't seem to be any way to make this work.  ZConfig itself
  doesn't perform $ substitutions on default values, and there doesn't
  appear to be a way to get at %define variables from Python.
- default sections
  At some point I thought it might be nice to be able to define
  default sections, so that you wouldn't have to require something
  like "<defaultsect/>" in your config file.
- Python command substitutions
  Something like:
  %define hostname socket.getfqdn()
  although I know there are some difficult issues with this (imports
  for one).
- attributes default to type
  When defining a section, if I don't provide a section name, it would
  be nice if the attribute was defaulted to the section type.  E.g. in
  this example:
  <section type="databases" name="*" required="yes" attribute="databases"/>
  IWBNI I didn't have to duplicate the "databases" string.
That's it for now.
-Barry
    
    
More information about the Zope-Dev
mailing list