bpo-29783: Replace codecs.open() with io.open() (#599)

This commit is contained in:
Victor Stinner 2017-06-16 08:59:01 +02:00 committed by GitHub
parent faa63d1e84
commit 272d888c7b
5 changed files with 18 additions and 39 deletions

View file

@ -5,9 +5,10 @@ Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""#"
"""
import builtins, sys
import builtins
import sys
### Registry and builtin stateless codec functions
@ -739,7 +740,7 @@ class StreamReaderWriter:
"""
return getattr(self.stream, name)
# these are needed to make "with codecs.open(...)" work properly
# these are needed to make "with StreamReaderWriter(...)" work properly
def __enter__(self):
return self