Issue21171
Created on 2014-04-07 16:25 by Pix, last changed 2014-04-17 03:33 by benjamin.peterson. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| issue21171.diff | berker.peksag, 2014-04-08 05:07 | review | ||
| Messages (5) | |||
|---|---|---|---|
| msg215712 - (view) | Author: Михаил Мишакин (Pix) | Date: 2014-04-07 16:25 | |
Function rot13 in file "encodings/rot_13.py" throws exception: LookupError: 'rot-13' is not a text encoding; use codecs.encode() to handle arbitrary codecs |
|||
| msg215733 - (view) | Author: Berker Peksag (berker.peksag) * | Date: 2014-04-08 05:07 | |
Here's a patch. I tested it with the following command:
$ cat LICENSE | ./python -m encodings.rot_13
|
|||
| msg215944 - (view) | Author: Terry J. Reedy (terry.reedy) * | Date: 2014-04-11 18:38 | |
Since rot_13 is a transcoder, not an encoder, the error message is correct, as is the fix for the function. However, since neither the module encodings.rot_13 nor the rot13 function in the module are documented, (not even in 2.7), I wonder if the function and the if __name__; clause are ancient holdovers that should be removed. In other words, I am not sure if Berker's test is currently a supported usage. I remember that there was some discussion on pydev about how much to add back but not the details. |
|||
| msg216005 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * | Date: 2014-04-13 09:10 | |
LGTM. |
|||
| msg216017 - (view) | Author: Roundup Robot (python-dev) | Date: 2014-04-13 14:09 | |
New changeset a81f0caab279 by Serhiy Storchaka in branch '3.4': Issue #21171: Fixed undocumented filter API of the rot13 codec. http://hg.python.org/cpython/rev/a81f0caab279 New changeset f86504da2fcc by Serhiy Storchaka in branch 'default': Issue #21171: Fixed undocumented filter API of the rot13 codec. http://hg.python.org/cpython/rev/f86504da2fcc |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2014-04-17 03:33:28 | benjamin.peterson | set | status: open -> closed resolution: fixed |
| 2014-04-13 14:09:05 | python-dev | set | nosy:
+ python-dev messages: + msg216017 |
| 2014-04-13 09:10:04 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg216005 |
| 2014-04-12 06:24:52 | eric.araujo | set | nosy:
+ eric.araujo |
| 2014-04-12 03:29:45 | vstinner | set | nosy:
+ ncoghlan |
| 2014-04-11 18:38:07 | terry.reedy | set | nosy:
+ ezio.melotti, vstinner, benjamin.peterson, pitrou, terry.reedy messages: + msg215944 |
| 2014-04-08 05:07:29 | berker.peksag | set | files:
+ issue21171.diff type: enhancement -> behavior keywords:
+ patch |
| 2014-04-08 05:00:03 | berker.peksag | set | nosy:
+ lemburg |
| 2014-04-07 16:27:14 | Pix | set | components: + Library (Lib) |
| 2014-04-07 16:25:51 | Pix | create | |