Show More
@@ -12,6 +12,7 b' import errno' | |||||
12 | import shutil |
|
12 | import shutil | |
13 | import random |
|
13 | import random | |
14 | import glob |
|
14 | import glob | |
|
15 | import warnings | |||
15 |
|
16 | |||
16 | from IPython.utils.process import system |
|
17 | from IPython.utils.process import system | |
17 |
|
18 | |||
@@ -295,6 +296,11 b' def target_outdated(target,deps):' | |||||
295 |
|
296 | |||
296 | .. deprecated:: 8.22 |
|
297 | .. deprecated:: 8.22 | |
297 | """ |
|
298 | """ | |
|
299 | warnings.warn( | |||
|
300 | "`target_outdated` is deprecated since IPython 8.22 and will be removed in future versions", | |||
|
301 | DeprecationWarning, | |||
|
302 | stacklevel=2, | |||
|
303 | ) | |||
298 | try: |
|
304 | try: | |
299 | target_time = os.path.getmtime(target) |
|
305 | target_time = os.path.getmtime(target) | |
300 | except os.error: |
|
306 | except os.error: | |
@@ -319,7 +325,12 b' def target_update(target,deps,cmd):' | |||||
319 | .. deprecated:: 8.22 |
|
325 | .. deprecated:: 8.22 | |
320 | """ |
|
326 | """ | |
321 |
|
327 | |||
322 | if target_outdated(target,deps): |
|
328 | warnings.warn( | |
|
329 | "`target_update` is deprecated since IPython 8.22 and will be removed in future versions", | |||
|
330 | DeprecationWarning, | |||
|
331 | stacklevel=2, | |||
|
332 | ) | |||
|
333 | if target_outdated(target, deps): | |||
323 | system(cmd) |
|
334 | system(cmd) | |
324 |
|
335 | |||
325 |
|
336 |
General Comments 0
You need to be logged in to leave comments.
Login now