diff --git a/CHANGES b/CHANGES index d71feac48..5554ff68e 100644 --- a/CHANGES +++ b/CHANGES @@ -12,6 +12,14 @@ $ pip install --user --upgrade --pre libtmux - _Insert changes/features/fixes for next release here_ +## What's new + +- **Improved typings** + + Now [`mypy --strict`] compliant ({issue}`383`) + + [`mypy --strict`]: https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-strict + ### Breaking changes - Deprecated individual item lookups ({issue}`390`) @@ -61,13 +69,7 @@ $ pip install --user --upgrade --pre libtmux window.show_window_option('DISPLAY') ``` -## What's new - -- **Improved typings** - - Now [`mypy --strict`] compliant ({issue}`383`) - - [`mypy --strict`]: https://mypy.readthedocs.io/en/stable/command_line.html#cmdoption-mypy-strict +- Remove `libtmux.test.retry()`, deprecated since 0.12.x ({issue}`393`) ### Development diff --git a/libtmux/test.py b/libtmux/test.py index bdad6e29d..4af61b11e 100644 --- a/libtmux/test.py +++ b/libtmux/test.py @@ -6,7 +6,6 @@ import time import types import typing as t -import warnings from typing import Callable, Optional from libtmux.server import Server @@ -42,41 +41,6 @@ def __next__(self) -> str: fixtures_dir = os.path.realpath(os.path.join(current_dir, "fixtures")) -def retry(seconds: float = RETRY_TIMEOUT_SECONDS) -> bool: - """ - Retry a block of code until a time limit or ``break``. - - .. deprecated:: 0.12.0 - `retry` doesn't work, it will be removed in libtmux 0.13.0, it is replaced by - `retry_until`, more info: https://github.com/tmux-python/libtmux/issues/368. - - Parameters - ---------- - seconds : float - Seconds to retry, defaults to ``RETRY_TIMEOUT_SECONDS``, which is - configurable via environmental variables. - - Returns - ------- - bool - True if time passed since retry() invoked less than seconds param. - - Examples - -------- - - >>> while retry(): - ... p = w.attached_pane - ... p.server._update_panes() - ... if p.current_path == pane_path: - ... break - """ - warnings.warn( - "retry() is being deprecated and will soon be replaced by retry_until()", - DeprecationWarning, - ) - return (lambda: time.time() < time.time() + seconds)() - - def retry_until( fun: Callable[[], bool], seconds: float = RETRY_TIMEOUT_SECONDS,