[Mailman-Developers] Python 3

Barry Warsaw barry at list.org
Fri Dec 26 22:47:29 CET 2014

On Dec 26, 2014, at 10:32 PM, Aurelien Bompard wrote:

>Right, I'm having issues too with the config file not being initalized.
>I'll have a closer look.

Awesome, thanks.

>I'm not exclusively using the REST API though. I'm importing a couple
>interfaces, mostly the archiver interface. I'm also using the custom Message
>class a lot in the tests. And I'm importing a couple database types for
>compatibility in my own schemas (Enum and UUID)

I wonder if it would be possible to refactor some of this code into separate
libraries, which would reduce the surface area for bilingual support.  The
config object is probably the tricky part here, but also the Message class has
a lot less in it now that we don't have to worry about all that unicode stuff.
Really, it's essentially just the .sender and .senders properties and some
backward compatible pickle support (unnecessary atm for MM3 and probably not
much needed going forward, unless the stdlib Message object in some future
Python grows internal attributes that break unpickling - I'll certainly test
that against what will be Python 3.5).

>But I think the main problem is the import of mailman's config object in the
>class that implements the IArchiver interface. I don't believe there's
>another way to get the configuration.

But there could be!  I took a very quick look at HK (but not KittyStore) and
it doesn't look like you need much.  What if I added a REST API to access the
core's system configuration settings?  They would be read-only, and I would
only start with the minimum of what HK needs.  I think it's probably dangerous
in the long term to expect the core's internal config API to remain stable, so
accessing that through REST would provide the guarantees you need, in addition
to decoupling HK from the core.

>And now that I think of it, the archiver interface will be imported by
>Mailman core, and will thus run with a Python3 interpreter. As a result, all
>of KittyStore must at least be Python3 compatible.

Yep, I missed that.  Is it possible to feed HK messages out-of-process?
E.g. via the command line?  If so, then we write HK's IArchiver implementation
to make those out of process calls, and we can even pull that bit into the

I would be happy to help with that.


More information about the Mailman-Developers mailing list