@@ -67,20 +67,6 @@ def get_long_path_name(path):
6767 return _get_long_path_name (path )
6868
6969
70- def unquote_filename (name , win32 = (sys .platform == 'win32' )):
71- """ On Windows, remove leading and trailing quotes from filenames.
72-
73- This function has been deprecated and should not be used any more:
74- unquoting is now taken care of by :func:`IPython.utils.process.arg_split`.
75- """
76- warn ("'unquote_filename' is deprecated since IPython 5.0 and should not "
77- "be used anymore" , DeprecationWarning , stacklevel = 2 )
78- if win32 :
79- if name .startswith (("'" , '"' )) and name .endswith (("'" , '"' )):
80- name = name [1 :- 1 ]
81- return name
82-
83-
8470def compress_user (path ):
8571 """Reverse of :func:`os.path.expanduser`
8672 """
@@ -89,18 +75,14 @@ def compress_user(path):
8975 path = "~" + path [len (home ):]
9076 return path
9177
92- def get_py_filename (name , force_win32 = None ):
78+ def get_py_filename (name ):
9379 """Return a valid python filename in the current directory.
9480
9581 If the given name is not a file, it adds '.py' and searches again.
9682 Raises IOError with an informative message if the file isn't found.
9783 """
9884
9985 name = os .path .expanduser (name )
100- if force_win32 is not None :
101- warn ("The 'force_win32' argument to 'get_py_filename' is deprecated "
102- "since IPython 5.0 and should not be used anymore" ,
103- DeprecationWarning , stacklevel = 2 )
10486 if not os .path .isfile (name ) and not name .endswith ('.py' ):
10587 name += '.py'
10688 if os .path .isfile (name ):
@@ -253,36 +235,6 @@ def get_xdg_cache_dir():
253235 return None
254236
255237
256- @undoc
257- def get_ipython_dir ():
258- warn ("get_ipython_dir has moved to the IPython.paths module since IPython 4.0." , DeprecationWarning , stacklevel = 2 )
259- from IPython .paths import get_ipython_dir
260- return get_ipython_dir ()
261-
262- @undoc
263- def get_ipython_cache_dir ():
264- warn ("get_ipython_cache_dir has moved to the IPython.paths module since IPython 4.0." , DeprecationWarning , stacklevel = 2 )
265- from IPython .paths import get_ipython_cache_dir
266- return get_ipython_cache_dir ()
267-
268- @undoc
269- def get_ipython_package_dir ():
270- warn ("get_ipython_package_dir has moved to the IPython.paths module since IPython 4.0." , DeprecationWarning , stacklevel = 2 )
271- from IPython .paths import get_ipython_package_dir
272- return get_ipython_package_dir ()
273-
274- @undoc
275- def get_ipython_module_path (module_str ):
276- warn ("get_ipython_module_path has moved to the IPython.paths module since IPython 4.0." , DeprecationWarning , stacklevel = 2 )
277- from IPython .paths import get_ipython_module_path
278- return get_ipython_module_path (module_str )
279-
280- @undoc
281- def locate_profile (profile = 'default' ):
282- warn ("locate_profile has moved to the IPython.paths module since IPython 4.0." , DeprecationWarning , stacklevel = 2 )
283- from IPython .paths import locate_profile
284- return locate_profile (profile = profile )
285-
286238def expand_path (s ):
287239 """Expand $VARS and ~names in a string, like a shell
288240
0 commit comments