|
19 | 19 | [tracker]: https://github.com/tmux-python/libtmux/discussions |
20 | 20 | ``` |
21 | 21 |
|
| 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 | Raises | |
| 30 | +|-------|------------|-------------|-------|--------| |
| 31 | +| Server | `kill_server()` | `kill()` | 0.30.0 (2024-02-16) | 0.51.0 | |
| 32 | +| Session | `attach_session()` | `attach()` | 0.30.0 (2024-02-16) | 0.51.0 | |
| 33 | +| Session | `kill_session()` | `kill()` | 0.30.0 (2024-02-16) | 0.51.0 | |
| 34 | +| Window | `select_window()` | `select()` | 0.30.0 (2024-02-16) | 0.51.0 | |
| 35 | +| Window | `kill_window()` | `kill()` | 0.30.0 (2024-02-16) | 0.51.0 | |
| 36 | +| Window | `split_window()` | `split()` | 0.33.0 (2024-03-17) | 0.51.0 | |
| 37 | +| Window | `set_window_option()` | `set_option()` | 0.50.0 (2025-11-30) | _(warning)_ | |
| 38 | +| Window | `show_window_option()` | `show_option()` | 0.50.0 (2025-11-30) | _(warning)_ | |
| 39 | +| Window | `show_window_options()` | `show_options()` | 0.50.0 (2025-11-30) | _(warning)_ | |
| 40 | +| Pane | `select_pane()` | `select()` | 0.30.0 (2024-02-16) | 0.51.0 | |
| 41 | +| Pane | `resize_pane()` | `resize()` | 0.28.0 (2024-02-14) | 0.51.0 | |
| 42 | +| Pane | `split_window()` | `split()` | 0.33.0 (2024-03-17) | 0.51.0 | |
| 43 | + |
| 44 | +### Property Renamings |
| 45 | + |
| 46 | +| Class | Deprecated | Replacement | Since | Raises | |
| 47 | +|-------|------------|-------------|-------|--------| |
| 48 | +| Session | `attached_window` | `active_window` | 0.31.0 (2024-02-17) | 0.51.0 | |
| 49 | +| Session | `attached_pane` | `active_pane` | 0.31.0 (2024-02-17) | 0.51.0 | |
| 50 | +| Window | `attached_pane` | `active_pane` | 0.31.0 (2024-02-17) | 0.51.0 | |
| 51 | + |
| 52 | +### Parameter Changes |
| 53 | + |
| 54 | +| Method(s) | Deprecated | Replacement | Since | Raises | |
| 55 | +|-----------|------------|-------------|-------|--------| |
| 56 | +| Options/hooks methods | `g` | `global_` | 0.50.0 (2025-11-30) | _(warning)_ | |
| 57 | +| `split_window()` / `split()` | `percent` | `size` | 0.28.0 (2024-02-14) | 0.51.0 | |
| 58 | +| `split_window()` / `split()` | `vertical`/`horizontal` | `direction` (PaneDirection) | 0.33.0 (2024-03-17) | 0.51.0 | |
| 59 | +| `resize_pane()` | `-U`, `-D`, `-L`, `-R` | `adjustment_direction` | 0.28.0 (2024-02-14) | 0.51.0 | |
| 60 | +| `Server.get_by_id()` | `id` | `session_id` | 0.16.0 (2022-12-10) | 0.51.0 | |
| 61 | +| `Session.get_by_id()` | `id` | `window_id` | 0.16.0 (2022-12-10) | 0.51.0 | |
| 62 | +| `Window.get_by_id()` | `id` | `pane_id` | 0.16.0 (2022-12-10) | 0.51.0 | |
| 63 | + |
| 64 | +### Query/Filter API Changes |
| 65 | + |
| 66 | +| Class | Deprecated | Replacement | Since | Raises | |
| 67 | +|-------|------------|-------------|-------|--------| |
| 68 | +| Server | `list_sessions()` / `_list_sessions()` | `sessions` property | 0.17.0 (2022-12-26) | 0.51.0 | |
| 69 | +| Server | `where({...})` | `sessions.filter(**kwargs)` | 0.17.0 (2022-12-26) | 0.51.0 | |
| 70 | +| Server | `find_where({...})` | `sessions.get(default=None, **kwargs)` | 0.17.0 (2022-12-26) | 0.51.0 | |
| 71 | +| Server | `_list_panes()` / `_update_panes()` | `panes` property | 0.17.0 (2022-12-26) | 0.51.0 | |
| 72 | +| Server | `_list_windows()` / `_update_windows()` | `windows` property | 0.17.0 (2022-12-26) | 0.51.0 | |
| 73 | +| Server | `get_by_id(id)` | `sessions.get(session_id=..., default=None)` | 0.16.0 (2022-12-10) | 0.51.0 | |
| 74 | +| Session | `list_windows()` / `_list_windows()` | `windows` property | 0.17.0 (2022-12-26) | 0.51.0 | |
| 75 | +| Session | `where({...})` | `windows.filter(**kwargs)` | 0.17.0 (2022-12-26) | 0.51.0 | |
| 76 | +| Session | `find_where({...})` | `windows.get(default=None, **kwargs)` | 0.17.0 (2022-12-26) | 0.51.0 | |
| 77 | +| Session | `get_by_id(id)` | `windows.get(window_id=..., default=None)` | 0.16.0 (2022-12-10) | 0.51.0 | |
| 78 | +| Window | `list_panes()` / `_list_panes()` | `panes` property | 0.17.0 (2022-12-26) | 0.51.0 | |
| 79 | +| Window | `where({...})` | `panes.filter(**kwargs)` | 0.17.0 (2022-12-26) | 0.51.0 | |
| 80 | +| Window | `find_where({...})` | `panes.get(default=None, **kwargs)` | 0.17.0 (2022-12-26) | 0.51.0 | |
| 81 | +| Window | `get_by_id(id)` | `panes.get(pane_id=..., default=None)` | 0.16.0 (2022-12-10) | 0.51.0 | |
| 82 | +| All | `children` property | `sessions`/`windows`/`panes` | 0.17.0 (2022-12-26) | 0.51.0 | |
| 83 | + |
| 84 | +### Attribute Access Changes |
| 85 | + |
| 86 | +| Pattern | Deprecated | Replacement | Since | Raises | |
| 87 | +|---------|------------|-------------|-------|--------| |
| 88 | +| Dict key access | `obj['key']` | `obj.key` | 0.17.0 (2022-12-26) | 0.51.0 | |
| 89 | +| Dict get | `obj.get('key')` | `obj.key` | 0.17.0 (2022-12-26) | 0.51.0 | |
| 90 | +| Dict get w/ default | `obj.get('key', None)` | `getattr(obj, 'key', None)` | 0.17.0 (2022-12-26) | 0.51.0 | |
| 91 | + |
| 92 | +### Removed Items |
| 93 | + |
| 94 | +| Item | Removed In | Migration | |
| 95 | +|------|------------|-----------| |
| 96 | +| tmux < 3.2a support | 0.49.0 (2025-11-29) | Upgrade tmux or use libtmux 0.48.x | |
| 97 | +| `console_to_str()` | 0.42.0 (2025-02-02) | Use `text=True` in subprocess | |
| 98 | +| `str_from_console()` | 0.42.0 (2025-02-02) | Use `text=True` in subprocess | |
| 99 | +| `common.which()` | 0.12.0 (2022-07-13) | Use `shutil.which()` | |
| 100 | + |
| 101 | +### Default Behavior Changes |
| 102 | + |
| 103 | +| Method | Old Default | New Default | Since | |
| 104 | +|--------|-------------|-------------|-------| |
| 105 | +| `Session.new_window()` | `attach=True` | `attach=False` | 0.28.0 (2024-02-14) | |
| 106 | +| `Window.split_window()` | `attach=True` | `attach=False` | 0.28.0 (2024-02-14) | |
| 107 | + |
| 108 | +--- |
| 109 | + |
22 | 110 | ## Upcoming Release |
23 | 111 |
|
24 | 112 | _Detailed migration steps for the next version will be posted here._ |
|
0 commit comments