[New-bugs-announce] [issue8898] The email package should defer to the codecs module for all aliases

R. David Murray report at bugs.python.org
Fri Jun 4 20:53:51 CEST 2010

New submission from R. David Murray <rdmurray at bitdance.com>:

Currently the email module maintains a set of "charset" aliases that it maps to codec names before looking up the codec in the codecs module.  Ideally it should instead be able to just look up any 'charset' name, and if it is a valid alias for a codec, the codec module would return the codec with the canonical name.  It is possible (I haven't checked yet) that the email module needs a different canonical  'charset' name for certain codecs, but if so it can do that mapping after getting the canonical codec name from codecs.

To implement this we need to make two simple changes:

1) add any aliases the email module recognizes but the codecs module doesn't to the codecs module.

2) rewrite email.charset so that it does not have an ALIASES table (but may have a smaller 'canonical charset map' table instead).

assignee: r.david.murray
components: Library (Lib)
keywords: easy
messages: 107087
nosy: l0nwlf, lemburg, r.david.murray
priority: normal
severity: normal
stage: unit test needed
status: open
title: The email package should defer to the codecs module for all aliases
type: feature request
versions: Python 3.2

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list