[issue8898] The email package should defer to the codecs module for all aliases

Ezio Melotti report at bugs.python.org
Sun May 22 00:51:59 CEST 2011


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

The patch looks ok to me.
AFAIU the lookup will take care to normalize the name and return latin_N.  This also implies that other names (like 'latin-N', 'LaTiN~~N' and so on) will be normalized to latin_N and then accepted.

Regarding the tests, I don't see tests for the aliases anywhere, so something like:
for alias, codec_name in encodings.aliases.items():
    self.assertEqual(codecs.lookup(alias).name, codec_name)
could be added somewhere to check that all the aliases in the dict map to the correct codec.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8898>
_______________________________________


More information about the Python-bugs-list mailing list