Skip to content

Commit 74566e6

Browse files
committed
window.py(refactor): Remove pre-3.2 version guards
why: tmux >= 3.2a is now required, version guards for older tmux are unnecessary. what: - Remove has_gte_version("2.9") check in resize() - resize is always available - Remove doctest version skip block - Remove unused has_gte_version import
1 parent 12febed commit 74566e6

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/libtmux/window.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import warnings
1515

1616
from libtmux._internal.query_list import QueryList
17-
from libtmux.common import has_gte_version, tmux_cmd
17+
from libtmux.common import tmux_cmd
1818
from libtmux.constants import (
1919
RESIZE_ADJUSTMENT_DIRECTION_FLAG_MAP,
2020
PaneDirection,
@@ -357,10 +357,6 @@ def resize(
357357
2. Manual resizing: ``height`` and / or ``width``.
358358
3. Expand or shrink: ``expand`` or ``shrink``.
359359
"""
360-
if not has_gte_version("2.9"):
361-
warnings.warn("resize() requires tmux 2.9 or newer", stacklevel=2)
362-
return self
363-
364360
tmux_args: tuple[str, ...] = ()
365361

366362
# Adjustments
@@ -694,11 +690,6 @@ def new_window(
694690
695691
Examples
696692
--------
697-
.. ::
698-
>>> import pytest
699-
>>> from libtmux.common import has_lt_version
700-
>>> if has_lt_version('3.2'):
701-
... pytest.skip('This doctest requires tmux 3.2 or newer')
702693
>>> window_initial = session.new_window(window_name='Example')
703694
>>> window_initial
704695
Window(@... 2:Example, Session($1 libtmux_...))

0 commit comments

Comments
 (0)