File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 4
4
import os
5
5
import tempfile
6
6
import time
7
+ import warnings
7
8
from typing import Optional
8
9
9
10
from .exc import WaitTimeout
@@ -24,6 +25,10 @@ def retry(seconds: Optional[float] = RETRY_TIMEOUT_SECONDS) -> bool:
24
25
"""
25
26
Retry a block of code until a time limit or ``break``.
26
27
28
+ .. deprecated:: 0.12.0
29
+ `retry` doesn't work, it will be removed in libtmux 0.13.0, it is replaced by
30
+ `retry_until`, more info: https://github.com/tmux-python/libtmux/issues/368.
31
+
27
32
Parameters
28
33
----------
29
34
seconds : float
@@ -44,6 +49,10 @@ def retry(seconds: Optional[float] = RETRY_TIMEOUT_SECONDS) -> bool:
44
49
... if p.current_path == pane_path:
45
50
... break
46
51
"""
52
+ warnings .warn (
53
+ "retry() is being deprecated and will soon be replaced by retry_until()" ,
54
+ DeprecationWarning ,
55
+ )
47
56
return (lambda : time .time () < time .time () + seconds )()
48
57
49
58
You can’t perform that action at this time.
0 commit comments