Re: [Mailman-Developers] Integrating HyperKitty with Mailman3
On Monday, April 9, 2012, Barry Warsaw wrote: So I can turn this question around and ask, what's the best way to get messages into ClearSilver? Drop it into a Maildir, so that the version of Python we use for CSLA isn't locked to the version of Python for MM3. Perhaps the MM3 CSLA handler can do things like manage the maildir, start/stop CSLA, etc. I'll take a look. Python imports are not version-dependent (like C-shlibs are), so it seems dubious to expect an external archiver to necessarily be compatible with the same version of python that MM3 is. I know I've run into this problem in the past, especially because of how much the python MIME message classes changed over each python release (though hopefully they are more stable now) Well, until email6 is released, Mailman 3 is ported to Python 3, and we can all (finally) do email the right way in Python. :) I'll believe Python will stabilize the email APIs when I see it. :) A decade ago we resorted to copying all the email handling classes out of the python dist and into our own code so we could keep using the ones that we depended on while upgrading python. ___ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9
Re: [Mailman-Developers] Integrating HyperKitty with Mailman3
On Apr 08, 2012, at 09:52 PM, David Jeske wrote: Are you expecting this direct python configuration import to actually be an archiver, or simply to be a configuration shim to get data to an archiver? Whatever makes the most sense for that particular archiver. The prototype archiver is so (purposely) dumb that it's implemented right in process. The Mail Archive shim just drops a copy of the message into the outgoing queue, after it calculates the appropriate recipient address. IOW, it sets the message up to be forwarded to their service over SMTP. The MHonArc shim just shells out to the appropriate command, piping the message bytes to that command's stdin. So I can turn this question around and ask, what's the best way to get messages into ClearSilver? Python imports are not version-dependent (like C-shlibs are), so it seems dubious to expect an external archiver to necessarily be compatible with the same version of python that MM3 is. I know I've run into this problem in the past, especially because of how much the python MIME message classes changed over each python release (though hopefully they are more stable now) Well, until email6 is released, Mailman 3 is ported to Python 3, and we can all (finally) do email the right way in Python. :) Cheers, -Barry signature.asc Description: PGP signature ___ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9
Re: [Mailman-Developers] Integrating HyperKitty with Mailman3
On Apr 08, 2012, at 06:58 AM, Aamir Khan wrote: I believe that after integrating HyperKitty with mailman, there will be archiver['hyperkitty'] which can be used to archive the messages. Am i correct? Yes, but that's mostly an implementation detail you don't need to worry about. config.archivers is just for internal bookkeeping and use in the ArchiveRunner. http://packages.python.org/mailman/src/mailman/archiving/docs/common.html#sending-the-message-to-the-archiver I know that mailman3 offers pluggable architecture, but still after going through some documentation it is not apparent to me how exactly HyperKitty will be integrated with mailman3. Can somebody briefly explain and point out to relevant files in source code ? It's relatively straightforward, once you understand how the configuration system works. The file src/mailman/config/schema.cfg is a kind of template for the mailman.cfg ini file. Search down for the [archive.master] section; this is a template for other [archiver.foo] sections. In here, you'll see all the default variables and their values for configuring an archiver. Look a little farther down and you'll see for example the [archiver.prototype] section which provides just the relevant overrides for the `prototype` archiver. So, to enable hyperkitty, you would have to add something like the following section in your mailman.cfg file: -snip snip- [archiver.hyperkitty] class: python.path.to.hyperkitty.HyperKitty -snip snip- Of course, you'd probably want to `enable` it too. One tricky thing here is that the `class` value names a Python dotted-module path, so the class must be importable. Ensuring that the hyperkitty module (and this is just a suggestion, YMMV) is importable by the core engine may not be fully baked. For now, just set $PYTHONPATH. The final bit of the puzzle is that the python.path.to.hyperkitty.HyperKitty class must implement the IArchiver interface, although if it's impossible to implement something like permalink(), it should just raise a NotImplementedError. Take a look at the Prototype class for an example. Note that all the magic of getting a message into the archiver happens through the archive_message() method of IArchiver. This can do anything you need to do to inject the message into the archiver. It can make direct Python calls, like the prototype archiver does, or it shell out to a command like the MHonArc archiver does, or it can send an email like the MailArchive one does. Hope that helps. -Barry ___ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9
Re: [Mailman-Developers] Integrating HyperKitty with Mailman3
Are you expecting this direct python configuration import to actually be an archiver, or simply to be a configuration shim to get data to an archiver? Python imports are not version-dependent (like C-shlibs are), so it seems dubious to expect an external archiver to necessarily be compatible with the same version of python that MM3 is. I know I've run into this problem in the past, especially because of how much the python MIME message classes changed over each python release (though hopefully they are more stable now) On Apr 8, 2012 9:39 AM, Barry Warsaw ba...@list.org wrote: -snip snip- [archiver.hyperkitty] class: python.path.to.hyperkitty.HyperKitty -snip snip- Of course, you'd probably want to `enable` it too. One tricky thing here is that the `class` value names a Python dotted-module path, so the class must be importable. Ensuring that the hyperkitty module (and this is just a suggestion, YMMV) is importable by the core engine may not be fully baked. For now, just set $PYTHONPATH. ___ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9
[Mailman-Developers] Integrating HyperKitty with Mailman3
I believe that after integrating HyperKitty with mailman, there will be archiver['hyperkitty'] which can be used to archive the messages. Am i correct? http://packages.python.org/mailman/src/mailman/archiving/docs/common.html#sending-the-message-to-the-archiver I know that mailman3 offers pluggable architecture, but still after going through some documentation it is not apparent to me how exactly HyperKitty will be integrated with mailman3. Can somebody briefly explain and point out to relevant files in source code ? -- Aamir Khan | 3rd Year | Computer Science Engineering | IIT Roorkee ___ Mailman-Developers mailing list Mailman-Developers@python.org http://mail.python.org/mailman/listinfo/mailman-developers Mailman FAQ: http://wiki.list.org/x/AgA3 Searchable Archives: http://www.mail-archive.com/mailman-developers%40python.org/ Unsubscribe: http://mail.python.org/mailman/options/mailman-developers/archive%40jab.org Security Policy: http://wiki.list.org/x/QIA9