File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 44import os
55import tempfile
66import time
7+ import warnings
78from typing import Optional
89
910from .exc import WaitTimeout
@@ -24,6 +25,10 @@ def retry(seconds: Optional[float] = RETRY_TIMEOUT_SECONDS) -> bool:
2425 """
2526 Retry a block of code until a time limit or ``break``.
2627
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+
2732 Parameters
2833 ----------
2934 seconds : float
@@ -44,6 +49,10 @@ def retry(seconds: Optional[float] = RETRY_TIMEOUT_SECONDS) -> bool:
4449 ... if p.current_path == pane_path:
4550 ... break
4651 """
52+ warnings .warn (
53+ "retry() is being deprecated and will soon be replaced by retry_until()" ,
54+ DeprecationWarning ,
55+ )
4756 return (lambda : time .time () < time .time () + seconds )()
4857
4958
You can’t perform that action at this time.
0 commit comments