Commits

Amaury Forgeot d'Arc  committed 643e31c

This tweak is not necessary anymore

  • Participants
  • Parent commits 7ab59b0
  • Branches py3k

Comments (0)

Files changed (1)

File lib-python/3.2/tokenize.py

 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
     """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