[pypy-commit] pypy py3k: This tweak is not necessary anymore
amauryfa
noreply at buildbot.pypy.org
Sat Oct 22 00:28:43 CEST 2011
Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
Branch: py3k
Changeset: r48335:643e31c7752c
Date: 2011-10-22 00:24 +0200
http://bitbucket.org/pypy/pypy/changeset/643e31c7752c/
Log: This tweak is not necessary anymore
diff --git a/lib-python/3.2/tokenize.py b/lib-python/3.2/tokenize.py
--- a/lib-python/3.2/tokenize.py
+++ b/lib-python/3.2/tokenize.py
@@ -30,7 +30,7 @@
from token import *
from codecs import lookup, BOM_UTF8
import collections
-import io
+from io import TextIOWrapper
cookie_re = re.compile("coding[:=]\s*([-\w.]+)")
import token
@@ -340,10 +340,10 @@
"""Open a file in read only mode using the encoding detected by
detect_encoding().
"""
- buffer = io.open(filename, 'rb')
+ buffer = builtins.open(filename, 'rb')
encoding, lines = detect_encoding(buffer.readline)
buffer.seek(0)
- text = io.TextIOWrapper(buffer, encoding, line_buffering=True)
+ text = TextIOWrapper(buffer, encoding, line_buffering=True)
text.mode = 'r'
return text
More information about the pypy-commit
mailing list