aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/ipython/py3/IPython/utils/path.py
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-03-12 17:24:47 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-03-12 17:34:45 +0300
commite84602b8f2b95d10d45eb11369ae7d627339c881 (patch)
tree028524c9f076a9c4019a8d78d4a30685b7626c99 /contrib/python/ipython/py3/IPython/utils/path.py
parente98c636d759bf6f106a2b90142041bb9d4f1e33f (diff)
downloadydb-e84602b8f2b95d10d45eb11369ae7d627339c881.tar.gz
Intermediate changes
Diffstat (limited to 'contrib/python/ipython/py3/IPython/utils/path.py')
-rw-r--r--contrib/python/ipython/py3/IPython/utils/path.py20
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 ccb70dccd4..cb5be04195 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)