[Python-checkins] cpython (merge 3.4 -> default): Issue #21171: Fixed undocumented filter API of the rot13 codec.
serhiy.storchaka
python-checkins at python.org
Sun Apr 13 16:09:06 CEST 2014
http://hg.python.org/cpython/rev/f86504da2fcc
changeset: 90228:f86504da2fcc
parent: 90226:84bc6998f760
parent: 90227:a81f0caab279
user: Serhiy Storchaka <storchaka at gmail.com>
date: Sun Apr 13 17:08:51 2014 +0300
summary:
Issue #21171: Fixed undocumented filter API of the rot13 codec.
Patch by Berker Peksag.
files:
Lib/encodings/rot_13.py | 2 +-
Misc/NEWS | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Lib/encodings/rot_13.py b/Lib/encodings/rot_13.py
--- a/Lib/encodings/rot_13.py
+++ b/Lib/encodings/rot_13.py
@@ -106,7 +106,7 @@
### 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
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -34,6 +34,9 @@
Library
-------
+- Issue #21171: Fixed undocumented filter API of the rot13 codec.
+ Patch by Berker Peksag.
+
- Issue #20539: Improved math.factorial error message for large positive inputs
and changed exception type (OverflowError -> ValueError) for large negative
inputs.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list