[Python-checkins] r68758 - in python/branches/io-c/Lib/importlib: __init__.py _bootstrap.py

antoine.pitrou python-checkins at python.org
Mon Jan 19 01:36:16 CET 2009


Author: antoine.pitrou
Date: Mon Jan 19 01:36:16 2009
New Revision: 68758

Log:
in importlib:_fileio._FileIO -> _io.FileIO



Modified:
   python/branches/io-c/Lib/importlib/__init__.py
   python/branches/io-c/Lib/importlib/_bootstrap.py

Modified: python/branches/io-c/Lib/importlib/__init__.py
==============================================================================
--- python/branches/io-c/Lib/importlib/__init__.py	(original)
+++ python/branches/io-c/Lib/importlib/__init__.py	Mon Jan 19 01:36:16 2009
@@ -112,12 +112,12 @@
         except ImportError:
             raise ImportError('posix, nt, or os2 module required for importlib')
 _bootstrap._os = _os
-import imp, sys, marshal, errno, _fileio
+import imp, sys, marshal, errno, _io
 _bootstrap.imp = imp
 _bootstrap.sys = sys
 _bootstrap.marshal = marshal
 _bootstrap.errno = errno
-_bootstrap._fileio = _fileio
+_bootstrap._io = _io
 import _warnings
 _bootstrap._warnings = _warnings
 

Modified: python/branches/io-c/Lib/importlib/_bootstrap.py
==============================================================================
--- python/branches/io-c/Lib/importlib/_bootstrap.py	(original)
+++ python/branches/io-c/Lib/importlib/_bootstrap.py	Mon Jan 19 01:36:16 2009
@@ -431,7 +431,7 @@
         if source_path is None:
             return None
         import tokenize
-        with closing(_fileio_FileIO(source_path, 'r')) as file:
+        with closing(_ioFileIO(source_path, 'r')) as file:
             encoding, lines = tokenize.detect_encoding(file.readline)
         # XXX Will fail when passed to compile() if the encoding is
         # anything other than UTF-8.
@@ -448,7 +448,7 @@
         source_path = self._source_path()
         if source_path is None:
             return None
-        with closing(_fileio._FileIO(source_path, 'r')) as bytes_file:
+        with closing(_io.FileIO(source_path, 'r')) as bytes_file:
             return bytes_file.read(), source_path
 
     @check_name
@@ -463,7 +463,7 @@
         path = self._bytecode_path()
         if path is None:
             return None
-        file = _fileio._FileIO(path, 'r')
+        file = _io.FileIO(path, 'r')
         try:
             with closing(file) as bytecode_file:
                 data = bytecode_file.read()
@@ -484,7 +484,7 @@
         bytecode_path = self._bytecode_path()
         if not bytecode_path:
             bytecode_path = self._base_path + suffix_list(imp.PY_COMPILED)[0]
-        file = _fileio._FileIO(bytecode_path, 'w')
+        file = _io.FileIO(bytecode_path, 'w')
         try:
             with closing(file) as bytecode_file:
                 bytecode_file.write(magic)
@@ -579,7 +579,7 @@
 
     def get_data(self, path):
         """Return the data from path as raw bytes."""
-        return _fileio._FileIO(path, 'r').read()
+        return _io.FileIO(path, 'r').read()
 
     @check_name
     def is_package(self, fullname):


More information about the Python-checkins mailing list