Releases: tmux-python/libtmux
v0.46.0 - Internal improvements
Breaking Changes
-
Test Helper Imports Refactored: Direct imports from
libtmux.test
are 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
EnvironmentVarGuard
now 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.test
module split into:libtmux.test.constants
: Test-related constants (TEST_SESSION_PREFIX
, etc.)libtmux.test.environment
: Environment variable mockinglibtmux.test.random
: Random string generation utilitieslibtmux.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_window
Misc
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 contextSession
: Automatically kills the session when exiting the contextWindow
: Automatically kills the window when exiting the contextPane
: 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 contexts
This 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-extensions
for older python versions by @tony in #564
Full Changelog: v0.42.0...v0.42.1
v0.42.0 - Improved text processing
v0.41.0 - Fixes and syntax modernization
What's Changed
Fixes
- Fix hardcoded uid in
__str__
method ofServer
class by @lazysegtree in #557
Development
Documentation
- Fix docstring for color parameter by @TravisDart in #544
New Contributors
- @lazysegtree made their first contribution in #557
- @TravisDart made their first contribution in #544
Full Changelog: v0.40.1...v0.41.0
v0.40.1 - Fix for new sessions w/ env vars
Bug fixes
- Fix passing both window command and environment by @ppentchev in #553
New Contributors
- @ppentchev made their first contribution in #553
Full Changelog: v0.40.0...v0.40.1