To install the unreleased libtmux version, see developmental releases.
pip:
$ pip install --user --upgrade --pre libtmux
- Notes on upcoming releases will be added here
- Remove
requirements/
folder, which was unused and deprecated by pyproject.toml (#507) - pyproject: Add
gp-libs
totest
dependency group
Maintenance only, no bug fixes or new features
- Python 3.7 Dropped (#497)
-
Move pytest configuration to
pyproject.toml
(#499) -
Poetry: 1.5.1 -> 1.6.1 (#497), 1.6.1 -> 1.7.0 (direct to trunk)
See also: https://github.com/python-poetry/poetry/blob/1.7.0/CHANGELOG.md
-
Packaging (poetry): Fix development dependencies
Per Poetry's docs on managing dependencies and
poetry check
, we had it wrong: Instead of using extras, we should create these:[tool.poetry.group.group-name.dependencies] dev-dependency = "1.0.0"
Which we now do.
-
Move formatting from
black
toruff format
(#506)This retains the same formatting style of
black
while eliminating a dev dependency by using our existing rust-basedruff
linter. -
CI: Update action packages to fix warnings
- dorny/paths-filter: 2.7.0 -> 2.11.1
- codecov/codecov-action: 2 -> 3
Maintenance only, no bug fixes or new features
-
Cut last python 3.7 release (EOL was June 27th, 2023)
For security updates, a 0.23.x branch can be maintained for a limited time, if necessary.
Maintenance only, no bug fixes or new features
-
Automated typo fixes from typos-cli:
typos --format brief --write-changes
-
ruff: Remove ERA /
eradicate
pluginThis rule had too many false positives to trust. Other ruff rules have been beneficial.
Maintenance only, no bug fixes or new features
-
Code quality improved via ruff rules (#488)
This includes fixes made by hand, and with ruff's automated fixes. Despite selecting additional rules, which include import sorting, ruff runs nearly instantaneously when checking the whole codebase.
- Fixes code comments cleaned up by
ruff
, but missed in QA. In the future, even when using an automated tool, we will review more thoroughly.
- Fixes for more
ERA001
issues.
- Yet more
ERA001
fixes.
- build system: Remove
setuptools
requirement (#495, in related to #493, #494)
Maintenance only, no bug fixes or new features
-
Add back
black
for formattingThis is still necessary to accompany
ruff
, until it replaces black.
Maintenance only, no bug fixes or new features
-
Move formatting, import sorting, and linting to ruff.
This rust-based checker has dramatically improved performance. Linting and formatting can be done almost instantly.
This change replaces black, isort, flake8 and flake8 plugins.
-
poetry: 1.4.0 -> 1.5.0
See also: https://github.com/python-poetry/poetry/releases/tag/1.5.0
- Update mypy to 1.2.0
- SkipDefaultFieldsReprMixin: Fix typing for mypy 1.2.0
-
Default format separator (
LIBTMUX_TMUX_FORMAT_SEPARATOR
):|
->␞
(#475, in re: #471, #472)Fixes
buffer_sample
with pipes causingfetch_objs()
-powered listings to fail unexpectedly.
- Server.new_session: Accept
x
andy
, thanks @rockandska (#469) - New test fixture:
session_params
. The dict is used directly in thesession
pytest fixture (#470)
-
Window.set_window_option()
: Remove.refresh()
(#467)See also: tmux-python/tmuxp#860
pane.capture_pane()
learned to acceptstart
andend
line numbers (#465)
fetch_objs
now raisesObjectDoesNotExist
with detailed information on lookup that failed (#466)
- Server: Launching of new session with default socket (#857)
- Window.panes: Fix docstring
- Remove unused code documentation
-
Server: Add
__repr__
and setsocket_path
if none set.Before (0.17 and below):
<libtmux.server.Server object at ...>
New
__repr__
(0.18+):Server(socket_name=test)
Server(socket_path=/tmp/tmux-1000/default)
- Server: Move
_list_panes
and_update_panes
to deprecated
- Documentation fixes
- Add deprecation warning to
Server.children
,Session.children
,Window.children
.
-
Finding objects / relations
-
0.16 and below:
session._windows()
,session.list_windows()
, etc.0.17 and after: {attr}
session.windows <libtmux.Session.windows>
-
0.16 and below:
session.find_where({'window_name': my_window})
0.17 and after: {meth}
session.windows.get(window_name=my_window, default=None) <libtmux.Session.windows>
- If not found and not
default
, raises {exc}~libtmux._internal.query_list.ObjectDoesNotExist
- If multiple objects found, raises {exc}
~libtmux._internal.query_list.MultipleObjectsReturned
- If not found and not
-
0.16 and below:
session.where({'window_name': my_window})
0.17 and after: {meth}
session.windows.filter(window_name=my_window) <libtmux.Session.windows>
-
-
Accessing attributes
-
0.16 and below:
window['id']
0.17 and after:
window.id
-
0.16 and below:
window.get('id')
0.17 and after:
window.id
-
0.16 and below:
window.get('id', None)
0.17 and after:
getattr(window, 'id', None)
-
Server.is_alive()
Server.raise_if_dead()
- Remove unused
sphinx-click
development dependency
-
Remove reliance on
packaging.version.Version
(#461)This is too critical of a package to pin a dependency as it may interfere with other packages the user relies on. In addition, libtmux doesn't need strict compatibility with
packaging
.
-
Fix
distutils
warning, vendorizeLegacyVersion
(#351)Removal of reliancy on
distutils.version.LooseVersion
, which does not supporttmux(1)
versions like3.1a
.Fixes warning:
DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
The temporary workaround, before 0.16.0 (assuming setup.cfg):
[tool:pytest] filterwarnings = ignore:.* Use packaging.version.*:DeprecationWarning:: ignore:The frontend.Option(Parser)? class.*:DeprecationWarning::
Window.split_window()
andSession.new_window()
now support an optional dictionary of environmental variables, via (#453), credit @zappolowski.
There will be more improvements over the coming weeks and months to shore up flakiness across shells and environments.
- Compatibility improvement for
test_capture_pane
andenv
(#452), credit: @zappolowski! - Remove more BASHisms from tests (#455)
tmux_cmd()
: Fix raise of TmuxCommandNotFound (#450)
- Use python 3.11 (#451)
- Add python 3.11 to trove classifiers (#451)
- Add python 3.11 to asdf and pyenv configurations (#451)
Session.new_window()
: Improve support forwindow_name: ''
downstream in tmuxp (#444, credit: @trankchung)
- Move
.coveragerc
->pyproject.toml
(#443)
Maintenance only, no bug fixes or new features
-
Remove
MANIFEST.in
This is handled by poetry's
include
in pyproject.toml.
Maintenance only, no bug fixes or new features
- Remove
.tmuxp-before-script.sh
from.tmuxp.yaml
- Use stable
pytest
API imports where possible to fix issues in downstream packaging on Arch (#441, via #442)
- Add
.tmuxp-before-script.sh
(used by.tmuxp.yaml
) andconftest.py
to source distributoins (#441, via #442)
-
Examples for pytest plugin (#439)
-
Move conftest.py to root level (#440)
- https://docs.pytest.org/en/stable/deprecations.html#pytest-plugins-in-non-top-level-conftest-files
- Less conftest.py files
- We can now run py.test for
README.md
without needing to proxy throughdocs/index.md
Maintenance release, no features or fixes
- pytest plugin: Initial tests (for testing the plugin itself, #423)
- pyproject.toml: Note pytest framework in trove classifiers
-
CI speedups (#428)
- Avoid fetching unused apt package
- Split out release to separate job so the PyPI Upload docker image isn't pulled on normal runs
- pyproject.toml: Drop old issues package, remove anther package from grouping
- Cleanup quickstart page
- Added a pytest plugin, #411.
- Remove
common.which()
in favor of {func}shutil.which
, Credit: @rocksandska, via #407 - Fixes #402: {func}
common.tmux_cmd
will only strip trailing empty lines. Before this change, all empty lines were filtered out. This will lead to a more accurate behavior when using {meth}Pane.capture_pane
. Credit: @rockandska, via #405. - Source files for
libtmux
modules moved tosrc/
, via #414.
- Add flake8-bugbear (#408)
- Add flake8-comprehensions (#409)
- Test doctests in documentation via pytest-doctest-docutils (#410)
- Examples updated for correctness, #412 (cherry-picked from #410)
- Render changelog in linkify_issues (#410)
- Fix Table of contents rendering with sphinx autodoc with sphinx_toctree_autodoc_fix (#410)
- {meth}
Server.new_session
really works withoutsession_name
, #401 fixes #399. Improved tests and doctests added.
-
{meth}
Server.new_session
works withoutsession_name
, #400 fixes #399This still passed
None
to the session name, this was fixed in v0.14.2.
- {meth}
Pane.send_keys
:suppress_history
default value changed fromTrue
toFalse
, #395
-
Initial doctests examples stubbed out #394
-
Fix bug in
temp_window()
context manager, #394 -
Pytest configuration
conftest.py
moved tolibtmux/conftest.py
, so doctest can detect the fixtures #394
-
Improved typings
Now
mypy --strict
compliant (#383)Smaller touchups from #392
-
Deprecated individual item lookups (#390)
-
Removed key lookups from {meth}
libtmux.common.EnvironmentMixin.show_environment
Only
EnvironmentMixin.show_environment()
(without an argument) exists, and it still returns adict
. -
Add key lookups via {meth}
libtmux.common.EnvironmentMixin.getenv
# Before server.show_environment('DISPLAY') # After server.getenv('DISPLAY') # Before session.show_environment('DISPLAY') # After session.getenv('DISPLAY')
-
Removed key lookups from {meth}
Session.show_options
session.show_options() # still returns dict, without an argument # Old session.show_options('DISPLAY') # Now session.show_option('DISPLAY')
-
Removed key lookups from {meth}
Window.show_window_options
window.show_window_options() # still returns dict, without an argument # Old window.show_window_options('DISPLAY') # Now window.show_window_option('DISPLAY')
-
-
Remove
libtmux.test.retry()
, deprecated since 0.12.x (#393)
- Fix incorrect function name
findWhere()
(#391)
-
Brought back python 3.7 and 3.8 support (#375)
-
Support for tmux 3.3a
-
Add to CI
-
Bump
TMUX_MAX_VERSION
from 2.4 -> 3.32.4 to 3.3a already worked, this is just the constant being updated.
-
-
Remove tox and tox-poetry-installer
This created issues with running poetry while inside the virtualenv.
-
Typings: Core relations, e.g.
Pane.window
,Pane.session
,Pane.server
,Window.server
#385
- Renewed logo
- Try out sphinx-autoapi for its table of contents generation (#367)
- Break up API documentations for utilities, exception, and test helpers and remove duplicate docs from API page. Server, session, window, and pane docs are in the Reference section now.
-
retry()
: Add deprecation warning. This will be removed in 0.13.x (#368, #372) -
New function
retry_until()
: Polls a callback function for a set period of time until it returnsTrue
or times out. By default it will raise {exc}libtmux.exc.WaitTimeout
, withraises=False
it will returnFalse
. Thank you @categulario! (#368, #372) -
#384 Chore: Use absolute modules rather than root-level to avoid cyclic imports.
# Bad / Old from libtmux import Server # Good / New from libtmux.server import Server
-
#382 [mypy] support added:
- Basic mypy tests now pass
-
Python 3.7 and 3.8 returns in 0.12.0
Final python 3.7 and 3.8 releaseBug fixes and security updates will go tov0.11.x
-
Internal: Use new separator to split
tmux(1)
formatting information (#289, #343)The separator is configurable via
LIBTMUX_TMUX_FORMAT_SEPARATOR
. If you ever have compatibility issues in the future let us know which default works best across versions.Credit: @JonathanRaiman and @jagguli
-
Basic type annotations (#359, #361) via @otherJL0
- Code cleanup (#362) from @otherJL0
- Format with black w/ string normalization. This is a one-time diff (#354)
- Sidebar reorganized into sections
- Added documentation on fetching developmental releases of libtmux
First experimental release using poetry build
(#347). If you are packaging and run
across any difficulty please see #346.
-
Drop python 3.6 (#344)
-
Add python 3.10, though still
packaging.version
issues remain (#344)A compat module and version constraints will need to be added for this
- poetry: 1.1.7 -> 1.1.12 (#344)
- Add
.pre-commit-config.yaml
(#344)
-
#324: Update poetry to 1.1
- CI: Use poetry 1.1.7 and
install-poetry.py
installer - Relock poetry.lock at 1.1 (w/ 1.1.7's fix)
- CI: Use poetry 1.1.7 and
-
#339 (CI): Lock python at 3.9 to avoid poetry issue with
dataclasses
-
ci: Fix publishing docs (similar to #339)
-
#341 #342:
Server.attached_sessions()
now supports multiple attached sessions.Remove attached sessions limitation to not detect multiple attached clients, thank you @timoses
- Update
Window.select_window()
for #271
- #321: Convert to markdown
- #271: Fix
select_window()
by providing the session ID as argument to-t
. Thanks @Flowdalic - Drop python 3.5 support
Python 2.7 support dropped.
- #306: chore: Remove python 2.7 support
- #314: chore: Python 3.x syntax tweaks
- #312: ci: Add tmux 3.2a to CI
- chore: Update black to 21.6b0
- #271: Fix select_window() by providing the session ID as argument to -t.
- #297: Enchance subprocess interaction std[in|out|err]. Needed for interact with big buffer, fixes #251, thank you @gil-obradors!
- #303 Add
common.get_libtmux_version
which gives the tmux version as a loose constraint. Fix linking to terms inside docs, and duplicate description of module which sphinx warned about in api.rst. - #266 Fix issue on local tests where env variables would cause show-environment to pause tests indefinitely.
- #234:
Window.split_window
: Allow passingpercent
, Thank you @jinankjain! - #289: Fix warning due to invalid escape sequences, Thank you @tirkarthi!
- #295: Publish docs via our own action
- #295: Move more packaging over to poetry, though we'll keep setup.py for the moment to ensure compatibility package maintainers.
- #295: New development instructions
- #295: Move doc/ to docs/
- #296: CI: Test python 2.7, cache python packages, prevent running internal PRs twice
-
#278: Fix Python deprecation warnings, thanks @d1618033
Also thanks Flowdalic for a similar PR at #294
-
Add
project_urls
to setup.py -
#293 Move from Pipfile to poetry
-
Fix show_option test in tmux 3.0
-
Clean up handle_option_error comments
-
Move CI to a GitHub action
- CHANGES updated to plain reStructuredText
- Add
project_urls
to setup.py for pypi. - Looser Pipfile versions, add Pipfile.lock
- #117 Fix issue with renaming clients with tmux 2.7 on BSD/macOS machines.
- #121 Support
literal=True
(-l
) inPane.send_keys
from @ritiek - #131 Fix for unicode commands in Python 2, thanks @myw
- #172 Support for next-X.Y versions from @sloria
- #120
capture_pane
support forPane
- #119
display_message
support forPane
- Sort imports with isort
- Add sphinxcontrib-napoleon package for documentation
- Move docstrings over to numpy's style
- #46 Change license from BSD to MIT
- Move to new organization, tmux-python
- Support package updates to pytest, sphinx, etc.
- Travis/CI: Limit tests to Python 2.7 and 3.6 (removed 3.3 to 3.5)
- Travis/CI: Update pypy veersions
- #103
Server.new_session
learned how to run commands in window on session start, thanks @grimpy! - #68 Make Server.has_session() use returncode, thanks
@jlargentaye! This should make
has_session
more robust.
- Port
retry
function from tmuxp (tmux-python/tmuxp#354)
- Don't add -x/-y in tmux >= 2.6 if running tmuxp from inside client.
- Allow
Window.select_layout
with no args - Fix test where
bell-
was no longer ambiguous as of tmux 2.6
- Hotfix to support tmux 2.6 session creation
- #65 Add session id to commands, thanks @askedrelic
- Exact matches only supported on 2.1 and up
- Support exact matching in
Server.has_session
- #37 Improve support for formatted options like
pane-border-status
. Thanks @kaushalmodi.
-
Support for python 2.6 dropped. New minimum version is 2.7
-
Add support for tmux 2.4, pypy and pypy3
-
Overhaul error handling when setting and showing options
- Added
handle_option_error
for handling option errors - Added {exc}
libtmux.exc.OptionError
base exception - Added {exc}
libtmux.exc.InvalidOption
andlibtmux.exc.AmbiguousOption
- {exc}
libtmux.exc.UnknownOption
now extends {exc}libtmux.exc.OptionError
- Added
-
Overhaul version checking
has_version
has been renamed toget_version
get_version
will return tmux built from git master as the latest version supported by the libtmux version with-master
at the end, e.g.2.4-master
get_version
will return tmux on openbsd base system as the latest version supported by the libtmux version with-openbsd
at the end, e.g.2.4-openbsd
has_required_tmux_version
has been renamed tohas_minimum_version
- added
has_gt_version
,has_gte_version
,has_lt_version
,has_lte_version
,
-
Fixed up documentation in some session methods
-
Added pydoc exception info to option methods in window and sessions.
-
Added
TMUX_MIN_VERSION
andTMUX_MAX_VERSION
- Fix
which
command - Add
TmuxCommandNotFound
exception - Add
tmux_search_paths
andappend_env_path
kwargs totmux_cmd
.
- #32 support for OpenBSD's tmux
- #25 support for working with tmux
master
, thanks @sloria.
- #197 use
LooseVersion
instead ofStrictVersion
for version checks. Thanks @minijackson. - Pin packages with pyup.io
- #21 Readme fix from @huwenchao.
- #18 Fix logger, courtesy of @geekli
- #19 Add support for
start_directory
in new sessions and panes, courtesy of @gandelman-a. - Fix tests and add official support for 2.3
- Raise exception for invalid session names. tmux does not allow names that are empty, contain periods or colons.
- Remove unused
target_session
param inServer.attach_session
andServer.switch_client
.
- #12 - fix logger message when tmux doesn't exist in
PATH
- #8 new exception
UnknownOption
- #8 return
None
for options that are valid tmux options, but unset at that scope. - #6 major documentation overhaul
- update
which()
to find tmux viaos.environ['PATH']
. https://redd.it/4laeut
- attributes for formatters are now accessible via
Session
,Window
andPane
objects.session.name
is equivalent tosession.get('session_name')
, you can do the same with other properties in_info
.window.name
,pane.current_path
,session.id
,window.id
,pane.id
,session.index
,window.index
,pane.index
, etc. attached_sessions
,attached_window
andattached_pane
are now properties._TMUX
metadata object changed to_info
..findWhere()
is nowfind_where
.- README and usage fixes
- switch to pytest
- libtmux forked from tmuxp.