Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,26 @@ $ tmuxp@next load yoursession
_Notes on the upcoming release will go here._
<!-- END PLACEHOLDER - ADD NEW CHANGELOG ENTRIES BELOW THIS LINE -->

### 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)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ include = [
{ path = "conftest.py", format = "sdist" },
]
dependencies = [
"libtmux~=0.60.0",
"libtmux~=0.61.0",
"PyYAML>=6.0"
]

Expand Down
4 changes: 2 additions & 2 deletions src/tmuxp/cli/debug_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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")),
Expand Down
23 changes: 23 additions & 0 deletions tests/cli/test_debug_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading