Releases: tmux-python/libtmux
Releases · tmux-python/libtmux
v0.46.2 - `start_directory` typing fix
What's Changed
- Fix new_windowargument typing inSessionby @Data5tream in #596
New Contributors
- @Data5tream made their first contribution in #596
Full Changelog: v0.46.1...v0.46.2
v0.46.1 - Maintenance release
v0.46.0 - Internal improvements
Breaking Changes
- 
Test Helper Imports Refactored: Direct imports from libtmux.testare no longer possible. You must now import from specific submodules (#580)# Before: from libtmux.test import namer # After: from libtmux.test.named import namer # Before: from libtmux.test import RETRY_INTERVAL_SECONDS # After: from libtmux.test.constants import RETRY_INTERVAL_SECONDS 
Internal Improvements
- Enhanced Test Utilities: The EnvironmentVarGuardnow handles variable cleanup more reliably
- Comprehensive Test Coverage: Added test suites for constants and environment utilities
- Code Quality: Added proper coverage markers to exclude type checking blocks from coverage reports
- Documentation: Improved docstrings and examples in the random module
These changes improve maintainability of test helpers both internally and for downstream packages that depend on libtmux.
What's Changed
Full Changelog: v0.45.0...v0.46.0
v0.45.0 - test helpers overhaul
What's Changed
Breaking Changes
Test helpers: Refactor
Test helper functionality has been split into focused modules (#578):
- libtmux.testmodule split into:- libtmux.test.constants: Test-related constants (- TEST_SESSION_PREFIX, etc.)
- libtmux.test.environment: Environment variable mocking
- libtmux.test.random: Random string generation utilities
- libtmux.test.temporary: Temporary session/window management
 
Breaking: Import paths have changed. Update imports:
# Old (0.44.x and earlier)
from libtmux.test import (
    TEST_SESSION_PREFIX,
    get_test_session_name,
    get_test_window_name,
    namer,
    temp_session,
    temp_window,
    EnvironmentVarGuard,
)# New (0.45.0+)
from libtmux.test.constants import TEST_SESSION_PREFIX
from libtmux.test.environment import EnvironmentVarGuard
from libtmux.test.random import get_test_session_name, get_test_window_name, namer
from libtmux.test.temporary import temp_session, temp_windowMisc
CI
Full Changelog: v0.44.2...v0.45.0
v0.44.2 - Bug fix, doc and test tweaks
v0.44.1 - Maintenance release
What's Changed
Packaging
- types: Only use typing-extensions if necessary by @ppentchev in #563
Full Changelog: v0.44.0...v0.44.1
v0.44.0 - Context managers
What's Changed
Support for context managers
Added context manager support for all main tmux objects:
- Server: Automatically kills the server when exiting the context
- Session: Automatically kills the session when exiting the context
- Window: Automatically kills the window when exiting the context
- Pane: Automatically kills the pane when exiting the context
Example usage:
with Server() as server:
    with server.new_session() as session:
        with session.new_window() as window:
            with window.split() as pane:
                pane.send_keys('echo "Hello"')
                # Do work with the pane
                # Everything is cleaned up automatically when exiting contextsThis makes it easier to write clean, safe code that properly cleans up tmux resources.
Full Changelog: v0.43.0...v0.44.0
v0.43.0 - `TestServer` pytest fixture
v0.42.1 - Packaging fix
Changes
Packaging: typing-extensions usage
- Move a typing-extensions import into a t.TYPE_CHECKING section by @ppentchev in #562
- py(deps[testing,lint]) Add typing-extensionsfor older python versions by @tony in #564
Full Changelog: v0.42.0...v0.42.1