diff --git a/CHANGES b/CHANGES index d1ebfe2fed..b3d71d3390 100644 --- a/CHANGES +++ b/CHANGES @@ -44,6 +44,26 @@ $ tmuxp@next load yoursession _Notes on the upcoming release will go here._ +### Dependencies + +#### Minimum `libtmux~=0.61.0` (was `~=0.60.0`) (#1074) + +Picks up libtmux 0.61.0, which hardens tmux 3.7 patch-line support: +{meth}`~libtmux.Pane.break_pane` keeps tmux's own default window name on +tmux 3.7a/3.7b instead of forcing `libtmux`, and the new +{func}`~libtmux.common.get_version_str` exposes the raw tmux version +string. tmux 3.2a-3.6 are unaffected. + +### What's new + +#### `tmuxp debug-info` reports the exact tmux patch release (#1074) + +`tmuxp debug-info` now shows tmux's full version, keeping the +point-release letter (for example `3.7a`) that was previously normalized +away to `3.7`. Because tmux patch releases can differ in behavior, the +precise release is what a bug report needs. This reads libtmux 0.61.0's +{func}`~libtmux.common.get_version_str`. + ### Documentation #### Themed diagrams across the docs (#1071) diff --git a/pyproject.toml b/pyproject.toml index ec0e402e53..81c1220475 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ include = [ { path = "conftest.py", format = "sdist" }, ] dependencies = [ - "libtmux~=0.60.0", + "libtmux~=0.61.0", "PyYAML>=6.0" ] diff --git a/src/tmuxp/cli/debug_info.py b/src/tmuxp/cli/debug_info.py index 5454294462..4e1bf0c5d5 100644 --- a/src/tmuxp/cli/debug_info.py +++ b/src/tmuxp/cli/debug_info.py @@ -12,7 +12,7 @@ import typing as t from libtmux.__about__ import __version__ as libtmux_version -from libtmux.common import get_version, tmux_cmd +from libtmux.common import get_version_str, tmux_cmd from tmuxp.__about__ import __version__ from tmuxp._internal.private_path import PrivatePath, collapse_home_in_string @@ -132,7 +132,7 @@ def _collect_debug_info() -> dict[str, t.Any]: }, "python_version": " ".join(sys.version.split("\n")), "system_path": collapse_home_in_string(os.environ.get("PATH", "")), - "tmux_version": str(get_version()), + "tmux_version": get_version_str(), "libtmux_version": libtmux_version, "tmuxp_version": __version__, "tmux_path": _private(shutil.which("tmux")), diff --git a/tests/cli/test_debug_info.py b/tests/cli/test_debug_info.py index bb1c0bb479..9aba904d13 100644 --- a/tests/cli/test_debug_info.py +++ b/tests/cli/test_debug_info.py @@ -167,3 +167,26 @@ def test_debug_info_json_paths_use_private_path( assert data["shell"] == "~/.local/bin/zsh", ( f"Expected shell path to be masked with ~, got: {data['shell']}" ) + + +def test_debug_info_reports_raw_tmux_version( + monkeypatch: pytest.MonkeyPatch, + capsys: pytest.CaptureFixture[str], +) -> None: + """debug-info reports tmux's raw version, keeping the point-release suffix. + + libtmux's ``get_version()`` strips the letter suffix (``"3.7a"`` -> ``"3.7"``) + for numeric comparison; ``get_version_str()`` keeps it. Bug reports want the + exact patch release, so debug-info reads the raw string verbatim. + """ + monkeypatch.setenv("SHELL", "/bin/bash") + monkeypatch.setattr( + "tmuxp.cli.debug_info.get_version_str", + lambda *args, **kwargs: "3.7a", + ) + + cli.cli(["debug-info", "--json"]) + output = capsys.readouterr().out + data = json.loads(output) + + assert data["tmux_version"] == "3.7a" diff --git a/uv.lock b/uv.lock index aac16baafd..8917b16310 100644 --- a/uv.lock +++ b/uv.lock @@ -608,11 +608,11 @@ wheels = [ [[package]] name = "libtmux" -version = "0.60.0" +version = "0.61.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d0/e2/c2fc23e871855cb3feb5119ab3426656b2caa83f220fb6f1b7a770cb887e/libtmux-0.60.0.tar.gz", hash = "sha256:03d9740fd18090378a1f1a763403b127808b327b1466a1d3812c562f595ce06f", size = 527549, upload-time = "2026-06-28T21:19:35.283Z" } +sdist = { url = "https://files.pythonhosted.org/packages/72/c2/6abbac4420c35b3f1140c72607117236b160173f74fd86941f99b28375d5/libtmux-0.61.0.tar.gz", hash = "sha256:2d6081081a629b9236a36a64f874667533811d2ce5a1b0caa9c821f4d9d2e618", size = 546122, upload-time = "2026-07-04T12:57:36.401Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/63/c3/e524f498fe5dfc26c975ec8b52332fdd0b50e020f3ecc09423ba5d4ebc61/libtmux-0.60.0-py3-none-any.whl", hash = "sha256:a085e5653709d9e1c809c68f7daf1cd55c8af1ca938eb1e866388b9b13905ed3", size = 117368, upload-time = "2026-06-28T21:19:33.635Z" }, + { url = "https://files.pythonhosted.org/packages/73/14/934d0d9076d1d46fcc71f3397daea7921363781674337084b15d1bbcbf84/libtmux-0.61.0-py3-none-any.whl", hash = "sha256:b9315db6600757f840a8f16438725103e579aaa4be3c32728c105f2c284330df", size = 118059, upload-time = "2026-07-04T12:57:34.598Z" }, ] [[package]] @@ -1685,7 +1685,7 @@ testing = [ [package.metadata] requires-dist = [ - { name = "libtmux", specifier = "~=0.60.0" }, + { name = "libtmux", specifier = "~=0.61.0" }, { name = "pyyaml", specifier = ">=6.0" }, ]