diff --git a/IPython/core/completer.py b/IPython/core/completer.py index a969045..4928b92 100644 --- a/IPython/core/completer.py +++ b/IPython/core/completer.py @@ -121,7 +121,7 @@ def protect_filename(s): if sys.platform == "win32": return '"' + s + '"' else: - return "".join("\\" + c if c in PROTECTABLES else c for c in s) + return "".join(("\\" + c if c in PROTECTABLES else c) for c in s) else: return s diff --git a/IPython/utils/path.py b/IPython/utils/path.py index 1a6cd8e..1d2c9e8 100644 --- a/IPython/utils/path.py +++ b/IPython/utils/path.py @@ -73,6 +73,9 @@ def get_long_path_name(path): def unquote_filename(name, win32=(sys.platform=='win32')): """ On Windows, remove leading and trailing quotes from filenames. + + This function has been deprecated and should not be used any more: + unquoting is now taken care of by :func:`IPython.utils.process.arg_split`. """ warn("'unquote_filename' is deprecated", DeprecationWarning) if win32: @@ -83,7 +86,7 @@ def unquote_filename(name, win32=(sys.platform=='win32')): def compress_user(path): """Reverse of :func:`os.path.expanduser` - """ + """ path = py3compat.unicode_to_str(path, sys.getfilesystemencoding()) home = os.path.expanduser('~') if path.startswith(home):