Author: Amaury Forgeot d'Arc <amaur...@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
 
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to