[Mailman-Developers] Adding keys in the configuration file

Aurelien Bompard aurelien at bompard.org
Thu Sep 13 18:13:10 CEST 2012


> You had mentioned a reference to the Django settings for HK.

Yes, my idea was to have something like that in the mailman.cfg file :

  [archiver.hyperkitty]
  enabled: yes
  class: hyperkitty.archiver.Archiver
  base_url: http://archives.example.com
  conf_file: /path/to/django/app/settings.py

Only the conf_file key is invalid at the moment. It references the
path to a Django settings file, but that's all.
The Archiver class will then use this value to import the settings and
go on with its job. That's the only place where there will be an
import from the django namespace.

> Even if HK is enabled, django should not get imported into the MM space.

I'm not sure I understand that. You mean in the same process memory ?
Then I'm limited to some kind of client-server architecture, which I
fear will have performance issues since we're passing every messages
around. Or am I missing something ?

> The proper way to handle the issue of URLs would be to have the MM core query the UI for them.

Well, I thought that's what it did currently. It imports a HK-specific
class, which loads Django's settings to build the proper URL fragment
when the appropriate method is called. What kind of query do you mean
?

> However, I have yet to convince Barry that the present model (where, at present, MM is the only part allowed to be authoritative over ANY information that it uses) is inappropriate.
> So, for the present, we need to have a proxy for the UI and a section of the configuration that specifies the values for the parameters which it supplies.
> IMHO, we should actually treat it as multiple proxies so that we can handle the more generic configuration in a consistent manner.

I'm kinda lost here. I sort of understand that you're in favor of
making the configuration file more extendable to fit the extension's
needs, which would solve my problem. Mailman can't know in advance
what kind of configuration values an extension needs, so in my opinion
the conf file should either allow extensions to put arbitrary keys
there (in sub-sub-sections for example), or let the admin specify the
path to another configuration file, which would be extension-specific.

Anything I'm missing ? Barry, any comments ?

Thanks for your input !

Aurélien


More information about the Mailman-Developers mailing list