Skip to content

Commit a60bf6d

Browse files
committed
docs(MIGRATION): Add comprehensive deprecation reference table
why: Provide users with a quick-reference table of all deprecated APIs, making it easier to identify what needs updating when migrating. what: - Add "Complete Deprecation Reference" section after welcome admonition - Include 7 categorized tables: method renamings, property renamings, parameter changes, query/filter API, attribute access, removed items, and default behavior changes - Each entry includes version number with date for full context - Covers deprecations from v0.12.0 through v0.50.0
1 parent d917e13 commit a60bf6d

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed

MIGRATION

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,92 @@ well.
1919
[tracker]: https://github.com/tmux-python/libtmux/discussions
2020
```
2121

22+
## Complete Deprecation Reference
23+
24+
This table provides a quick reference for all deprecated APIs. See version-specific
25+
sections below for detailed migration examples and code samples.
26+
27+
### Method Renamings
28+
29+
| Class | Deprecated | Replacement | Since |
30+
|-------|------------|-------------|-------|
31+
| Server | `kill_server()` | `kill()` | 0.30.0 (2024-02-16) |
32+
| Session | `attach_session()` | `attach()` | 0.30.0 (2024-02-16) |
33+
| Session | `kill_session()` | `kill()` | 0.30.0 (2024-02-16) |
34+
| Window | `select_window()` | `select()` | 0.30.0 (2024-02-16) |
35+
| Window | `kill_window()` | `kill()` | 0.30.0 (2024-02-16) |
36+
| Window | `split_window()` | `split()` | 0.33.0 (2024-03-17) |
37+
| Window | `set_window_option()` | `set_option()` | 0.50.0 (2025-11-30) |
38+
| Window | `show_window_option()` | `show_option()` | 0.50.0 (2025-11-30) |
39+
| Window | `show_window_options()` | `show_options()` | 0.50.0 (2025-11-30) |
40+
| Pane | `select_pane()` | `select()` | 0.30.0 (2024-02-16) |
41+
| Pane | `resize_pane()` | `resize()` | 0.28.0 (2024-02-14) |
42+
| Pane | `split_window()` | `split()` | 0.33.0 (2024-03-17) |
43+
44+
### Property Renamings
45+
46+
| Class | Deprecated | Replacement | Since |
47+
|-------|------------|-------------|-------|
48+
| Session | `attached_window` | `active_window` | 0.31.0 (2024-02-17) |
49+
| Session | `attached_pane` | `active_pane` | 0.31.0 (2024-02-17) |
50+
| Window | `attached_pane` | `active_pane` | 0.31.0 (2024-02-17) |
51+
52+
### Parameter Changes
53+
54+
| Method(s) | Deprecated | Replacement | Since |
55+
|-----------|------------|-------------|-------|
56+
| Options/hooks methods | `g` | `global_` | 0.50.0 (2025-11-30) |
57+
| `split_window()` / `split()` | `percent` | `size` | 0.28.0 (2024-02-14) |
58+
| `split_window()` / `split()` | `vertical`/`horizontal` | `direction` (PaneDirection) | 0.33.0 (2024-03-17) |
59+
| `resize_pane()` | `-U`, `-D`, `-L`, `-R` | `adjustment_direction` | 0.28.0 (2024-02-14) |
60+
| `Server.get_by_id()` | `id` | `session_id` | 0.26.0 (2024-02-06) |
61+
| `Session.get_by_id()` | `id` | `window_id` | 0.26.0 (2024-02-06) |
62+
| `Window.get_by_id()` | `id` | `pane_id` | 0.26.0 (2024-02-06) |
63+
64+
### Query/Filter API Changes
65+
66+
| Class | Deprecated | Replacement | Since |
67+
|-------|------------|-------------|-------|
68+
| Server | `list_sessions()` / `_list_sessions()` | `sessions` property | 0.17.0 (2022-12-26) |
69+
| Server | `where({...})` | `sessions.filter(**kwargs)` | 0.17.0 (2022-12-26) |
70+
| Server | `find_where({...})` | `sessions.get(default=None, **kwargs)` | 0.17.0 (2022-12-26) |
71+
| Server | `get_by_id(id)` | `sessions.get(session_id=..., default=None)` | 0.17.0 (2022-12-26) |
72+
| Session | `list_windows()` / `_list_windows()` | `windows` property | 0.17.0 (2022-12-26) |
73+
| Session | `where({...})` | `windows.filter(**kwargs)` | 0.17.0 (2022-12-26) |
74+
| Session | `find_where({...})` | `windows.get(default=None, **kwargs)` | 0.17.0 (2022-12-26) |
75+
| Session | `get_by_id(id)` | `windows.get(window_id=..., default=None)` | 0.17.0 (2022-12-26) |
76+
| Window | `list_panes()` / `_list_panes()` | `panes` property | 0.17.0 (2022-12-26) |
77+
| Window | `where({...})` | `panes.filter(**kwargs)` | 0.17.0 (2022-12-26) |
78+
| Window | `find_where({...})` | `panes.get(default=None, **kwargs)` | 0.17.0 (2022-12-26) |
79+
| Window | `get_by_id(id)` | `panes.get(pane_id=..., default=None)` | 0.17.0 (2022-12-26) |
80+
| All | `children` property | `sessions`/`windows`/`panes` | 0.17.0 (2022-12-26) |
81+
82+
### Attribute Access Changes
83+
84+
| Pattern | Deprecated | Replacement | Since |
85+
|---------|------------|-------------|-------|
86+
| Dict key access | `obj['key']` | `obj.key` | 0.17.0 (2022-12-26) |
87+
| Dict get | `obj.get('key')` | `obj.key` | 0.17.0 (2022-12-26) |
88+
| Dict get w/ default | `obj.get('key', None)` | `getattr(obj, 'key', None)` | 0.17.0 (2022-12-26) |
89+
90+
### Removed Items
91+
92+
| Item | Removed In | Migration |
93+
|------|------------|-----------|
94+
| tmux < 3.2a support | 0.49.0 (2025-11-29) | Upgrade tmux or use libtmux 0.48.x |
95+
| `console_to_str()` | 0.42.0 (2025-02-02) | Use `text=True` in subprocess |
96+
| `str_from_console()` | 0.42.0 (2025-02-02) | Use `text=True` in subprocess |
97+
| `common.which()` | 0.12.0 (2022-07-13) | Use `shutil.which()` |
98+
99+
### Default Behavior Changes
100+
101+
| Method | Old Default | New Default | Since |
102+
|--------|-------------|-------------|-------|
103+
| `Session.new_window()` | `attach=True` | `attach=False` | 0.28.0 (2024-02-14) |
104+
| `Window.split_window()` | `attach=True` | `attach=False` | 0.28.0 (2024-02-14) |
105+
106+
---
107+
22108
## Upcoming Release
23109

24110
_Detailed migration steps for the next version will be posted here._

0 commit comments

Comments
 (0)