cpython: 47b4dbd451f5 (original) (raw)

Mercurial > cpython

changeset 103229:47b4dbd451f5

Issue #27959: Prevent ImportError from escaping codec search function [#27959]

Steve Dower steve.dower@microsoft.com
date Wed, 07 Sep 2016 09:31:52 -0700
parents f6412378821c
children 1b1abe815db0
files Lib/encodings/__init__.py Lib/test/test_io.py
diffstat 2 files changed, 9 insertions(+), 6 deletions(-)[+] [-] Lib/encodings/__init__.py 12 Lib/test/test_io.py 3

line wrap: on

line diff

--- a/Lib/encodings/init.py +++ b/Lib/encodings/init.py @@ -155,9 +155,13 @@ codecs.register(search_function) if sys.platform == 'win32': def _alias_mbcs(encoding):

codecs.register(_alias_mbcs)

--- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -3230,8 +3230,7 @@ def _to_memoryview(buf): class CTextIOWrapperTest(TextIOWrapperTest): io = io

def test_initialization(self): r = self.BytesIO(b"\xc3\xa9\n\n")