]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Issue #19543: Emit deprecation warning for known non-text encodings.
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 31 May 2015 17:21:00 +0000 (20:21 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Sun, 31 May 2015 17:21:00 +0000 (20:21 +0300)
commitc7797dc7482035ee166ca2e941b623382b92e1fc
tree526e26fa4dac506f02859fdbe946d33ed4165f5e
parentcfb7028df4bdf12325786e48ebef3b4982efa119
Issue #19543: Emit deprecation warning for known non-text encodings.

Backported issues #19619: encode() and decode() methods and constructors
of str, unicode and bytearray classes now emit deprecation warning for known
non-text encodings when Python is ran with the -3 option.

Backported issues #20404: io.TextIOWrapper (and hence io.open()) now uses the
internal codec marking system added to emit deprecation warning for known non-text
encodings at stream construction time when Python is ran with the -3 option.
22 files changed:
Include/codecs.h
Lib/_pyio.py
Lib/codecs.py
Lib/encodings/base64_codec.py
Lib/encodings/bz2_codec.py
Lib/encodings/hex_codec.py
Lib/encodings/quopri_codec.py
Lib/encodings/rot_13.py
Lib/encodings/uu_codec.py
Lib/encodings/zlib_codec.py
Lib/json/decoder.py
Lib/test/string_tests.py
Lib/test/test_calendar.py
Lib/test/test_codecs.py
Lib/test/test_fileinput.py
Lib/test/test_io.py
Misc/NEWS
Modules/_io/textio.c
Objects/bytearrayobject.c
Objects/stringobject.c
Objects/unicodeobject.c
Python/codecs.c