From a1a378998a715aa9b9303604a6d4442f33febfb3 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 28 Nov 2026 17:28:18 -0600 Subject: [PATCH 1/4] py(deps) libtmux 0.69.0 -> 0.70.0 why: Pick up libtmux 0.70.0. Server.raise_if_dead() redirects list-sessions output to DEVNULL (fixing leaked stdout in tmuxp shell), malformed and non-executable tmux binaries raise TmuxCommandNotFound (caught cleanly by tmuxp's CLI startup guard), command and channel waits gain opt-in timeouts, raised failures stay in the exception channel, and show_option() and QueryList add @overload return types. what: - Bump libtmux ~=0.69.0 -> ~=0.70.0 in pyproject.toml - Update uv.lock to libtmux 0.70.0 from PyPI (only libtmux moves) See also: - https://github.com/tmux-python/libtmux/releases/tag/v0.70.0 - https://libtmux.git-pull.com/history/#libtmux-0-70-0-2026-11-28 --- pyproject.toml | 2 +- uv.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 535f8fd30a..7947c8e8bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ include = [ { path = "conftest.py", format = "sdist" }, ] dependencies = [ - "libtmux~=0.69.0", + "libtmux~=0.70.0", "PyYAML>=6.0" ] diff --git a/uv.lock b/uv.lock index 6d53305e37..b664f81fd6 100644 --- a/uv.lock +++ b/uv.lock @@ -709,11 +709,11 @@ wheels = [ [[package]] name = "libtmux" -version = "0.69.0" +version = "0.70.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/75/96/f2b02bae053cf269af7296a881cf3dda96789e10d52d6351a141d50e1688/libtmux-0.69.0.tar.gz", hash = "sha256:44ec3c985884aed01351a26db10da4ddcec9ef0ff9dfe2fb55fefc597ac76a59", size = 724881, upload-time = "2026-11-28T00:47:03.346Z" } +sdist = { url = "https://files.pythonhosted.org/packages/51/f1/a44043193fd4c212858cdca04b8e628ce557726bf81f04fdc9765d4c2ac7/libtmux-0.70.0.tar.gz", hash = "sha256:1496d6253aea98321a99b5e414f378154967a570ffd1f5dc9f1effaa01f782c3", size = 1491548, upload-time = "2026-11-28T23:17:25.409Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/17/b6/7d0129ba159838073fea28ffa2155638c37b77254240691aa4983bb7d5e4/libtmux-0.69.0-py3-none-any.whl", hash = "sha256:2179066ceecb45706b3f017e88e5a2c6bbfa52738810f61fbab66e695f4e9fae", size = 165059, upload-time = "2026-11-28T00:47:02.039Z" }, + { url = "https://files.pythonhosted.org/packages/c9/f6/9273ce6bba65485ad2c6d95eb287798913b463cfddd6c7737a01fb7587f6/libtmux-0.70.0-py3-none-any.whl", hash = "sha256:9fcdccc64bb354ca6e243e942484b58f4f950b4a14ff4a324ae2dc4005afe1b2", size = 188971, upload-time = "2026-11-28T23:17:23.977Z" }, ] [[package]] @@ -1630,7 +1630,7 @@ testing = [ [package.metadata] requires-dist = [ - { name = "libtmux", specifier = "~=0.69.0" }, + { name = "libtmux", specifier = "~=0.70.0" }, { name = "pyyaml", specifier = ">=6.0" }, ] From e2888bb4d77d5006425e7ce642a080b2f576e761 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 28 Nov 2026 17:28:18 -0600 Subject: [PATCH 2/4] cli(test): Cover shell output and malformed tmux binary why: Verify both user-visible CLI fixes picked up from libtmux 0.70.0 with tests that fail against libtmux 0.69.0. what: - Add test_shell_command_does_not_leak_list_sessions_output in tests/cli/test_shell.py capturing fd 1 and fd 2 - Add test_cli_reports_malformed_tmux_binary_without_traceback in tests/cli/test_cli.py using an invalid ELF binary on PATH --- tests/cli/test_cli.py | 20 ++++++++++++++++++++ tests/cli/test_shell.py | 31 +++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/tests/cli/test_cli.py b/tests/cli/test_cli.py index bd32588ed4..479b5eca02 100644 --- a/tests/cli/test_cli.py +++ b/tests/cli/test_cli.py @@ -49,6 +49,26 @@ def has_minimum_version() -> bool: assert message in capsys.readouterr().out +def test_cli_reports_malformed_tmux_binary_without_traceback( + tmp_path: pathlib.Path, + monkeypatch: pytest.MonkeyPatch, + capsys: pytest.CaptureFixture[str], +) -> None: + """cli() reports a malformed tmux binary instead of raising OSError.""" + broken_tmux = tmp_path / "tmux" + broken_tmux.write_bytes(b"\x7fELF") + broken_tmux.chmod(0o755) + monkeypatch.setenv("PATH", str(tmp_path)) + libtmux.common.get_version.cache_clear() + try: + with pytest.raises(SystemExit): + cli.cli(["ls"]) + finally: + libtmux.common.get_version.cache_clear() + + assert "tmux not found." in capsys.readouterr().out + + class HelpTestFixture(t.NamedTuple): """Test fixture for help command tests.""" diff --git a/tests/cli/test_shell.py b/tests/cli/test_shell.py index da97afb237..43814f914f 100644 --- a/tests/cli/test_shell.py +++ b/tests/cli/test_shell.py @@ -471,3 +471,34 @@ def test_shell_interactive( result = capsys.readouterr() assert message.format(**template_ctx) in result.err + + +def test_shell_command_does_not_leak_list_sessions_output( + server: Server, + session: Session, + tmp_path: pathlib.Path, + monkeypatch: pytest.MonkeyPatch, + capfd: pytest.CaptureFixture[str], +) -> None: + """Verify ``tmuxp shell -c`` writes only the command's output.""" + assert server.socket_name is not None + assert session.name is not None + monkeypatch.setenv("HOME", str(tmp_path)) + monkeypatch.delenv("TMUX_PANE", raising=False) + monkeypatch.delenv("TMUX", raising=False) + monkeypatch.chdir(tmp_path) + capfd.readouterr() + + cli.cli( + [ + "shell", + f"-L{server.socket_name}", + session.name, + "-c", + "print('only-this')", + ] + ) + + captured = capfd.readouterr() + assert captured.out == "only-this\n" + assert captured.err == "" From a3bfc7d6a87ad6246bb7b6433872cffc18681d79 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 28 Nov 2026 17:28:18 -0600 Subject: [PATCH 3/4] CHANGES(docs): libtmux ~=0.69.0 -> ~=0.70.0 why: Record the libtmux~=0.70.0 minimum and the user-visible tmuxp shell and CLI startup fixes in the unreleased 1.84.0 changelog. what: - Add a Dependencies entry for libtmux~=0.70.0 in CHANGES - Add a Fixes entry for tmuxp shell stdout suppression and unusable tmux binary handling in CHANGES --- CHANGES | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/CHANGES b/CHANGES index da5c158a1b..b6fa3e36ea 100644 --- a/CHANGES +++ b/CHANGES @@ -44,6 +44,28 @@ $ tmuxp@next load yoursession _Notes on the upcoming release will go here._ +### Dependencies + +#### Minimum `libtmux~=0.70.0` (was `~=0.69.0`) + +Picks up libtmux 0.70.0: opt-in command, channel, and listing timeouts +(`TmuxCommandTimeout`), single-owner failure routing and structured logging on +`libtmux.common` with symmetric environment masking across `-e`, +`set-environment`, and `show-environment` output, `Client.request_clipboard()` +on tmux 3.6a+, and `@overload` return types on `show_option()` and `QueryList`. +See the +[libtmux 0.70.0 release notes](https://libtmux.git-pull.com/history/#libtmux-0-70-0-2026-11-28). + +### Fixes + +#### `tmuxp shell` suppresses `list-sessions` output and CLI startup catches unusable `tmux` binaries + +`tmuxp shell` no longer writes `tmux list-sessions` lines to standard output +before running `-c` or opening an interactive Python console, and `tmuxp` +prints its `"tmux not found."` message instead of an `OSError` traceback when a +`tmux` file on `PATH` is non-executable or malformed. Both fixes come from +libtmux 0.70.0. + ## tmuxp 1.83.0 (2026-11-28) tmuxp 1.83.0 updates libtmux to 0.69.0. `tmuxp freeze` now writes window `@` From 4638c721ae548cec1eb4f21067d67a98826e1705 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 28 Nov 2026 19:04:52 -0600 Subject: [PATCH 4/4] CHANGES(docs): Trim non-material libtmux notes why: Dependency bump entries across 1.77.0 through 1.84.0 recited libtmux APIs and internals that tmuxp never calls and that do not alter tmuxp's own behavior. what: - Trim 1.77.0, 1.79.0, 1.80.0, 1.81.0, 1.82.0, 1.83.0, and 1.84.0 libtmux dependency entries to their release-notes links (their tmuxp-visible changes already sit in each version's own sections) - Narrow 1.78.0's libtmux 0.64.0 note to leading-dash/trailing-semicolon values and newline-bearing pane paths, dropping unused kill_window and select_pane index notes --- CHANGES | 63 +++++++++++++++++---------------------------------------- 1 file changed, 19 insertions(+), 44 deletions(-) diff --git a/CHANGES b/CHANGES index b6fa3e36ea..a1146aff9d 100644 --- a/CHANGES +++ b/CHANGES @@ -46,13 +46,8 @@ _Notes on the upcoming release will go here._ ### Dependencies -#### Minimum `libtmux~=0.70.0` (was `~=0.69.0`) +#### Minimum `libtmux~=0.70.0` (was `~=0.69.0`) (#1114) -Picks up libtmux 0.70.0: opt-in command, channel, and listing timeouts -(`TmuxCommandTimeout`), single-owner failure routing and structured logging on -`libtmux.common` with symmetric environment masking across `-e`, -`set-environment`, and `show-environment` output, `Client.request_clipboard()` -on tmux 3.6a+, and `@overload` return types on `show_option()` and `QueryList`. See the [libtmux 0.70.0 release notes](https://libtmux.git-pull.com/history/#libtmux-0-70-0-2026-11-28). @@ -123,10 +118,7 @@ is the latest 3.7 patch release). #### Minimum `libtmux~=0.69.0` (was `~=0.68.0`) (#1113) -Picks up libtmux 0.69.0. `with Server()` leaves a running tmux server alive on -exit unless `Server(..., kill_on_exit=True)` is set, `@` user options stay -strings in `show_option()` and `show_options()`, and empty tmux format fields -hydrate as `""` instead of `None` while unset fields stay `None`. See the +See the [libtmux 0.69.0 release notes](https://libtmux.git-pull.com/history/#libtmux-0-69-0-2026-11-27). ### Development @@ -206,12 +198,7 @@ This comes from libtmux 0.68.0. #### Minimum `libtmux~=0.68.0` (was `~=0.67.1`) (#1112) -Picks up libtmux 0.68.0. Closed panes, windows and sessions raise -`TmuxObjectDoesNotExist` (including from `Pane.capture_pane()` and -`Pane.send_keys()`), `Server.run_shell()` raises `VersionTooLow` on tmux 3.3a -and 3.4 instead of returning `[]`, `Session.new_window(select_existing=True)` -reuses a window by index or target on every tmux, and `expand_formats` is the -one parameter name for tmux's `-F`. See the +See the [libtmux 0.68.0 release notes](https://libtmux.git-pull.com/history/#libtmux-0-68-0-2026-11-24). ## tmuxp 1.81.0 (2026-11-22) @@ -233,32 +220,24 @@ so `#S` became the session name. This comes from libtmux 0.67.0. #### Minimum `libtmux~=0.67.1` (was `~=0.66.0`) (#1111) -Picks up libtmux 0.67.0 and 0.67.1. Names, titles, start directories and -buffer paths passed to libtmux are kept as typed, `libtmux.Format` asks tmux -to expand one value, and `new_session(kill_session=True)` kills only the -exactly named session. 0.67.1 makes `new_window(select_existing=True)` find a -window by its literal name on every tmux. See the -[libtmux 0.67.0](https://libtmux.git-pull.com/history.html#libtmux-0-67-0-2026-11-22) +See the +[libtmux 0.67.0](https://libtmux.git-pull.com/history/#libtmux-0-67-0-2026-11-22) and -[0.67.1](https://github.com/tmux-python/libtmux/releases/tag/v0.67.1) +[0.67.1](https://libtmux.git-pull.com/history/#libtmux-0-67-1-2026-11-22) release notes. ## tmuxp 1.80.0 (2026-11-22) -tmuxp 1.80.0 updates libtmux to 0.66.0. It has no breaking changes of its own: -libtmux 0.66.0's two breaking changes are in APIs tmuxp does not call. A socket -path too long for tmux, passed to `tmuxp load -S` or `tmuxp freeze -S`, now ends -in a `SocketPathTooLong` error that says how far over the limit it is. +tmuxp 1.80.0 updates libtmux to 0.66.0. A socket path too long for tmux, passed +to `tmuxp load -S` or `tmuxp freeze -S`, now ends in a `SocketPathTooLong` error +that says how far over the limit it is. ### Dependencies #### Minimum `libtmux~=0.66.0` (was `~=0.65.0`) (#1110) -Picks up libtmux 0.66.0. Files `save_buffer()` creates are readable by their -owner only, `send_keys(hex_keys=True)` no longer adds Enter, and a socket path -too long for tmux raises `SocketPathTooLong`, including one passed to -`tmuxp load -S` or `tmuxp freeze -S`. See the -[libtmux 0.66.0 release notes](https://libtmux.git-pull.com/history.html#libtmux-0-66-0-2026-11-22). +See the +[libtmux 0.66.0 release notes](https://libtmux.git-pull.com/history/#libtmux-0-66-0-2026-11-22). ## tmuxp 1.79.0 (2026-11-22) @@ -278,9 +257,8 @@ tmux 3.2a is no longer supported, through the libtmux 0.65.0 update; tmuxp #### Minimum `libtmux~=0.65.0` (was `~=0.64.0`) (#1109) -Picks up libtmux 0.65.0, which publishes a capability matrix of the tmux -features it gates by release and requires tmux 3.3a. See the -[libtmux 0.65.0 release notes](https://libtmux.git-pull.com/history.html#libtmux-0-65-0-2026-11-22). +See the +[libtmux 0.65.0 release notes](https://libtmux.git-pull.com/history/#libtmux-0-65-0-2026-11-22). ### Fixes @@ -298,10 +276,10 @@ breaking changes. #### Minimum `libtmux~=0.64.0` (was `~=0.63.0`) (#1106) -Picks up libtmux 0.64.0, a fixes-only release. Commands act on the session, -window or pane they were called on, values that start with `-` or end in `;` -reach tmux as data, and a newline in a pane's path no longer breaks listings. -See the [libtmux 0.64.0 release notes](https://libtmux.git-pull.com/history.html#libtmux-0-64-0-2026-11-21). +Values in workspace names, options, environment variables, and `shell_command` +entries that start with `-` or end in `;` now reach tmux as data, and a newline +in a pane's path no longer breaks listings. See the +[libtmux 0.64.0 release notes](https://libtmux.git-pull.com/history/#libtmux-0-64-0-2026-11-21). ## tmuxp 1.77.0 (2026-11-21) @@ -318,11 +296,8 @@ end of life in October 2026. #### Minimum `libtmux~=0.63.0` (was `~=0.62.0`) (#1105) -Picks up libtmux 0.63.0. {meth}`~libtmux.Pane.break_pane` now returns the -destination window when it moves a window's only pane, and -{meth}`~libtmux.hooks.HooksMixin.show_hook` reads the hooks tmux 3.8 added. -libtmux 0.63.0 requires Python 3.11 or later, the floor tmuxp already has. See -the [libtmux 0.63.0 release notes](https://libtmux.git-pull.com/history.html#libtmux-0-63-0-2026-11-21). +See the +[libtmux 0.63.0 release notes](https://libtmux.git-pull.com/history/#libtmux-0-63-0-2026-11-21). ### Documentation