classification
Title: email docstrings and comments say about Unicode strings
Type: behavior Stage: needs patch
Components: email Versions: Python 3.3, Python 3.4
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: barry, r.david.murray, serhiy.storchaka
Priority: normal Keywords:

Created on 2013-08-19 07:20 by serhiy.storchaka, last changed 2013-08-19 19:16 by r.david.murray.

Messages (5)
msg195605 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-08-19 07:20
email docstrings and comments uses the "Unicode string" term and refer to the unicode() built-in. In 3.x this should be corrected to "string" and "str()". Perhaps some code (for example coercing a charset name to Unicode) is not needed more.
msg195625 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-08-19 12:34
If you mean the code in Charset's __init__, if you change that you'll have backward compatibility issues.  As the code currently stands it is legal to pass in a charset name that is bytes.  And the string path of that if checks that it contains only ASCII characters, a check that is also still required.
msg195626 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-08-19 12:34
The comment, however, is clearly no longer appropriate :)
msg195651 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-08-19 17:40
It is just unusual to accept a bytes object as a charset name. Of course if it is needed for Charset's __init__ the code should not be removed.
msg195658 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2013-08-19 19:16
Yeah, if I could have a do-over of the 3.0 port, I'd probably drop the acceptance of byte strings.  Maybe we can deprecate it.
History
Date User Action Args
2013-08-19 19:16:53r.david.murraysetmessages: + msg195658
2013-08-19 17:40:39serhiy.storchakasetmessages: + msg195651
2013-08-19 12:34:36r.david.murraysetmessages: + msg195626
2013-08-19 12:34:06r.david.murraysetmessages: + msg195625
2013-08-19 07:20:20serhiy.storchakacreate