Skip to content

Releases: tmux-python/libtmux

v0.46.0 - Internal improvements

25 Feb 22:15
Compare
Choose a tag to compare

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

23 Feb 19:36
Compare
Choose a tag to compare

What's Changed

Breaking Changes

Test helpers: Refactor

by @tony in #578

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 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_window

Misc

  • Cursor rules: Add Cursor Rules for Development and Git Commit Standards by @tony in #575

CI

  • tests(ci) Check runtime deps import correctly by @tony in #574

Full Changelog: v0.44.2...v0.45.0

v0.44.2 - Bug fix, doc and test tweaks

17 Feb 16:36
Compare
Choose a tag to compare

What's Changed

Bug fixes

  • fix(typings) Move typing-extensions into TypeGuard by @tony in #572

Documentation

Development

  • Tests: Improved parametrization by @tony in #570

Full Changelog: v0.44.1...v0.44.2

v0.44.1 - Maintenance release

17 Feb 12:22
Compare
Choose a tag to compare

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

16 Feb 22:24
Compare
Choose a tag to compare

What's Changed

Support for context managers

by @tony in #566.

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 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

15 Feb 16:08
Compare
Choose a tag to compare

What's Changed

New feature

  • TestServer: Server, but partial'd to run on a test socket by @tony in #565

Documentation

  • Fix "Topics" links in docs
  • docs(traversal) Add more doctests by @tony in #567

Full Changelog: v0.42.1...v0.43.0

v0.42.1 - Packaging fix

15 Feb 12:13
Compare
Choose a tag to compare

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

02 Feb 11:53
Compare
Choose a tag to compare

What's Changed

Improvements

  • tmux_cmd: Modernize to use text=True by @tony in #560

    Attempted fix for #558.

Full Changelog: v0.41.0...v0.42.0

v0.41.0 - Fixes and syntax modernization

02 Feb 11:22
Compare
Choose a tag to compare

What's Changed

Fixes

Development

Documentation

New Contributors

Full Changelog: v0.40.1...v0.41.0

v0.40.1 - Fix for new sessions w/ env vars

24 Dec 16:57
Compare
Choose a tag to compare

Bug fixes

  • Fix passing both window command and environment by @ppentchev in #553

New Contributors

Full Changelog: v0.40.0...v0.40.1