diff options
Diffstat (limited to 'logilab/common/modutils.py')
-rw-r--r-- | logilab/common/modutils.py | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/logilab/common/modutils.py b/logilab/common/modutils.py index 030cfa3..34419bd 100644 --- a/logilab/common/modutils.py +++ b/logilab/common/modutils.py @@ -38,9 +38,6 @@ from imp import find_module, load_module, C_BUILTIN, PY_COMPILED, PKG_DIRECTORY from distutils.sysconfig import get_config_var, get_python_lib, get_python_version from distutils.errors import DistutilsPlatformError -from six import PY3 -from six.moves import map, range - try: import zipimport except ImportError: @@ -226,14 +223,6 @@ def _canonicalize_path(path): return realpath(expanduser(path)) -def _path_from_filename(filename): - if PY3: - return filename - else: - if filename.endswith(".pyc"): - return filename[:-1] - return filename - @deprecated('you should avoid using modpath_from_file()') def modpath_from_file(filename, extrapath=None): @@ -258,7 +247,6 @@ def modpath_from_file(filename, extrapath=None): :rtype: list(str) :return: the corresponding splitted module's name """ - filename = _path_from_filename(filename) filename = _canonicalize_path(filename) base = os.path.splitext(filename)[0] |