From: Serhiy Storchaka Date: Sun, 13 Apr 2014 14:07:04 +0000 (+0300) Subject: Issue #21171: Fixed undocumented filter API of the rot13 codec. X-Git-Tag: v3.4.1rc1~104 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a39938ff44ae9e63ae04b9b2856921a44bdf2b2c;p=thirdparty%2FPython%2Fcpython.git Issue #21171: Fixed undocumented filter API of the rot13 codec. Patch by Berker Peksag. --- diff --git a/Lib/encodings/rot_13.py b/Lib/encodings/rot_13.py index 1f2f47bb34f3..f0b4186dc877 100755 --- a/Lib/encodings/rot_13.py +++ b/Lib/encodings/rot_13.py @@ -106,7 +106,7 @@ rot13_map.update({ ### Filter API def rot13(infile, outfile): - outfile.write(infile.read().encode('rot-13')) + outfile.write(codecs.encode(infile.read(), 'rot-13')) if __name__ == '__main__': import sys diff --git a/Misc/NEWS b/Misc/NEWS index d4c06965e9a2..f381c93109b0 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -27,6 +27,9 @@ Core and Builtins Library ------- +- Issue #21171: Fixed undocumented filter API of the rot13 codec. + Patch by Berker Peksag. + - Issue #21172: isinstance check relaxed from dict to collections.Mapping. - Issue #21155: asyncio.EventLoop.create_unix_server() now raises a ValueError