diff options
| author | Alexander Smirnov <[email protected]> | 2024-03-13 10:33:47 +0000 |
|---|---|---|
| committer | Alexander Smirnov <[email protected]> | 2024-03-13 10:33:47 +0000 |
| commit | 1df54be5538361db7f33afc618d1597272414294 (patch) | |
| tree | bb39e4b75db0b0a9722468eacef91ffd1388eb8d /contrib/python/ipython/py3/IPython/utils/path.py | |
| parent | 7a673cf01feefbe95bf5e7396d9179a5f283aeba (diff) | |
| parent | 01aef806626b16e9817e07f718f10e151f52e400 (diff) | |
Merge branch 'rightlib' into mergelibs-240313-1032
Diffstat (limited to 'contrib/python/ipython/py3/IPython/utils/path.py')
| -rw-r--r-- | contrib/python/ipython/py3/IPython/utils/path.py | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/contrib/python/ipython/py3/IPython/utils/path.py b/contrib/python/ipython/py3/IPython/utils/path.py index ccb70dccd43..cb5be041957 100644 --- a/contrib/python/ipython/py3/IPython/utils/path.py +++ b/contrib/python/ipython/py3/IPython/utils/path.py @@ -12,6 +12,7 @@ import errno import shutil import random import glob +import warnings from IPython.utils.process import system @@ -292,7 +293,14 @@ def target_outdated(target,deps): If target doesn't exist or is older than any file listed in deps, return true, otherwise return false. + + .. deprecated:: 8.22 """ + warnings.warn( + "`target_outdated` is deprecated since IPython 8.22 and will be removed in future versions", + DeprecationWarning, + stacklevel=2, + ) try: target_time = os.path.getmtime(target) except os.error: @@ -312,9 +320,17 @@ def target_update(target,deps,cmd): target_update(target,deps,cmd) -> runs cmd if target is outdated. This is just a wrapper around target_outdated() which calls the given - command if target is outdated.""" + command if target is outdated. + + .. deprecated:: 8.22 + """ - if target_outdated(target,deps): + warnings.warn( + "`target_update` is deprecated since IPython 8.22 and will be removed in future versions", + DeprecationWarning, + stacklevel=2, + ) + if target_outdated(target, deps): system(cmd) |
