--- /usr/lib/python3.3/lib2to3/fixes/fix_import.py 2013-06-13 14:43:13.000000000 +0200 +++ Limnoria/2to3/fix_import.py 2013-07-16 22:59:56.000000000 +0200 @@ -11,9 +11,10 @@ """ # Local imports from .. import fixer_base -from os.path import dirname, join, exists, sep +from os.path import dirname, join, exists, sep, split, isdir +from os import listdir from ..fixer_util import FromImport, syms, token def traverse_imports(names): @@ -93,7 +94,13 @@ # so can't be a relative import. if not exists(join(dirname(base_path), "__init__.py")): return False - for ext in [".py", sep, ".pyc", ".so", ".sl", ".pyd"]: - if exists(base_path + ext): + (path, filename) = split(base_path) + if isdir(base_path) and filename in listdir(path): + # We use listdir too because of case-insensitivity on Windows + return True + for ext in [".py", ".pyc", ".so", ".sl", ".pyd"]: + if (filename + ext) in listdir(path): + # We use this instead of os.path.exists because of case-insensitivity + # on Windows return True return False