Skip to content

Commit d09dc8d

Browse files
authored
py(deps): libtmux v0.28.1 -> v0.30.1 (command improvements) (#911)
2 parents c27bcaa + 981fa05 commit d09dc8d

File tree

6 files changed

+23
-15
lines changed

6 files changed

+23
-15
lines changed

CHANGES

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ $ pipx install --suffix=@next 'tmuxp' --pip-args '\--pre' --force
1919

2020
<!-- Maintainers, insert changes / features for the next release here -->
2121

22+
#### Breaking changes
23+
24+
- libtmux: 0.28.1 -> 0.30.1 (#911).
25+
26+
Updated method names
27+
28+
- Rename methods to libtmux v0.30.0+-style (#911).
29+
2230
## tmuxp 1.37.1 (2024-02-15)
2331

2432
#### Development

poetry.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ tmuxp = 'tmuxp:cli.cli'
4747

4848
[tool.poetry.dependencies]
4949
python = "^3.8"
50-
libtmux = "~0.28.1"
50+
libtmux = "~0.30.1"
5151
colorama = ">=0.3.9"
5252
PyYAML = "^6.0"
5353

src/tmuxp/cli/load.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ def load_workspace(
474474

475475
if choice == "k":
476476
if builder.session is not None:
477-
builder.session.kill_session()
477+
builder.session.kill()
478478
tmuxp_echo("Session killed.")
479479
elif choice == "a":
480480
_reattach(builder)

src/tmuxp/workspace/builder.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ def build(self, session: t.Optional[Session] = None, append: bool = False) -> No
270270
cwd = self.session_config["start_directory"]
271271
run_before_script(self.session_config["before_script"], cwd=cwd)
272272
except Exception:
273-
self.session.kill_session()
273+
self.session.kill()
274274
raise
275275

276276
if "options" in self.session_config:
@@ -311,10 +311,10 @@ def build(self, session: t.Optional[Session] = None, append: bool = False) -> No
311311
plugin.after_window_finished(window)
312312

313313
if focus_pane:
314-
focus_pane.select_pane()
314+
focus_pane.select()
315315

316316
if focus:
317-
focus.select_window()
317+
focus.select()
318318

319319
def iter_create_windows(
320320
self,
@@ -403,7 +403,7 @@ def iter_create_windows(
403403
assert isinstance(window, Window)
404404

405405
if is_first_window_pass: # if first window, use window 1
406-
session.attached_window.kill_window()
406+
session.attached_window.kill()
407407

408408
if "options" in window_config and isinstance(
409409
window_config["options"],
@@ -413,7 +413,7 @@ def iter_create_windows(
413413
window.set_window_option(key, val)
414414

415415
if window_config.get("focus"):
416-
window.select_window()
416+
window.select()
417417

418418
yield window, window_config
419419

tests/workspace/test_builder.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ def assertIsMissing(cmd: str, hist: str) -> bool:
187187
(isMissingWindow, "isMissing", assertIsMissing),
188188
]:
189189
assert w.name == window_name
190-
w.select_window()
190+
w.select()
191191
p = w.attached_pane
192192
assert p is not None
193-
p.select_pane()
193+
p.select()
194194

195195
# Print the last-in-history command in the pane
196196
p.cmd("send-keys", " fc -ln -1")
@@ -1539,8 +1539,8 @@ def test_issue_800_default_size_many_windows(
15391539
assert builder is not None
15401540
assert builder.session is not None
15411541
assert isinstance(builder.session, Session)
1542-
assert callable(builder.session.kill_session)
1543-
builder.session.kill_session()
1542+
assert callable(builder.session.kill)
1543+
builder.session.kill()
15441544

15451545
with pytest.raises(libtmux.exc.LibTmuxException, match="no space for new pane"):
15461546
builder.build()

0 commit comments

Comments
 (0)