Download Latest Version v0.53.0 - Bug fixes source code.tar.gz (410.4 kB)
Email in envelope

Get an email when there's a new version of libtmux

Home / v0.51.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2025-12-06 6.2 kB
v0.51.0 (Breaking API deprecations) source code.tar.gz 2025-12-06 404.1 kB
v0.51.0 (Breaking API deprecations) source code.zip 2025-12-06 458.4 kB
Totals: 3 Items   868.7 kB 0

Breaking Changes

Deprecate legacy APIs

Legacy API methods (deprecated in v0.16–v0.33) now raise DeprecatedError (hard error) instead of emitting DeprecationWarning.

See the migration guide for full context and examples.

Method Renamings

Deprecated Replacement Class Deprecated Since
kill_server() kill() Server 0.30.0
attach_session() attach() Session 0.30.0
kill_session() kill() Session 0.30.0
select_window() select() Window 0.30.0
kill_window() kill() Window 0.30.0
split_window() split() Window 0.33.0
select_pane() select() Pane 0.30.0
resize_pane() resize() Pane 0.28.0
split_window() split() Pane 0.33.0

Property Renamings

Deprecated Replacement Class Deprecated Since
attached_window active_window Session 0.31.0
attached_pane active_pane Session 0.31.0
attached_pane active_pane Window 0.31.0

Query/Filter API Changes

Deprecated Replacement Class Deprecated Since
list_sessions() / _list_sessions() sessions property Server 0.17.0
list_windows() / _list_windows() windows property Session 0.17.0
list_panes() / _list_panes() panes property Window 0.17.0
where({...}) .filter(**kwargs) on sessions/windows/panes All 0.17.0
find_where({...}) .get(default=None, **kwargs) on sessions/windows/panes All 0.17.0
get_by_id(id) .get(session_id/window_id/pane_id=..., default=None) All 0.16.0
children property sessions/windows/panes All 0.17.0

Attribute Access Changes

Deprecated Replacement Deprecated Since
obj['key'] obj.key 0.17.0
obj.get('key') obj.key 0.17.0
obj.get('key', None) getattr(obj, 'key', None) 0.17.0

Still Soft Deprecations (DeprecationWarning)

The following deprecations from v0.50.0 continue to emit DeprecationWarning only:

Deprecated Replacement Class
set_window_option() set_option() Window
show_window_option() show_option() Window
show_window_options() show_options() Window
g parameter global_ parameter Options & hooks methods

Migration Example

Before (deprecated, now raises DeprecatedError):

:::python
# Old method names
server.kill_server()
session.attach_session()
window.split_window()
pane.resize_pane()

# Old query API
server.list_sessions()
session.find_where({'window_name': 'main'})

# Old dict-style access
window['window_name']

After:

:::python
# New method names
server.kill()
session.attach()
window.split()
pane.resize()

# New query API
server.sessions
session.windows.get(window_name='main', default=None)

# New attribute access
window.window_name

Full Changelog: https://github.com/tmux-python/libtmux/compare/v0.50.1...v0.51.0

Source: README.md, updated 2025-12-06