From ab0c9998ef806105a82945290957d0e6201f9c80 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Fri, 27 Nov 2026 18:55:29 -0600 Subject: [PATCH 1/4] py(deps) libtmux 0.68.0 -> 0.69.0 why: Pick up libtmux 0.69.0. Server context managers leave a running tmux server alive on exit unless 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. tmuxp requires no source changes for the upgrade. what: - Bump libtmux ~=0.68.0 -> ~=0.69.0 in pyproject.toml - Update uv.lock to libtmux 0.69.0 from PyPI (only libtmux moves) libtmux 0.69.0 (2026-11-27): - Server.__exit__() preserves running servers unless kill_on_exit=True is set (tmux-python/libtmux#728) - @ user options stay strings in show_option() and show_options() (tmux-python/libtmux#826) - Empty tmux format fields hydrate as "" while unset fields stay None (tmux-python/libtmux#900) See also: - https://github.com/tmux-python/libtmux/releases/tag/v0.69.0 - https://libtmux.git-pull.com/history/#libtmux-0-69-0-2026-11-27 --- pyproject.toml | 2 +- uv.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b9ad120a2a..29a96fb716 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ include = [ { path = "conftest.py", format = "sdist" }, ] dependencies = [ - "libtmux~=0.68.0", + "libtmux~=0.69.0", "PyYAML>=6.0" ] diff --git a/uv.lock b/uv.lock index 32e1a4111a..1e6e64c3ba 100644 --- a/uv.lock +++ b/uv.lock @@ -709,11 +709,11 @@ wheels = [ [[package]] name = "libtmux" -version = "0.68.0" +version = "0.69.0" source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d9/87/2f05a4cd7f89d4951db975be2c627ccc8ac2d0fe1a4b0ac819c49450fe66/libtmux-0.68.0.tar.gz", hash = "sha256:730bff45c4dcfb4d2094a863d28d88aca81d6d8de6c1f47a79f0ed6a2a18be4a", size = 717849, upload-time = "2026-11-25T01:20:41.288Z" } +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" } wheels = [ - { url = "https://files.pythonhosted.org/packages/c8/c6/640b4241be4c955abb44da700d15773ead95a181e8533b03040a17447d1e/libtmux-0.68.0-py3-none-any.whl", hash = "sha256:348f6de3f681a22f0d702a1f669c474428b2f3e440a75cae772cde86fb08b9b9", size = 162976, upload-time = "2026-11-25T01:20:38.768Z" }, + { 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" }, ] [[package]] @@ -1612,7 +1612,7 @@ testing = [ [package.metadata] requires-dist = [ - { name = "libtmux", specifier = "~=0.68.0" }, + { name = "libtmux", specifier = "~=0.69.0" }, { name = "pyyaml", specifier = ">=6.0" }, ] From 0468e8bd6b2c32786efa17521c7765ff17b8046a Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Fri, 27 Nov 2026 19:20:23 -0600 Subject: [PATCH 2/4] ci(tests): Pin tmux 3.7c, drop unpatched 3.7 why: Unpatched tmux 3.7 (2026-06-26) introduced four regressions that upstream reverted or fixed five days later in 3.7a (2026-07-01), with follow-up fixes in 3.7b (2026-07-01) and 3.7c (2026-08-17): - Empty window and session names ("") fail with "invalid window name:" or "invalid session name:" because check_name() and clean_name() in tmux.c reject *name == '\0' (cmd-rename-window.c, cmd-new-window.c, cmd-new-session.c, cmd-rename-session.c), breaking rename-window "" and loading workspaces with window_name: ''. Fixed in 3.7a (commit 132a63d1d). - ':' and '.' in session, session-group, and window names fail via WINDOW_NAME_FORBID and SESSION_NAME_FORBID (":.") in tmux.h and check_name() in tmux.c, breaking workspace names like my.project or v1.0. Reverted in 3.7a (commit 166267c87 / 65a032b20). - '#[' style directives in automatic-rename-format (names.c) and escape titles (screen.c) are scrubbed to '_' by WINDOW_NAME_FORBID_EXT (":.#") in clean_name() (tmux.c). Fixed in 3.7a (commits 4e612612d, 166267c87) to scrub only untrusted '#(' shell commands. - break-pane without -n dereferences NULL and crashes the tmux server due to an inverted 'if (name != NULL)' check in cmd_break_pane_exec() (cmd-break-pane.c). Fixed in 3.7a (commit 84291b021). - Ending a synchronized update (CSI ? 2026 l) in 3.7a omits PANE_REDRAW in input_csi_dispatch_rm_private() (input.c), restored in 3.7b (commit e802909de); 3.7c fixes unzooming before creating a floating pane and new-window scrollbar initialization. Setting fail-fast: false also lets every tmux leg finish when one leg fails. what: - Replace tmux 3.7 with 3.7c in .github/workflows/tests.yml and .github/tmux-releases.toml - Set strategy.fail-fast: false in .github/workflows/tests.yml See also: - https://github.com/tmux/tmux/blob/3.7/tmux.c#L284-L318 - https://github.com/tmux/tmux/blob/3.7/tmux.h#L99-L103 - https://github.com/tmux/tmux/blob/3.7/cmd-rename-window.c#L53-L58 - https://github.com/tmux/tmux/blob/3.7/cmd-new-window.c#L73-L83 - https://github.com/tmux/tmux/blob/3.7/cmd-new-session.c#L102-L121 - https://github.com/tmux/tmux/blob/3.7/cmd-break-pane.c#L117-L124 - https://github.com/tmux/tmux/blob/3.7a/tmux.c#L284-L307 - https://github.com/tmux/tmux/blob/3.7b/input.c#L1956-L1960 --- .github/tmux-releases.toml | 2 +- .github/workflows/tests.yml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/tmux-releases.toml b/.github/tmux-releases.toml index d0c5852cbb..84f3ce0903 100644 --- a/.github/tmux-releases.toml +++ b/.github/tmux-releases.toml @@ -6,5 +6,5 @@ "3.4" = "551ab8dea0bf505c0ad6b7bb35ef567cdde0ccb84357df142c254f35a23e19aa" "3.5" = "2fe01942e7e7d93f524a22f2c883822c06bc258a4d61dba4b407353d7081950f" "3.6" = "136db80cfbfba617a103401f52874e7c64927986b65b1b700350b6058ad69607" -"3.7" = "2344f191501b8a73eb71dd6c5fd5dcf8c765f5066f34ab46f04b3013dc7bc1a5" +"3.7c" = "7c60cae9a0e25288e2e24750aafc9e8800fc7fd4555e447e1b29ee4201cfb3bf" "3.8" = "e79c699c7e949dccd0a4a125e17b8d1261e311b16979dbc8eb34542f3966d82e" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e6b895c7c4..69870c14f4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -9,9 +9,10 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python-version: ['3.15'] - tmux-version: ['3.3a', '3.4', '3.5', '3.6', '3.7', '3.8', 'master'] + tmux-version: ['3.3a', '3.4', '3.5', '3.6', '3.7c', '3.8', 'master'] steps: - uses: actions/checkout@v7 From 9630cacaea5a00affeab7d04daeb47a2121f879a Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Fri, 27 Nov 2026 18:55:29 -0600 Subject: [PATCH 3/4] freezer(test): Freeze @ options and empty name why: tmuxp freeze reads window options via Window.show_options() and window names via Window.name. On libtmux 0.68.0, @badge="007" and @enabled="on" coerced to 7 and True, and rename-window "" hydrated Window.name as None (window_name: null), raising TypeError inside loader.expand() on reload. With libtmux 0.69.0, @ user options stay strings and an unnamed window freezes as "" and reloads cleanly. what: - Add test_freeze_preserves_window_user_options_and_empty_name in tests/workspace/test_freezer.py covering freezer.freeze(), YAML round-trip, and loader.expand() --- tests/workspace/test_freezer.py | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/tests/workspace/test_freezer.py b/tests/workspace/test_freezer.py index 653db9a08c..539556ef62 100644 --- a/tests/workspace/test_freezer.py +++ b/tests/workspace/test_freezer.py @@ -10,7 +10,7 @@ from tests.fixtures import utils as test_utils from tmuxp._internal.config_reader import ConfigReader -from tmuxp.workspace import freezer, validation +from tmuxp.workspace import freezer, loader, validation from tmuxp.workspace.builder import WorkspaceBuilder if typing.TYPE_CHECKING: @@ -133,3 +133,26 @@ def test_freeze_logs_debug( window_records = [r for r in caplog.records if r.msg == "frozen window"] assert len(window_records) >= 1 assert hasattr(window_records[0], "tmux_window") + + +def test_freeze_preserves_window_user_options_and_empty_name( + session: Session, +) -> None: + """Freeze window @ user options as strings and empty window names as ''.""" + window = session.active_window + window.set_option("automatic-rename", "off") + window.rename_window("") + window.set_option("@badge", "007") + window.set_option("@enabled", "on") + + frozen = freezer.freeze(session) + validation.validate_schema(frozen) + + yaml_text = ConfigReader._dump(fmt="yaml", content=frozen) + reloaded = ConfigReader._load(fmt="yaml", content=yaml_text) + expanded = loader.expand(reloaded) + + frozen_window = expanded["windows"][0] + assert frozen_window["window_name"] == "" + assert frozen_window["options"]["@badge"] == "007" + assert frozen_window["options"]["@enabled"] == "on" From 815c37d572af4c1df538e00fe97fa9db8fb0dca5 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Sat, 28 Nov 2026 04:24:56 -0600 Subject: [PATCH 4/4] CHANGES(docs): libtmux ~=0.68.0 -> ~=0.69.0 why: Document the libtmux~=0.69.0 minimum, the tmuxp freeze changes on window @ user options and unnamed windows, and the tmux 3.7 regressions that led CI to pin 3.7c (#1113). what: - Add a Breaking changes entry showing live window setup and Before/Now frozen YAML for @ user options and unnamed windows (#1113) - Add a Dependencies entry for libtmux~=0.69.0 (#1113) - Add a Development entry citing the unpatched tmux 3.7 C regressions and their 3.7a/3.7b/3.7c fixes (#1113) --- CHANGES | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 96 insertions(+) diff --git a/CHANGES b/CHANGES index 003a1a065d..40e8072979 100644 --- a/CHANGES +++ b/CHANGES @@ -44,6 +44,102 @@ $ tmuxp@next load yoursession _Notes on the upcoming release will go here._ +### Breaking changes + +#### `tmuxp freeze` keeps window `@` user options as strings (#1113) + +`tmuxp freeze` now writes window `@` user options as strings instead of +converting numeric and boolean-looking values to integers or booleans, and +writes an unnamed window (`rename-window ""`) as `window_name: ''` instead of +`window_name: null`. On `tmuxp load`, string option values pass through `$VAR` +and `~` expansion, and frozen unnamed windows reload without raising +`TypeError`. + +Given a live window renamed to `""` with `@badge` set to `007` and `@enabled` +set to `on`: + +```console +$ tmux rename-window "" && \ + tmux set-option -w @badge 007 && \ + tmux set-option -w @enabled on +``` + +Before, `tmuxp freeze` converted `@badge` to `7` (dropping its leading zeros), +`@enabled` to `true`, and the unnamed window to `null`: + +```yaml +windows: + - window_name: null + options: + '@badge': 7 + '@enabled': true +``` + +Now, `tmuxp freeze` keeps `@` options as strings and writes the unnamed window +as `''`: + +```yaml +windows: + - window_name: '' + options: + '@badge': '007' + '@enabled': 'on' +``` + +This comes from libtmux 0.69.0. Unpatched tmux 3.7 rejects empty window names +(`""`), `:` and `.` in session and window names; use tmux 3.7a or newer (3.7c +is the latest 3.7 patch release). + +### Dependencies + +#### 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 +[libtmux 0.69.0 release notes](https://libtmux.git-pull.com/history/#libtmux-0-69-0-2026-11-27). + +### Development + +#### CI exercises tmux 3.7c instead of unpatched 3.7 (#1113) + +CI replaces the unpatched tmux 3.7 release (2026-06-26) with 3.7c (2026-08-17, +the latest 3.7 patch release) in `.github/workflows/tests.yml` and +`.github/tmux-releases.toml`, and sets `fail-fast: false` so every matrix leg +runs to completion. + +Unpatched tmux 3.7 shipped four regressions fixed five days later in 3.7a +(2026-07-01), followed by additional fixes in 3.7b and 3.7c: + +- Empty window and session names (`""`) fail with `invalid window name:` or + `invalid session name:` because `check_name()` and `clean_name()` reject + `*name == '\0'` in + [`tmux.c`](https://github.com/tmux/tmux/blob/3.7/tmux.c#L284-L318), blocking + `rename-window ""` + ([`cmd-rename-window.c`](https://github.com/tmux/tmux/blob/3.7/cmd-rename-window.c#L53-L58)) + and `new-window -n ""` when loading `window_name: ''` + ([`cmd-new-window.c`](https://github.com/tmux/tmux/blob/3.7/cmd-new-window.c#L73-L83)). +- `:` and `.` in session, session-group, and window names fail with + `invalid session name:` or `invalid window name:` via `WINDOW_NAME_FORBID` and + `SESSION_NAME_FORBID` in + [`tmux.h`](https://github.com/tmux/tmux/blob/3.7/tmux.h#L99-L103) and + [`cmd-new-session.c`](https://github.com/tmux/tmux/blob/3.7/cmd-new-session.c#L102-L121), + breaking workspaces named like `my.project` or `v1.0`. +- `#[` style directives in `automatic-rename-format` and escape-set titles are + rewritten to `_` via `WINDOW_NAME_FORBID_EXT` (`":.#"`) in + [`tmux.c`](https://github.com/tmux/tmux/blob/3.7/tmux.c#L292-L295); + [`tmux 3.7a`](https://github.com/tmux/tmux/blob/3.7a/tmux.c#L284-L307) + restricts `#` scrubbing to untrusted `#(` shell commands and restores `:`, + `.` and `""`. +- `break-pane` without `-n` dereferences `NULL` and crashes the tmux server due + to an inverted `if (name != NULL)` guard in + [`cmd-break-pane.c`](https://github.com/tmux/tmux/blob/3.7/cmd-break-pane.c#L117-L124). +- [`tmux 3.7b`](https://github.com/tmux/tmux/blob/3.7b/input.c#L1956-L1960) + restores `PANE_REDRAW` at the end of a synchronized update (`CSI ? 2026 l`), + and `3.7c` fixes unzooming before creating a floating pane and new-window + scrollbar initialization. + ## tmuxp 1.82.0 (2026-11-24) tmuxp 1.82.0 updates libtmux to 0.68.0. When an earlier entry in a pane's