New Upstream Release - tmuxp

Ready changes

Summary

Merged new upstream version: 1.28.1 (was: 1.27.0).

Diff

diff --git a/CHANGES b/CHANGES
index 39d22d5..45422b7 100644
--- a/CHANGES
+++ b/CHANGES
@@ -15,10 +15,48 @@ $ pipx install --suffix=@next 'tmuxp' --pip-args '\--pre' --force
 // Usage: tmuxp@next load yoursession
 ```
 
-## tmuxp 1.28.x (unreleased)
+## tmuxp 1.29.x (unreleased)
 
 <!-- Maintainers, insert changes / features for the next release here -->
 
+## tmuxp 1.28.1 (2023-05-28)
+
+_Maintenance only, no bug fixes, or new features_
+
+### Development
+
+- Add back `black` for formatting
+
+  This is still necessary to accompany `ruff`, until it replaces black.
+
+## tmuxp 1.28.0 (2023-05-27)
+
+_Maintenance only, no bug fixes or features_
+
+### Internal improvements
+
+- 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.
+- libtmux: 0.21.1 -> 0.22.0 (Moved to ruff as well)
+- poetry: 1.4.0 -> 1.5.0
+
+  See also: https://github.com/python-poetry/poetry/releases/tag/1.5.0
+
+[ruff]: https://ruff.rs
+
+## tmuxp 1.27.1 (2022-04-07)
+
+_Maintenance only, no bug fixes or features_
+
+### Development
+
+- Update mypy to 1.2.0
+- libtmux 0.21.0 -> 0.21.1 (mypy / typing updates only)
+
 ## tmuxp 1.27.0 (2022-01-29)
 
 _Maintenance only, no bug fixes or features_
diff --git a/PKG-INFO b/PKG-INFO
index 10e20f9..7c2097d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: tmuxp
-Version: 1.27.0
+Version: 1.28.1
 Summary: tmux session manager
 Home-page: http://github.com/tmux-python/tmuxp/
 License: MIT
@@ -21,22 +21,16 @@ Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
-Classifier: Programming Language :: Python :: 3.10
-Classifier: Programming Language :: Python :: 3.11
-Classifier: Programming Language :: Python :: 3.7
-Classifier: Programming Language :: Python :: 3.8
-Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: Implementation :: PyPy
 Classifier: Topic :: System :: Shells
 Classifier: Topic :: Utilities
 Provides-Extra: coverage
 Provides-Extra: docs
-Provides-Extra: format
 Provides-Extra: lint
 Provides-Extra: test
 Requires-Dist: PyYAML (>=6.0,<7.0)
 Requires-Dist: colorama (>=0.3.9)
-Requires-Dist: libtmux (>=0.21.0,<0.22.0)
+Requires-Dist: libtmux (>=0.22.1,<0.23.0)
 Project-URL: Bug Tracker, https://github.com/tmux-python/tmuxp/issues
 Project-URL: Changes, https://github.com/tmux-python/tmuxp/blob/master/CHANGES
 Project-URL: Documentation, https://tmuxp.git-pull.com
@@ -239,7 +233,7 @@ $ tmuxp freeze session-name
 ```
 
 See more about [freezing
-tmux](http://tmuxp.git-pull.com/commands/#freeze-sessions) sessions.
+tmux](https://tmuxp.git-pull.com/cli/freeze.html) sessions.
 
 # Convert a session file
 
diff --git a/README.md b/README.md
index bc93517..c05d4a3 100644
--- a/README.md
+++ b/README.md
@@ -194,7 +194,7 @@ $ tmuxp freeze session-name
 ```
 
 See more about [freezing
-tmux](http://tmuxp.git-pull.com/commands/#freeze-sessions) sessions.
+tmux](https://tmuxp.git-pull.com/cli/freeze.html) sessions.
 
 # Convert a session file
 
diff --git a/debian/changelog b/debian/changelog
index 528bbe5..6ad1d8e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tmuxp (1.28.1-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Sat, 10 Jun 2023 11:24:16 -0000
+
 tmuxp (1.27.0-1) unstable; urgency=medium
 
   [ Sébastien Delafond ]
diff --git a/docs/conf.py b/docs/conf.py
index 7a28c3f..7b2b3ac 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -6,6 +6,9 @@ from os.path import dirname, relpath
 from pathlib import Path
 
 import tmuxp
+if t.TYPE_CHECKING:
+    from sphinx.application import Sphinx
+
 
 # Get the project root dir, which is the parent dir of this
 cwd = Path(__file__).parent
@@ -244,12 +247,12 @@ def linkcode_resolve(domain, info):  # NOQA: C901
             linespec,
         )
 
-
-def remove_tabs_js(app, exc):
+def remove_tabs_js(app: "Sphinx", exc: Exception) -> None:
+    # Fix for sphinx-inline-tabs#18
     if app.builder.format == "html" and not exc:
         tabs_js = Path(app.builder.outdir) / "_static" / "tabs.js"
         tabs_js.unlink()
 
 
-def setup(app):
+def setup(app: "Sphinx") -> None:
     app.connect("build-finished", remove_tabs_js)
diff --git a/docs/configuration/index.md b/docs/configuration/index.md
index 181ecbc..b23d956 100644
--- a/docs/configuration/index.md
+++ b/docs/configuration/index.md
@@ -8,7 +8,7 @@
 
 tmuxp loads your terminal workspace into tmux using workspace files.
 
-The workspace file can be JSON or YAML. It's declarative style resembles tmux's object hierarchy: session, window and wanes.
+The workspace file can be JSON or YAML. It's declarative style resembles tmux's object hierarchy: session, window and panes.
 
 ## Launching your session
 
diff --git a/docs/developing.md b/docs/developing.md
index 1579c97..78fdae7 100644
--- a/docs/developing.md
+++ b/docs/developing.md
@@ -329,32 +329,52 @@ this will load the `.tmuxp.yaml` in the root of the project.
 
 ## Formatting
 
-The project uses [black] and [isort] (one after the other). Configurations are in `pyproject.toml`
-and `setup.cfg`:
+### black
 
-- `make black isort`: Run `black` first, then `isort` to handle import nuances
+[black] is used for formatting.
 
-## Linting
+````{tab} Command
+
+poetry:
+
+```console
+$ poetry run black .
+```
+
+If you setup manually:
+
+```console
+$ black .
+```
+
+````
 
-[flake8] and [mypy] run via CI in our GitHub Actions. See the configuration in `pyproject.toml` and
-`setup.cfg`.
+````{tab} make
+
+```console
+$ make black
+```
+
+````
+
+In the future, `ruff` (below) may replace black as formatter.
 
-### flake8
+### ruff
 
-[flake8] provides fast, reliable, barebones styling and linting.
+The project uses [ruff] to handles formatting, sorting imports and linting.
 
 ````{tab} Command
 
 poetry:
 
 ```console
-$ poetry run flake8
+$ poetry run ruff
 ```
 
 If you setup manually:
 
 ```console
-$ flake8
+$ ruff .
 ```
 
 ````
@@ -362,7 +382,7 @@ $ flake8
 ````{tab} make
 
 ```console
-$ make flake8
+$ make ruff
 ```
 
 ````
@@ -370,22 +390,25 @@ $ make flake8
 ````{tab} Watch
 
 ```console
-$ make watch_flake8
+$ make watch_ruff
 ```
 
 requires [`entr(1)`].
 
 ````
 
-````{tab} Configuration
+````{tab} Fix files
 
-See `[flake8]` in setup.cfg.
+poetry:
+
+```console
+$ poetry run ruff . --fix
+```
 
-```{literalinclude} ../setup.cfg
-:language: ini
-:start-at: "[flake8]"
-:end-before: "[isort]"
+If you setup manually:
 
+```console
+$ ruff . --fix
 ```
 
 ````
@@ -443,9 +466,8 @@ the [gh build site].
 [py.test usage argument]: https://pytest.org/latest/usage.html
 [entr]: http://entrproject.org/
 [`entr(1)`]: http://entrproject.org/
+[ruff]: https://ruff.rs
 [black]: https://github.com/psf/black
-[isort]: https://pypi.org/project/isort/
-[flake8]: https://flake8.pycqa.org/
 [mypy]: http://mypy-lang.org/
 [github actions]: https://github.com/features/actions
 [gh build site]: https://github.com/tmux-python/tmuxp/actions?query=workflow%3Atests
diff --git a/pyproject.toml b/pyproject.toml
index d1cb871..0b90b90 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
 [tool.poetry]
 name = "tmuxp"
-version = "1.27.0"
+version = "1.28.1"
 description = "tmux session manager"
 license = "MIT"
 authors = ["Tony Narlock <tony@git-pull.com>"]
@@ -47,22 +47,23 @@ tmuxp = 'tmuxp:cli.cli'
 
 [tool.poetry.dependencies]
 python = "^3.7"
-libtmux = "~0.21.0"
+libtmux = "~0.22.1"
 colorama = ">=0.3.9"
 PyYAML = "^6.0"
 
-[tool.poetry.dev-dependencies]
+[tool.poetry.group.dev.dependencies]
+
 ### Docs ###
 sphinx = "*"
 aafigure = ">=0.6"
 pillow = "*"
 furo = "*"
-gp-libs = "0.0.1a17"
+gp-libs = "*"
 sphinx-autobuild = "*"
 sphinx-autodoc-typehints = "*"
 sphinx-argparse = "*"
-sphinx-inline-tabs = "*"
-sphinxext-opengraph = "*"
+sphinx-inline-tabs = "<2023.4.21"  # For Python 3.7 support
+sphinxext-opengraph = "<0.8"  # https://github.com/wpilibsuite/sphinxext-opengraph/issues/100
 sphinx-copybutton = "*"
 sphinxext-rediraffe = "*"
 myst_parser = ">=0.18.1"
@@ -79,25 +80,14 @@ pytest-watcher = "*"
 codecov = "*"
 coverage = "*"
 
-### Format ###
-black = "*"
-isort = "*"
-
 ### Lint ###
-flake8 = [
-  { version = "*", python = "^3.7" },
-  { version = ">=5", python = "^3.8" },
-]
-flake8-bugbear = "*"
-flake8-comprehensions = "*"
+black = "*"
+ruff = "*"
 mypy = "*"
 types-colorama = "*"
 types-docutils = "*"
 types-PyYAML = "*"
 
-### Quirks ###
-importlib-metadata = "<5" # https://github.com/PyCQA/flake8/issues/1701
-
 [tool.poetry.extras]
 docs = [
   "docutils",
@@ -117,11 +107,9 @@ docs = [
 ]
 test = ["pytest", "pytest-rerunfailures", "pytest-mock", "pytest-watcher"]
 coverage = ["codecov", "coverage", "pytest-cov"]
-format = ["black", "isort"]
 lint = [
-  "flake8",
-  "flake8-bugbear",
-  "flake8-comprehsions",
+  "black",
+  "ruff",
   "mypy",
   "types-colorama",
   "types-docutils",
diff --git a/setup.py b/setup.py
deleted file mode 100644
index e02318d..0000000
--- a/setup.py
+++ /dev/null
@@ -1,38 +0,0 @@
-# -*- coding: utf-8 -*-
-from setuptools import setup
-
-package_dir = \
-{'': 'src'}
-
-packages = \
-['tmuxp', 'tmuxp.cli', 'tmuxp.workspace']
-
-package_data = \
-{'': ['*']}
-
-install_requires = \
-['PyYAML>=6.0,<7.0', 'colorama>=0.3.9', 'libtmux>=0.21.0,<0.22.0']
-
-entry_points = \
-{'console_scripts': ['tmuxp = tmuxp:cli.cli']}
-
-setup_kwargs = {
-    'name': 'tmuxp',
-    'version': '1.27.0',
-    'description': 'tmux session manager',
-    'long_description': '# tmuxp\n\nA session manager for tmux. Built on [libtmux](https://github.com/tmux-python/libtmux).\n\n[![Python Package](https://img.shields.io/pypi/v/tmuxp.svg)](https://pypi.org/project/tmuxp/)\n[![Docs](https://github.com/tmux-python/tmuxp/workflows/docs/badge.svg)](https://tmuxp.git-pull.com/)\n[![Build status](https://github.com/tmux-python/tmuxp/workflows/tests/badge.svg)](https://github.com/tmux-python/tmuxp/actions?query=workflow%3A%22tests%22)\n[![Code Coverage](https://codecov.io/gh/tmux-python/tmuxp/branch/master/graph/badge.svg)](https://codecov.io/gh/tmux-python/tmuxp)\n[![License](https://img.shields.io/github/license/tmux-python/tmuxp.svg)](https://github.com/tmux-python/tmuxp/blob/master/LICENSE)\n\n**New to tmux?** [The Tao of tmux](https://leanpub.com/the-tao-of-tmux)\nis available on Leanpub and [Amazon Kindle](http://amzn.to/2gPfRhC).\nRead and browse the book for free [on the\nweb](https://leanpub.com/the-tao-of-tmux/read).\n\n**Have some spare time?** Help us triage and code review and the tracker. See [issue\n#290](https://github.com/tmux-python/tmuxp/discussions/290)!\n\n# Installation\n\npip:\n\n```console\n$ pip install --user tmuxp\n```\n\nHomebrew:\n\n```console\n$ brew install tmuxp\n```\n\nDebian / ubuntu:\n\n```console\n$ sudo apt install tmuxp\n```\n\nFind the package for your distro on repology: <https://repology.org/project/tmuxp/versions>\n\nDevelopmental releases:\n\n- [pip](https://pip.pypa.io/en/stable/):\n\n  ```console\n  $ pip install --user --upgrade --pre tmuxp\n  ```\n\n- [pipx](https://pypa.github.io/pipx/docs/):\n\n  ```console\n  $ pipx install --suffix=@next \'tmuxp\' --pip-args \'\\--pre\' --force\n  ```\n\n  Then use `tmuxp@next load [session]`.\n\n# Load a tmux session\n\nLoad tmux sessions via json and YAML,\n[tmuxinator](https://github.com/aziz/tmuxinator) and\n[teamocil](https://github.com/remiprev/teamocil) style.\n\n```yaml\nsession_name: 4-pane-split\nwindows:\n  - window_name: dev window\n    layout: tiled\n    shell_command_before:\n      - cd ~/ # run as a first command in all panes\n    panes:\n      - shell_command: # pane no. 1\n          - cd /var/log # run multiple commands in this pane\n          - ls -al | grep \\.log\n      - echo second pane # pane no. 2\n      - echo third pane # pane no. 3\n      - echo forth pane # pane no. 4\n```\n\nSave as _mysession.yaml_, and load:\n\n```console\n$ tmuxp load ./mysession.yaml\n```\n\nProjects with _.tmuxp.yaml_ or _.tmuxp.json_ load via directory:\n\n```console\n$ tmuxp load path/to/my/project/\n```\n\nLoad multiple at once (in bg, offer to attach last):\n\n```console\n$ tmuxp load mysession ./another/project/\n```\n\nName a session:\n\n```console\n$ tmuxp load -s session_name ./mysession.yaml\n```\n\n[simple](http://tmuxp.git-pull.com/examples.html#short-hand-inline) and\n[very\nelaborate](http://tmuxp.git-pull.com/examples.html#super-advanced-dev-environment)\nconfig examples\n\n# User-level configurations\n\ntmuxp checks for configs in user directories:\n\n- `$TMUXP_CONFIGDIR`, if set\n- `$XDG_CONFIG_HOME`, usually _$HOME/.config/tmuxp/_\n- `$HOME/.tmuxp/`\n\nLoad your tmuxp config from anywhere by using the filename, assuming\n_\\~/.config/tmuxp/mysession.yaml_ (or _.json_):\n\n```console\n$ tmuxp load mysession\n```\n\nSee [author\'s tmuxp configs](https://github.com/tony/tmuxp-config) and\nthe projects\'\n[tmuxp.yaml](https://github.com/tmux-python/tmuxp/blob/master/.tmuxp.yaml).\n\n# Shell\n\n_New in 1.6.0_:\n\n`tmuxp shell` launches into a python console preloaded with the attached\nserver, session, and window in\n[libtmux](https://github.com/tmux-python/libtmux) objects.\n\n```console\n$ tmuxp shell\n\n(Pdb) server\n<libtmux.server.Server object at 0x7f7dc8e69d10>\n(Pdb) server.sessions\n[Session($1 your_project)]\n(Pdb) session\nSession($1 your_project)\n(Pdb) session.name\n\'your_project\'\n(Pdb) window\nWindow(@3 1:your_window, Session($1 your_project))\n(Pdb) window.name\n\'your_window\'\n(Pdb) window.panes\n[Pane(%6 Window(@3 1:your_window, Session($1 your_project)))\n(Pdb) pane\nPane(%6 Window(@3 1:your_window, Session($1 your_project))\n```\n\nPython 3.7+ supports [PEP\n553](https://www.python.org/dev/peps/pep-0553/) `breakpoint()`\n(including `PYTHONBREAKPOINT`). Also supports direct commands via `-c`:\n\n```console\n$ tmuxp shell -c \'print(window.name)\'\nmy_window\n\n$ tmuxp shell -c \'print(window.name.upper())\'\nMY_WINDOW\n```\n\nRead more on [tmuxp shell](https://tmuxp.git-pull.com/cli/shell.html) in\nthe CLI docs.\n\n# Pre-load hook\n\nRun custom startup scripts (such as installing project dependencies\nbefore loading tmux. See the\n[bootstrap_env.py](https://github.com/tmux-python/tmuxp/blob/master/bootstrap_env.py)\nand\n[before_script](http://tmuxp.git-pull.com/examples.html#bootstrap-project-before-launch)\nexample\n\n# Load in detached state\n\nYou can also load sessions in the background by passing `-d` flag\n\n# Screenshot\n\n<img src="https://raw.githubusercontent.com/tmux-python/tmuxp/master/docs/_static/tmuxp-demo.gif" class="align-center" style="width:45.0%" alt="image" />\n\n# Freeze a tmux session\n\nSnapshot your tmux layout, pane paths, and window/session names.\n\n```console\n$ tmuxp freeze session-name\n```\n\nSee more about [freezing\ntmux](http://tmuxp.git-pull.com/commands/#freeze-sessions) sessions.\n\n# Convert a session file\n\nConvert a session file from yaml to json and vice versa.\n\n```console\n$ tmuxp convert filename\n```\n\nThis will prompt you for confirmation and shows you the new file that is\ngoing to be written.\n\nYou can auto confirm the prompt. In this case no preview will be shown.\n\n```console\n$ tmuxp convert -y filename\n$ tmuxp convert --yes filename\n```\n\n# Plugin System\n\ntmuxp has a plugin system to allow for custom behavior. See more about\nthe [Plugin System](http://tmuxp.git-pull.com/plugin_system.html).\n\n# Debugging Helpers\n\nThe `load` command provides a way to log output to a log file for\ndebugging purposes.\n\n```console\n$ tmuxp load --log-file <log-file-name> .\n```\n\nCollect system info to submit with a Github issue:\n\n```console\n$ tmuxp debug-info\n------------------\nenvironment:\n    system: Linux\n    arch: x86_64\n\n# ... so on\n```\n\n# Docs / Reading material\n\nSee the [Quickstart](http://tmuxp.git-pull.com/quickstart.html).\n\n[Documentation](http://tmuxp.git-pull.com) homepage (also in\n[中文](http://tmuxp-zh.rtfd.org/))\n\nWant to learn more about tmux itself? [Read The Tao of Tmux\nonline](http://tmuxp.git-pull.com/about_tmux.html).\n\n# Donations\n\nYour donations fund development of new features, testing and support.\nYour money will go directly to maintenance and development of the\nproject. If you are an individual, feel free to give whatever feels\nright for the value you get out of the project.\n\nSee donation options at <https://git-pull.com/support.html>.\n\n# Project details\n\n- tmux support: 1.8+\n- python support: >= 3.7, pypy, pypy3\n- Source: <https://github.com/tmux-python/tmuxp>\n- Docs: <https://tmuxp.git-pull.com>\n- API: <https://tmuxp.git-pull.com/api.html>\n- Changelog: <https://tmuxp.git-pull.com/history.html>\n- Issues: <https://github.com/tmux-python/tmuxp/issues>\n- Test Coverage: <https://codecov.io/gh/tmux-python/tmuxp>\n- pypi: <https://pypi.python.org/pypi/tmuxp>\n- Open Hub: <https://www.openhub.net/p/tmuxp-python>\n- Repology: <https://repology.org/project/tmuxp/versions>\n- License: [MIT](http://opensource.org/licenses/MIT).\n',
-    'author': 'Tony Narlock',
-    'author_email': 'tony@git-pull.com',
-    'maintainer': 'None',
-    'maintainer_email': 'None',
-    'url': 'http://github.com/tmux-python/tmuxp/',
-    'package_dir': package_dir,
-    'packages': packages,
-    'package_data': package_data,
-    'install_requires': install_requires,
-    'entry_points': entry_points,
-    'python_requires': '>=3.7,<4.0',
-}
-
-
-setup(**setup_kwargs)
diff --git a/src/tmuxp/__about__.py b/src/tmuxp/__about__.py
index 2c8d528..3fba031 100644
--- a/src/tmuxp/__about__.py
+++ b/src/tmuxp/__about__.py
@@ -1,6 +1,6 @@
 __title__ = "tmuxp"
 __package_name__ = "tmuxp"
-__version__ = "1.27.0"
+__version__ = "1.28.1"
 __description__ = "tmux session manager"
 __email__ = "tony@git-pull.com"
 __author__ = "Tony Narlock"
diff --git a/src/tmuxp/__init__.py b/src/tmuxp/__init__.py
index 1601772..065cb8d 100644
--- a/src/tmuxp/__init__.py
+++ b/src/tmuxp/__init__.py
@@ -1,4 +1,4 @@
-# flake8: NOQA
+# flake8: NOQA F401
 """tmux session manager.
 
 tmuxp

More details

Full run details

Historical runs