[Mailman-Developers] Python3 port of Mailman3

Abhilash Raj raj.abhilash1 at gmail.com
Wed Nov 26 10:00:59 CET 2014


Hi All,

I am working on porting mailman3 to python3. There are few doubts I have
which may sound stupid, but I have a little knowledge about encoding and
charsets which I think is important for the port. Also this is my first
time working
on python3 so forgive me for asking anything obvious( I did try googling
first) The code is in very preliminary stages with tons of errors. Its up
on launchpad.

    lp:~raj-abhilash1/mailman/py3

So my doubts:

1. `pkg_resources.resource_string` used to read the configuration files
while
initialization and testing now returns bytes instead of string(like in
python2).
So instead I use `pkg_resources.resource_stream` and deocode to the steam
to a `utf-8` encoding(why? to avoid errors for the time being). I wanted to
ask
what would be the best for this case?

2. To create a hash everywhere unicode strings must be encoded. So again the
same question what should I encode it to? UTF-8 or US-ASCII? Or someway to
determine which encoding should be used?


Also if anybody has suggestions on porting please let me know. I am online
sporadically on irc as `maxking` on #mailman (I see all of the messages sent
while I am away).

thanks,
Abhilash Raj


More information about the Mailman-Developers mailing list