diff options
author | Philippe Pepiot <philippe.pepiot@logilab.fr> | 2019-11-08 14:48:57 +0100 |
---|---|---|
committer | Philippe Pepiot <philippe.pepiot@logilab.fr> | 2019-11-08 14:48:57 +0100 |
commit | 52082ad6424aaece561f50ade2f739103c177496 (patch) | |
tree | 8e6e4d2f06c74d45f3ca5966be5c88b8cd9bbb8a /logilab/common/modutils.py | |
parent | b78546d50cac911caeaf170612bbd8bde3d9f485 (diff) | |
download | logilab-common-52082ad6424aaece561f50ade2f739103c177496.tar.gz |
Nearly drop dependency on six
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] |