Skip to content

fix: update libtmux API calls for 0.33+ compatibility#159

Open
sgherdao wants to merge 3 commits intoCiscoDevNet:joe-devfrom
sgherdao:joe-dev
Open

fix: update libtmux API calls for 0.33+ compatibility#159
sgherdao wants to merge 3 commits intoCiscoDevNet:joe-devfrom
sgherdao:joe-dev

Conversation

@sgherdao
Copy link
Contributor

@sgherdao sgherdao commented Feb 6, 2026

Summary

  • Replace deprecated window.split_window() with window.split()
  • Replace deprecated session.attach_session() with session.attach()

These methods were deprecated in libtmux 0.33.0 and removed in 0.51.0, causing cml tmux to fail with:

Window.split_window() was deprecated in 0.33.0 and has been removed. Use Window.split() instead.

see https://libtmux.git-pull.com/migration.html

Changes

  • virl/cli/tmux/commands.py: Updated API calls
  • tests/v2/tmux.py: Updated mocks to match new API
  • requirements.txt: Relax libtmux requirements (same as before)

Testing

All 122 tests pass.

Replace deprecated methods removed in libtmux 0.51.0:
- window.split_window() -> window.split()
- session.attach_session() -> session.attach()
@coveralls
Copy link

coveralls commented Feb 6, 2026

Pull Request Test Coverage Report for Build 21764913377

Details

  • 2 of 3 (66.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 75.763%

Changes Missing Coverage Covered Lines Changed/Added Lines %
virl/cli/tmux/commands.py 2 3 66.67%
Totals Coverage Status
Change from base Build 21750230040: 0.0%
Covered Lines: 1985
Relevant Lines: 2620

💛 - Coveralls

@sgherdao sgherdao marked this pull request as draft February 6, 2026 12:54
@sgherdao sgherdao changed the base branch from master to joe-dev February 6, 2026 12:58
@sgherdao sgherdao marked this pull request as ready for review February 6, 2026 13:05
Remove the <0.51 version constraint from libtmux to allow for newer
versions of the library to be installed. The compatibility issue with
version 0.51 has been resolved, so the upper bound is no longer needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants