[Mailman-Developers] MM3 Test "" Hangs

Mark Sapiro mark at msapiro.net
Thu Feb 27 06:21:58 CET 2014


On 02/26/2014 06:42 PM, Barry Warsaw wrote:
> On Feb 26, 2014, at 04:57 PM, Mark Sapiro wrote:
> 
>> The error (failed test) was due to the default encoding in this Python
>> installation being UTF-8 rather than ascii. Changing sitecustomise.py to
>> not set UTF-8 allowed the test to succeed.
> 
> Hmm.  My locale is UTF-8 and I don't see this failure.  Still, if you file a
> bug, we should double check that there's not an encoding dependency here.


It's more than just locale. You have to run

import sys
sys.getdefaultencoding()

and see what it returns. Normally, it returns 'ascii' even in systems
whose locale is UTF-8. You have to put/or enable something in
sitecustomize.py (On Ubuntu a symlink to
/etc/python2.7/sitecustomize.py) to get it to use the locale.

Anyway, when sys.getdefaultencoding() returns 'UTF-8', one of the tests
in src/mailman/model/docs/registration.rst fails because it's expecting

InvalidEmailAddressError: \xa0 at example.com

and instead of \xa0, it gets the UTF-8 encoding of a no-break space.

I've filed <https://bugs.launchpad.net/mailman/+bug/1285496> for this.

-- 
Mark Sapiro <mark at msapiro.net>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan


More information about the Mailman-Developers mailing list