diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 213598d56..9a5ac2dce 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -15,8 +15,28 @@ jobs: - uses: actions/checkout@v1 - name: Configure git run: | - git config --global user.name 'travis-ci' + git config --global user.name 'travis-ci' git config --global user.email 'travis@nowhere.edu' + + - name: Filter changed file paths to outputs + uses: dorny/paths-filter@v2.7.0 + id: changes + with: + filters: | + root_docs: + - CHANGES + - README.* + docs: + - 'docs/**/*.rst' + - 'docs/**/*.md' + - 'examples/**' + python_files: + - 'libtmux/**' + + - name: Should publish + if: steps.changes.outputs.docs == 'true' || steps.changes.outputs.root_docs == 'true' || steps.changes.outputs.python_files == 'true' + run: echo "PUBLISH=$(echo true)" >> $GITHUB_ENV + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v1 with: diff --git a/CHANGES b/CHANGES index 2e83a162c..a8177651d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,231 +1,230 @@ -========= -Changelog -========= +# Changelog Here you can find the recent changes to libtmux -current -------- -- *Insert changes/features/fixes for next release here* -- :issue:`271`: Fix `select_window()` by providing the session ID as - argument to `-t`. Thanks @Flowdalic +## current + +- _Insert changes/features/fixes for next release here_ +- {issue}`271`: Fix {}`select_window()` by providing the session ID as + argument to {}`-t`. Thanks @Flowdalic - Drop python 3.5 support -libtmux 0.9.0 (2021-06-14) --------------------------- +## libtmux 0.9.0 (2021-06-14) + Python 2.7 support dropped. -- :issue:`306`: chore: Remove python 2.7 support -- :issue:`314`: chore: Python 3.x syntax tweaks -- :issue:`312`: ci: Add tmux 3.2a to CI -- chore: Update black to `21.6b0 - `_ -- :issue:`271`: Fix select_window() by providing the session ID as +- {issue}`306`: chore: Remove python 2.7 support +- {issue}`314`: chore: Python 3.x syntax tweaks +- {issue}`312`: ci: Add tmux 3.2a to CI +- chore: Update black to [21.6b0](https://github.com/psf/black/blob/21.6b0/CHANGES.md#216b0) +- {issue}`271`: Fix select_window() by providing the session ID as argument to -t. -libtmux 0.8.5 (2020-10-25) --------------------------- -- :issue:`297`: Enchance subprocess interaction std[in|out|err]. Needed - for interact with big buffer, fixes :issue:`251`, thank you +## libtmux 0.8.5 (2020-10-25) + +- {issue}`297`: Enchance subprocess interaction std[in|out|err]. Needed + for interact with big buffer, fixes {issue}`251`, thank you @gil-obradors! -- :issue:`303` Add ``common.get_libtmux_version`` which gives the tmux +- {issue}`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. -- :issue:`266` Fix issue on local tests where env variables would cause +- {issue}`266` Fix issue on local tests where env variables would cause show-environment to pause tests indefinitely. +## libtmux 0.8.4 (2020-10-25) -libtmux 0.8.4 (2020-10-25) --------------------------- -- :issue:`234`: ``Window.split_window``: Allow passing ``percent``, Thank +- {issue}`234`: `Window.split_window`: Allow passing `percent`, Thank you @jinankjain! -- :issue:`289`: Fix warning due to invalid escape sequences, Thank you +- {issue}`289`: Fix warning due to invalid escape sequences, Thank you @tirkarthi! -- :issue:`295`: Publish docs via our own action -- :issue:`295`: Move more packaging over to poetry, though we'll keep +- {issue}`295`: Publish docs via our own action +- {issue}`295`: Move more packaging over to poetry, though we'll keep setup.py for the moment to ensure compatibility package maintainers. -- :issue:`295`: New development instructions -- :issue:`295`: Move doc/ to docs/ -- :issue:`296`: CI: Test python 2.7, cache python packages, prevent running +- {issue}`295`: New development instructions +- {issue}`295`: Move doc/ to docs/ +- {issue}`296`: CI: Test python 2.7, cache python packages, prevent running internal PRs twice -libtmux 0.8.3 (2020-08-16) --------------------------- -- :issue:`278`: Fix Python deprecation warnings, thanks @d1618033 +## libtmux 0.8.3 (2020-08-16) + +- {issue}`278`: Fix Python deprecation warnings, thanks @d1618033 + + Also thanks Flowdalic for a similar PR at {issue}`294` - Also thanks Flowdalic for a similar PR at :issue:`294` -- Add ``project_urls`` to setup.py -- :issue:`293` Move from Pipfile to poetry +- Add `project_urls` to setup.py +- {issue}`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 -libtmux 0.8.2 (2019-06-02) --------------------------- +## libtmux 0.8.2 (2019-06-02) + - CHANGES updated to plain reStructuredText -- Add ``project_urls`` to setup.py for pypi. +- Add `project_urls` to setup.py for pypi. - Looser Pipfile versions, add Pipfile.lock -libtmux 0.8.1 (2019-01-26) --------------------------- -- :issue:`117` Fix issue with renaming clients with tmux 2.7 on BSD/macOS +## libtmux 0.8.1 (2019-01-26) + +- {issue}`117` Fix issue with renaming clients with tmux 2.7 on BSD/macOS machines. -- :issue:`121` Support ``literal=True`` (``-l``) in ``Pane.send_keys`` +- {issue}`121` Support `literal=True` (`-l`) in `Pane.send_keys` from @ritiek -- :issue:`131` Fix for unicode commands in Python 2, thanks @myw -- :issue:`172` Support for next-X.Y versions from @sloria -- :issue:`120` ``capture_pane`` support for ``Pane`` -- :issue:`119` ``display_message`` support for ``Pane`` +- {issue}`131` Fix for unicode commands in Python 2, thanks @myw +- {issue}`172` Support for next-X.Y versions from @sloria +- {issue}`120` `capture_pane` support for `Pane` +- {issue}`119` `display_message` support for `Pane` - Sort imports with isort - Add sphinxcontrib-napoleon package for documentation - Move docstrings over to numpy's style -libtmux 0.8.0 (2018-03-11) --------------------------- -- :issue:`46` Change license from BSD to MIT +## libtmux 0.8.0 (2018-03-11) + +- {issue}`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 -- :issue:`103` ``Server.new_session`` learned how to run commands in +- {issue}`103` `Server.new_session` learned how to run commands in window on session start, thanks @grimpy! -- :issue:`68` Make Server.has_session() use returncode, thanks - @jlargentaye! This should make ``has_session`` more robust. +- {issue}`68` Make Server.has_session() use returncode, thanks + @jlargentaye! This should make `has_session` more robust. + +## libtmux 0.7.8 (2018-03-04) -libtmux 0.7.8 (2018-03-04) --------------------------- -- Port ``retry`` function from tmuxp - (https://github.com/tmux-python/tmuxp/issues/354) +- Port `retry` function from tmuxp + () + +## libtmux 0.7.7 (2017-11-10) -libtmux 0.7.7 (2017-11-10) --------------------------- - Don't add -x/-y in tmux >= 2.6 if running tmuxp from inside client. -libtmux 0.7.6 (2017-11-09) --------------------------- -- Allow ``Window.select_layout`` with no args -- Fix test where ``bell-`` was no longer ambiguous as of tmux 2.6 +## libtmux 0.7.6 (2017-11-09) + +- Allow `Window.select_layout` with no args +- Fix test where `bell-` was no longer ambiguous as of tmux 2.6 + +## libtmux 0.7.5 (2017-10-07) -libtmux 0.7.5 (2017-10-07) --------------------------- - Hotfix to support tmux 2.6 session creation -libtmux 0.7.4 (2017-08-19) --------------------------- -- :issue:`65` Add session id to commands, thanks `@askedrelic`_ +## libtmux 0.7.4 (2017-08-19) + +- {issue}`65` Add session id to commands, thanks [@askedrelic][@askedrelic] + +## libtmux 0.7.3 (2017-05-29) -libtmux 0.7.3 (2017-05-29) --------------------------- - Exact matches only supported on 2.1 and up -libtmux 0.7.2 (2017-05-29) --------------------------- -- Support exact matching in ``Server.has_session`` +## libtmux 0.7.2 (2017-05-29) + +- Support exact matching in `Server.has_session` + +## libtmux 0.7.1 (2017-04-28) + +- {issue}`37` Improve support for formatted options like + `pane-border-status`. Thanks @kaushalmodi. -libtmux 0.7.1 (2017-04-28) --------------------------- -- :issue:`37` Improve support for formatted options like - ``pane-border-status``. Thanks @kaushalmodi. +## libtmux 0.7.0 (2017-04-27) -libtmux 0.7.0 (2017-04-27) --------------------------- - 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` and `libtmux.exc.AmbiguousOption` - - :exc:`libtmux.exc.UnknownOption` now extends :exc:`libtmux.exc.OptionError` + + - Added {}`handle_option_error` for handling option errors + - Added {exc}`libtmux.exc.OptionError` base exception + - Added {exc}`libtmux.exc.InvalidOption` and {}`libtmux.exc.AmbiguousOption` + - {exc}`libtmux.exc.UnknownOption` now extends {exc}`libtmux.exc.OptionError` - Overhaul version checking - - ``has_version`` has been renamed to ``get_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 to ``has_minimum_version`` - - added ``has_gt_version``, ``has_gte_version``, ``has_lt_version``, ``has_lte_version``, + - `has_version` has been renamed to `get_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 to `has_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`` and ``TMUX_MAX_VERSION`` - -libtmux 0.6.5 (2017-04-02) --------------------------- -- Fix ``which`` command -- Add ``TmuxCommandNotFound`` exception -- Add ``tmux_search_paths`` and ``append_env_path`` kwargs to - ``tmux_cmd``. - -libtmux 0.6.4 (2017-03-25) --------------------------- -- :issue:`32` support for OpenBSD's tmux - -libtmux 0.6.3 (2017-02-08) --------------------------- -- :issue:`25` support for working with tmux ``master``, thanks @sloria. - -libtmux 0.6.2 (2017-01-19) --------------------------- -- :issue:`197` use `LooseVersion` instead of `StrictVersion` for version +- Added `TMUX_MIN_VERSION` and `TMUX_MAX_VERSION` + +## libtmux 0.6.5 (2017-04-02) + +- Fix `which` command +- Add `TmuxCommandNotFound` exception +- Add `tmux_search_paths` and `append_env_path` kwargs to + `tmux_cmd`. + +## libtmux 0.6.4 (2017-03-25) + +- {issue}`32` support for OpenBSD's tmux + +## libtmux 0.6.3 (2017-02-08) + +- {issue}`25` support for working with tmux `master`, thanks @sloria. + +## libtmux 0.6.2 (2017-01-19) + +- {issue}`197` use {}`LooseVersion` instead of {}`StrictVersion` for version checks. Thanks @minijackson. - Pin packages with pyup.io -- :issue:`21` Readme fix from @huwenchao. +- {issue}`21` Readme fix from @huwenchao. -libtmux 0.6.1 (2016-12-20) --------------------------- -- :issue:`18` Fix logger, courtesy of @geekli -- :issue:`19` Add support for ``start_directory`` in new sessions and +## libtmux 0.6.1 (2016-12-20) + +- {issue}`18` Fix logger, courtesy of @geekli +- {issue}`19` Add support for `start_directory` in new sessions and panes, courtesy of @gandelman-a. - Fix tests and add official support for 2.3 -libtmux 0.6.0 (2016-09-16) --------------------------- +## libtmux 0.6.0 (2016-09-16) + - Raise exception for invalid session names. tmux does not allow names that are empty, contain periods or colons. -- Remove unused ``target_sesssion`` param in - ``Server.attach_session`` and ``Server.switch_client``. +- Remove unused `target_sesssion` param in + `Server.attach_session` and `Server.switch_client`. + +## libtmux 0.5.1 (2016-08-18) + +- {issue}`12` - fix logger message when tmux doesn't exist in `PATH` -libtmux 0.5.1 (2016-08-18) --------------------------- -- :issue:`12` - fix logger message when tmux doesn't exist in ``PATH`` +## libtmux 0.5 (2016-06-15) -libtmux 0.5 (2016-06-15) ------------------------- -- :issue:`8` new exception ``UnknownOption`` -- :issue:`8` return ``None`` for options that are valid tmux options, +- {issue}`8` new exception `UnknownOption` +- {issue}`8` return `None` for options that are valid tmux options, but unset at that scope. -- :issue:`6` major documentation overhaul +- {issue}`6` major documentation overhaul -libtmux 0.4.1 (2016-05-23) --------------------------- -- update ``which()`` to find tmux via ``os.environ['PATH']``. - https://redd.it/4laeut +## libtmux 0.4.1 (2016-05-23) + +- update `which()` to find tmux via `os.environ['PATH']`. + + +## libtmux 0.4.0 (2016-05-23) -libtmux 0.4.0 (2016-05-23) --------------------------- - attributes for formatters are now accessible via - ``Session``, ``Window`` and ``Pane`` objects. ``session.name`` - is equivalent to ``session.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`` and - ``attached_pane`` are now properties. -- ``_TMUX`` metadata object changed to ``_info``. -- ``.findWhere()`` is now ``find_where``. + `Session`, `Window` and `Pane` objects. `session.name` + is equivalent to `session.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` and + `attached_pane` are now properties. +- `_TMUX` metadata object changed to `_info`. +- `.findWhere()` is now `find_where`. - README and usage fixes -libtmux 0.3.0 (2016-05-23) --------------------------- -- switch to pytest +## libtmux 0.3.0 (2016-05-23) + +- switch to pytest + +## libtmux 0.1.0 (2016-05-22) -libtmux 0.1.0 (2016-05-22) --------------------------- -- libtmux forked from `tmuxp`_. +- libtmux forked from [tmuxp][tmuxp]. -.. _tmuxp: https://github.com/tmux-python/tmuxp -.. _@askedrelic: https://github.com/askedrelic +[tmuxp]: https://github.com/tmux-python/tmuxp +[@askedrelic]: https://github.com/askedrelic -.. # vim: set filetype=rst: + diff --git a/MANIFEST.in b/MANIFEST.in index e12120eac..a40f8cae6 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ -include README.rst LICENSE CHANGES pyproject.toml .tmuxp.yaml +include README.md LICENSE CHANGES pyproject.toml .tmuxp.yaml include requirements/*.txt -recursive-include docs *.rst +recursive-include docs *.md diff --git a/Makefile b/Makefile index efd45209b..a5c74fc07 100644 --- a/Makefile +++ b/Makefile @@ -38,3 +38,6 @@ flake8: watch_flake8: if command -v entr > /dev/null; then ${PY_FILES} | entr -c $(MAKE) flake8; else $(MAKE) flake8 entr_warn; fi + +format_markdown: + prettier --parser=markdown -w *.md docs/*.md docs/**/*.md CHANGES diff --git a/README.md b/README.md new file mode 100644 index 000000000..50d7ceeb5 --- /dev/null +++ b/README.md @@ -0,0 +1,186 @@ +libtmux - scripting library for tmux + +[![Python Package](https://img.shields.io/pypi/v/libtmux.svg)](http://badge.fury.io/py/libtmux) +[![Docs](https://github.com/tmux-python/libtmux/workflows/Publish%20Docs/badge.svg)](https://github.com/tmux-python/libtmux/actions?query=workflow%3A%22Publish+Docs%22) +[![Build Status](https://github.com/tmux-python/libtmux/workflows/tests/badge.svg)](https://github.com/tmux-python/tmux-python/actions?query=workflow%3A%22tests%22) +[![Code Coverage](https://codecov.io/gh/tmux-python/libtmux/branch/master/graph/badge.svg)](https://codecov.io/gh/tmux-python/libtmux) +![License](https://img.shields.io/github/license/tmux-python/libtmux.svg) + +libtmux is the tool behind [tmuxp](https://tmuxp.git-pull.com/), a tmux +workspace manager in python. + +it builds upon tmux's +[target](http://man.openbsd.org/OpenBSD-5.9/man1/tmux.1#COMMANDS) and +[formats](http://man.openbsd.org/OpenBSD-5.9/man1/tmux.1#FORMATS) to +create an object mapping to traverse, inspect and interact with live +tmux sessions. + +view the [documentation](https://libtmux.git-pull.com/) homepage, +[API](https://libtmux.git-pull.com/api.html) information and +[architectural details](https://libtmux.git-pull.com/about.html). + +Python 2.x will be deprecated in libtmux 0.9. The backports branch is +[v0.8.x](https://github.com/tmux-python/libtmux/tree/v0.8.x). + +# install + +```sh +$ [sudo] pip install libtmux +``` + +# open a tmux session + +session name `foo`, window name `bar` + +```sh +$ tmux new-session -s foo -n bar +``` + +# pilot your tmux session via python + +```sh +$ python + +# or for nice autocomplete and syntax highlighting +$ pip install ptpython +$ ptpython +``` + +connect to a live tmux session: + +```python +>>> import libtmux +>>> server = libtmux.Server() +>>> server + +``` + +list sessions: + +```python +>>> server.list_sessions() +[Session($3 foo), Session($1 libtmux)] +``` + +find session: + +```python +>>> server.get_by_id('$3') +Session($3 foo) +``` + +find session by dict lookup: + +```python +>>> server.find_where({ "session_name": "foo" }) +Session($3 foo) +``` + +assign session to `session`: + +```python +>>> session = server.find_where({ "session_name": "foo" }) +``` + +play with session: + +```python +>>> session.new_window(attach=False, window_name="ha in the bg") +Window(@8 2:ha in the bg, Session($3 foo)) +>>> session.kill_window("ha in") +``` + +create new window in the background (don't switch to it): + +```python +>>> w = session.new_window(attach=False, window_name="ha in the bg") +Window(@11 3:ha in the bg, Session($3 foo)) +``` + +kill window object directly: + +```python +>>> w.kill_window() +``` + +grab remaining tmux window: + +```python +>>> window = session.attached_window +>>> window.split_window(attach=False) +Pane(%23 Window(@10 1:bar, Session($3 foo))) +``` + +rename window: + +```python +>>> window.rename_window('libtmuxower') +Window(@10 1:libtmuxower, Session($3 foo)) +``` + +create panes by splitting window: + +```python +>>> pane = window.split_window() +>>> pane = window.split_window(attach=False) +>>> pane.select_pane() +>>> window = session.new_window(attach=False, window_name="test") +>>> pane = window.split_window(attach=False) +``` + +send key strokes to panes: + +```python +>>> pane.send_keys('echo hey send now') + +>>> pane.send_keys('echo hey', enter=False) +>>> pane.enter() +``` + +grab the output of pane: + +```python +>>> pane.clear() # clear the pane +>>> pane.send_keys('cowsay hello') +>>> print('\n'.join(pane.cmd('capture-pane', '-p').stdout)) +``` + + sh-3.2$ cowsay 'hello' + _______ + < hello > + ------- + \ ^__^ + \ (oo)\_______ + (__)\ )\/\ + ||----w | + || || + +powerful traversal features: + + >>> pane.window + Window(@10 1:libtmuxower, Session($3 foo)) + >>> pane.window.session + Session($3 foo) + +# Donations + +Your donations fund development of new features, testing and support. +Your money will go directly to maintenance and development of the +project. If you are an individual, feel free to give whatever feels +right for the value you get out of the project. + +See donation options at . + +# Project details + +- tmux support: 1.8, 1.9a, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6 +- python support: >= 3.6, pypy, pypy3 +- Source: +- Docs: +- API: +- Changelog: +- Issues: +- Test Coverage: +- pypi: +- Open Hub: +- License: [MIT](http://opensource.org/licenses/MIT). diff --git a/README.rst b/README.rst deleted file mode 100644 index ba53561b1..000000000 --- a/README.rst +++ /dev/null @@ -1,214 +0,0 @@ -libtmux - scripting library for tmux - -|pypi| |docs| |build-status| |coverage| |license| - -libtmux is the tool behind `tmuxp`_, a tmux workspace manager in python. - -it builds upon tmux's `target`_ and `formats`_ to create an object -mapping to traverse, inspect and interact with live tmux sessions. - -view the `documentation`_ homepage, `API`_ information and `architectural -details`_. - -Python 2.x will be deprecated in libtmux 0.9. The backports branch is -`v0.8.x`_. - -.. _v0.8.x: https://github.com/tmux-python/libtmux/tree/v0.8.x - -install -------- - -.. code-block:: sh - - $ [sudo] pip install libtmux - -open a tmux session -------------------- - -session name ``foo``, window name ``bar`` - -.. code-block:: sh - - $ tmux new-session -s foo -n bar - -pilot your tmux session via python ----------------------------------- - -.. code-block:: sh - - $ python - - # or for nice autocomplete and syntax highlighting - $ pip install ptpython - $ ptpython - -connect to a live tmux session: - -.. code-block:: python - - >>> import libtmux - >>> server = libtmux.Server() - >>> server - - -list sessions: - -.. code-block:: python - - >>> server.list_sessions() - [Session($3 foo), Session($1 libtmux)] - -find session: - -.. code-block:: python - - >>> server.get_by_id('$3') - Session($3 foo) - -find session by dict lookup: - -.. code-block:: python - - >>> server.find_where({ "session_name": "foo" }) - Session($3 foo) - -assign session to ``session``: - -.. code-block:: python - - >>> session = server.find_where({ "session_name": "foo" }) - -play with session: - -.. code-block:: python - - >>> session.new_window(attach=False, window_name="ha in the bg") - Window(@8 2:ha in the bg, Session($3 foo)) - >>> session.kill_window("ha in") - -create new window in the background (don't switch to it): - -.. code-block:: python - - >>> w = session.new_window(attach=False, window_name="ha in the bg") - Window(@11 3:ha in the bg, Session($3 foo)) - -kill window object directly: - -.. code-block:: python - - >>> w.kill_window() - -grab remaining tmux window: - -.. code-block:: python - - >>> window = session.attached_window - >>> window.split_window(attach=False) - Pane(%23 Window(@10 1:bar, Session($3 foo))) - -rename window: - -.. code-block:: python - - >>> window.rename_window('libtmuxower') - Window(@10 1:libtmuxower, Session($3 foo)) - -create panes by splitting window: - -.. code-block:: python - - >>> pane = window.split_window() - >>> pane = window.split_window(attach=False) - >>> pane.select_pane() - >>> window = session.new_window(attach=False, window_name="test") - >>> pane = window.split_window(attach=False) - -send key strokes to panes: - -.. code-block:: python - - >>> pane.send_keys('echo hey send now') - - >>> pane.send_keys('echo hey', enter=False) - >>> pane.enter() - -grab the output of pane: - -.. code-block:: python - - >>> pane.clear() # clear the pane - >>> pane.send_keys('cowsay hello') - >>> print('\n'.join(pane.cmd('capture-pane', '-p').stdout)) - -:: - - sh-3.2$ cowsay 'hello' - _______ - < hello > - ------- - \ ^__^ - \ (oo)\_______ - (__)\ )\/\ - ||----w | - || || - -powerful traversal features:: - - >>> pane.window - Window(@10 1:libtmuxower, Session($3 foo)) - >>> pane.window.session - Session($3 foo) - -.. _developing and testing: http://libtmux.git-pull.com/developing.html -.. _tmuxp: https://tmuxp.git-pull.com/ -.. _documentation: https://libtmux.git-pull.com/ -.. _API: https://libtmux.git-pull.com/api.html -.. _architectural details: https://libtmux.git-pull.com/about.html -.. _formats: http://man.openbsd.org/OpenBSD-5.9/man1/tmux.1#FORMATS -.. _target: http://man.openbsd.org/OpenBSD-5.9/man1/tmux.1#COMMANDS - -Donations ---------- - -Your donations fund development of new features, testing and support. -Your money will go directly to maintenance and development of the project. -If you are an individual, feel free to give whatever feels right for the -value you get out of the project. - -See donation options at https://git-pull.com/support.html. - -Project details ---------------- -- tmux support: 1.8, 1.9a, 2.0, 2.1, 2.2, 2.3, 2.4, 2.5, 2.6 -- python support: >= 3.6, pypy, pypy3 -- Source: https://github.com/tmux-python/libtmux -- Docs: https://libtmux.git-pull.com -- API: https://libtmux.git-pull.com/api.html -- Changelog: https://libtmux.git-pull.com/history.html -- Issues: https://github.com/tmux-python/libtmux/issues -- Test Coverage: https://codecov.io/gh/tmux-python/libtmux -- pypi: https://pypi.python.org/pypi/libtmux -- Open Hub: https://www.openhub.net/p/libtmux-python -- License: `MIT`_. - -.. _MIT: http://opensource.org/licenses/MIT - -.. |pypi| image:: https://img.shields.io/pypi/v/libtmux.svg - :alt: Python Package - :target: http://badge.fury.io/py/libtmux - -.. |docs| image:: https://github.com/tmux-python/libtmux/workflows/Publish%20Docs/badge.svg - :alt: Docs - :target: https://github.com/tmux-python/libtmux/actions?query=workflow%3A"Publish+Docs" - -.. |build-status| image:: https://github.com/tmux-python/libtmux/workflows/tests/badge.svg - :alt: Build Status - :target: https://github.com/tmux-python/tmux-python/actions?query=workflow%3A"tests" - -.. |coverage| image:: https://codecov.io/gh/tmux-python/libtmux/branch/master/graph/badge.svg - :alt: Code Coverage - :target: https://codecov.io/gh/tmux-python/libtmux - -.. |license| image:: https://img.shields.io/github/license/tmux-python/libtmux.svg - :alt: License diff --git a/docs/Makefile b/docs/Makefile index afd449c23..c21c96a74 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,8 +1,7 @@ # Makefile for Sphinx documentation -WATCH_FILES= find .. -type f -not -path '*/\.*' | grep -i '.*[.]rst\$\|.*[.].md\|.*[.]py\$\|CHANGES\|TODO\|.*conf\.py' 2> /dev/null SHELL := /bin/bash -PYVERSION=$(shell python -c "import sys;v=sys.version_info[0];sys.stdout.write(str(v))") HTTP_PORT = 8023 +WATCH_FILES= find .. -type f -not -path '*/\.*' | grep -i '.*[.]\(rst\|md\)\$\|.*[.]py\$\|CHANGES\|TODO\|.*conf\.py' 2> /dev/null # You can set these variables from the command line. SPHINXOPTS = @@ -168,10 +167,7 @@ serve: @echo 'docs server running at http://localhost:${HTTP_PORT}/' @echo @echo '==============================================================' - @if test ${PYVERSION} -eq 2; then $(MAKE) serve_py2; else make serve_py3; fi - -serve_py2: - pushd _build/html; python2 -m SimpleHTTPServer ${HTTP_PORT}; popd + @$(MAKE) serve_py3 serve_py3: python -m http.server ${HTTP_PORT} --directory _build/html diff --git a/docs/about.md b/docs/about.md new file mode 100644 index 000000000..69cf8cdda --- /dev/null +++ b/docs/about.md @@ -0,0 +1,102 @@ +(internals)= + +(about)= + +# About + +:::{seealso} + +{ref}`api` + +::: + +```{currentmodule} libtmux + +``` + +libtmux is an [abstraction layer][abstraction layer] for tmux. + +It builds upon the concept of targets `-t`, to direct commands against +individual session, windows and panes and `FORMATS`, template variables +exposed by tmux to describe their properties. Think of `-t` analagously +to [scope][scope]. + +{class}`common.TmuxRelationalObject` acts as a container to connect the +relations of {class}`Server`, {class}`Session`, {class}`Window` and +{class}`Pane`. + +| Object | Child | Parent | +| ---------------- | ---------------- | ---------------- | +| {class}`Server` | {class}`Session` | None | +| {class}`Session` | {class}`Window` | {class}`Server` | +| {class}`Window` | {class}`Pane` | {class}`Session` | +| {class}`Pane` | None | {class}`Window` | + +Internally, tmux allows multiple servers to be ran on a system. Each one +uses a socket. The server-client architecture is executed so cleanly, +many users don't think about it. tmux automatically connects to a default +socket name and location for you if none (`-L`, `-S`) is specified. +A server will be created automatically upon starting if none exists. + +A server can have multiple sessions. `Ctrl-a s` can be used to switch +between sessions running on the server. + +Sessions, Windows and Panes all have their own unique identifier for +internal purposes. {class}`common.TmuxMappingObject` will make use of the +unique identifiers (`session_id`, `window_id`, `pane_id` ) to look +up the data stored in the {class}`Server` object. + +| Object | Prefix | Example | +| ---------------- | ------ | ----------------------------------------- | +| {class}`Server` | N/A | N/A, uses `socket-name` and `socket-path` | +| {class}`Session` | `$` | `$13` | +| {class}`Window` | `@` | `@3243` | +| {class}`Pane` | `%` | `%5433` | + +## Similarities to tmux and Pythonics + +libtmux was built in the spirit of understanding how tmux operates +and how python objects and tools can abstract the API's in a pleasant way. + +libtmux uses `FORMATTERS` in tmux to give identity attributes to +{class}`Session`, {class}`Window` and {class}`Pane` objects. See +[format.c][format.c]. + +[format.c]: https://github.com/tmux/tmux/blob/master/format.c + +How is libtmux able to keep references to panes, windows and sessions? + +> Tmux has unique ID's for sessions, windows and panes. +> +> panes use `%`, such as `%1234` +> +> windows use `@`, such as `@2345` +> +> sessions use `$`, for money, such as `$` +> +> How is libtmux able to handle windows with no names? + +> Tmux provides `window_id` as a unique identifier. +> +> What is a {pane,window}\_index vs a {pane,window,session}\_id? + +> Pane index refers to the order of a pane on the screen. +> +> Window index refers to the # of the window in the session. +> +> To assert pane, window and session data, libtmux will use +> {meth}`Server.list_sessions()`, {meth}`Session.list_windows()`, +> {meth}`Window.list_panes()` to update objects. + +## Naming conventions + +Because this is a python abstraction and commands like `new-window` +have dashes (-) replaced with underscores (\_). + +## Reference + +- tmux docs +- tmux source code + +[abstraction layer]: http://en.wikipedia.org/wiki/Abstraction_layer +[scope]: https://en.wikipedia.org/wiki/Variable_(computer_science)#Scope_and_extent diff --git a/docs/about.rst b/docs/about.rst deleted file mode 100644 index 896098d81..000000000 --- a/docs/about.rst +++ /dev/null @@ -1,105 +0,0 @@ -.. _Internals: -.. _About: - -===== -About -===== - -.. seealso:: :ref:`api` - -.. module:: libtmux - -libtmux is an `abstraction layer`_ for tmux. - -It builds upon the concept of targets ``-t``, to direct commands against -individual session, windows and panes and ``FORMATS``, template variables -exposed by tmux to describe their properties. Think of ``-t`` analagously -to `scope`_. - -:class:`common.TmuxRelationalObject` acts as a container to connect the -relations of :class:`Server`, :class:`Session`, :class:`Window` and -:class:`Pane`. - -======================== ======================= ========================= -Object Child Parent -======================== ======================= ========================= -:class:`Server` :class:`Session` None -:class:`Session` :class:`Window` :class:`Server` -:class:`Window` :class:`Pane` :class:`Session` -:class:`Pane` None :class:`Window` -======================== ======================= ========================= - -Internally, tmux allows multiple servers to be ran on a system. Each one -uses a socket. The server-client architecture is executed so cleanly, -many users don't think about it. tmux automatically connects to a default -socket name and location for you if none (``-L``, ``-S``) is specified. -A server will be created automatically upon starting if none exists. - -A server can have multiple sessions. ``Ctrl-a s`` can be used to switch -between sessions running on the server. - -Sessions, Windows and Panes all have their own unique identifier for -internal purposes. :class:`common.TmuxMappingObject` will make use of the -unique identifiers (``session_id``, ``window_id``, ``pane_id`` ) to look -up the data stored in the :class:`Server` object. - -======================== ======================= ========================= -Object Prefix Example -======================== ======================= ========================= -:class:`Server` N/A N/A, uses ``socket-name`` - and ``socket-path`` -:class:`Session` ``$`` ``$13`` -:class:`Window` ``@`` ``@3243`` -:class:`Pane` ``%`` ``%5433`` -======================== ======================= ========================= - -Similarities to tmux and Pythonics ----------------------------------- - -libtmux was built in the spirit of understanding how tmux operates -and how python objects and tools can abstract the API's in a pleasant way. - -libtmux uses ``FORMATTERS`` in tmux to give identity attributes to -:class:`Session`, :class:`Window` and :class:`Pane` objects. See -`format.c`_. - -.. _format.c: https://github.com/tmux/tmux/blob/master/format.c - -How is libtmux able to keep references to panes, windows and sessions? - - Tmux has unique ID's for sessions, windows and panes. - - panes use ``%``, such as ``%1234`` - - windows use ``@``, such as ``@2345`` - - sessions use ``$``, for money, such as ``$`` - -How is libtmux able to handle windows with no names? - - Tmux provides ``window_id`` as a unique identifier. - -What is a {pane,window}_index vs a {pane,window,session}_id? - - Pane index refers to the order of a pane on the screen. - - Window index refers to the # of the window in the session. - -To assert pane, window and session data, libtmux will use -:meth:`Server.list_sessions()`, :meth:`Session.list_windows()`, -:meth:`Window.list_panes()` to update objects. - -Naming conventions ------------------- - -Because this is a python abstraction and commands like ``new-window`` -have dashes (-) replaced with underscores (_). - -Reference ---------- - -- tmux docs http://www.openbsd.org/cgi-bin/man.cgi?query=tmux&sektion=1 -- tmux source code http://sourceforge.net/p/tmux/tmux-code/ci/master/tree/ - -.. _abstraction layer: http://en.wikipedia.org/wiki/Abstraction_layer -.. _scope: https://en.wikipedia.org/wiki/Variable_(computer_science)#Scope_and_extent diff --git a/docs/api.rst b/docs/api.md similarity index 71% rename from docs/api.rst rename to docs/api.md index 340a0e425..220f4f580 100644 --- a/docs/api.rst +++ b/docs/api.md @@ -1,125 +1,190 @@ -.. _api: +(api)= -============= -API Reference -============= +# API Reference -.. seealso:: - :ref:`quickstart`. +:::{seealso} -.. module:: libtmux +{ref}`quickstart`. -Server Object -------------- +::: +```{module} libtmux + +``` + +## Server Object + +```{eval-rst} .. autoclass:: Server :members: :inherited-members: :private-members: :show-inheritance: :member-order: bysource +``` -Session Object --------------- +## Session Object +```{eval-rst} .. autoclass:: Session :members: :inherited-members: :private-members: :show-inheritance: :member-order: bysource +``` -Window Object -------------- +## Window Object +```{eval-rst} .. autoclass:: Window :members: :inherited-members: :private-members: :show-inheritance: :member-order: bysource +``` -Pane Object ------------ +## Pane Object +```{eval-rst} .. autoclass:: Pane :members: :inherited-members: :private-members: :show-inheritance: :member-order: bysource +``` -Internals ---------- - +## Internals +```{eval-rst} .. autodata:: libtmux.common.TMUX_MIN_VERSION +``` +```{eval-rst} .. autodata:: libtmux.common.TMUX_MAX_VERSION +``` +```{eval-rst} .. autoclass:: libtmux.common.TmuxRelationalObject :members: +``` +```{eval-rst} .. autoclass:: libtmux.common.TmuxMappingObject :members: +``` +```{eval-rst} .. autoclass:: libtmux.common.EnvironmentMixin :members: +``` +```{eval-rst} .. autoclass:: libtmux.common.tmux_cmd +``` +```{eval-rst} .. automethod:: libtmux.common.which +``` +```{eval-rst} .. automethod:: libtmux.common.get_version +``` +```{eval-rst} .. automethod:: libtmux.common.has_version +``` +```{eval-rst} .. automethod:: libtmux.common.has_gt_version +``` +```{eval-rst} .. automethod:: libtmux.common.has_gte_version +``` +```{eval-rst} .. automethod:: libtmux.common.has_lt_version +``` +```{eval-rst} .. automethod:: libtmux.common.has_lte_version +``` +```{eval-rst} .. automethod:: libtmux.common.has_minimum_version +``` +```{eval-rst} .. automethod:: libtmux.common.handle_option_error +``` +```{eval-rst} .. automethod:: libtmux.common.get_libtmux_version +``` -Exceptions ----------- +## Exceptions +```{eval-rst} .. autoexception:: libtmux.exc.LibTmuxException +``` +```{eval-rst} .. autoexception:: libtmux.exc.TmuxCommandNotFound +``` +```{eval-rst} .. autoexception:: libtmux.exc.VersionTooLow +``` +```{eval-rst} .. autoexception:: libtmux.exc.TmuxSessionExists +``` +```{eval-rst} .. autoexception:: libtmux.exc.BadSessionName +``` +```{eval-rst} .. autoexception:: libtmux.exc.OptionError +``` +```{eval-rst} .. autoexception:: libtmux.exc.UnknownOption +``` +```{eval-rst} .. autoexception:: libtmux.exc.InvalidOption +``` +```{eval-rst} .. autoexception:: libtmux.exc.AmbiguousOption +``` -Test tools ----------- +## Test tools +```{eval-rst} .. automethod:: libtmux.test.retry +``` +```{eval-rst} .. automethod:: libtmux.test.get_test_session_name +``` +```{eval-rst} .. automethod:: libtmux.test.get_test_window_name +``` +```{eval-rst} .. automethod:: libtmux.test.temp_session +``` +```{eval-rst} .. automethod:: libtmux.test.temp_window +``` +```{eval-rst} .. autoclass:: libtmux.test.EnvironmentVarGuard +``` diff --git a/docs/conf.py b/docs/conf.py index 399a92fcf..9dcafd9c0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -4,7 +4,6 @@ from os.path import dirname, relpath import alagitpull -from recommonmark.transform import AutoStructify import libtmux # NOQA from libtmux import test # NOQA @@ -25,29 +24,16 @@ extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', + 'sphinx_autodoc_typehints', 'sphinx.ext.todo', 'sphinx.ext.linkcode', 'sphinx.ext.napoleon', 'alagitpull', 'sphinx_issues', - 'recommonmark', + 'myst_parser', ] -# app setup hook -def setup(app): - app.add_config_value( - 'recommonmark_config', - { - #'url_resolver': lambda url: github_doc_root + url, - 'enable_auto_toc_tree': True, - 'auto_toc_tree_section': 'Contents', - 'auto_code_block': True, - 'enable_eval_rst': True, - }, - True, - ) - app.add_transform(AutoStructify) - +myst_enable_extensions = ["colon_fence"] issues_github_path = about['__github__'].replace('https://github.com/', '') diff --git a/docs/glossary.rst b/docs/glossary.md similarity index 93% rename from docs/glossary.rst rename to docs/glossary.md index 703a8e804..c39775aa1 100644 --- a/docs/glossary.rst +++ b/docs/glossary.md @@ -1,10 +1,8 @@ -.. _glossary: - -======== -Glossary -======== +(glossary)= +# Glossary +```{eval-rst} .. glossary:: libtmux @@ -39,7 +37,7 @@ Glossary Session Inside a tmux :term:`server`. - + The session has 1 or more :term:`Window`. The bottom bar in tmux show a list of windows. Normally they can be navigated with ``Ctrl-a [0-9]``, ``Ctrl-a n`` and ``Ctrl-a p``. @@ -65,5 +63,6 @@ Glossary Target A target, cited in the manual as ``[-t target]`` can be a session, window or pane. +``` -.. _kaptan on github: https://github.com/emre/kaptan +[kaptan on github]: https://github.com/emre/kaptan diff --git a/docs/history.md b/docs/history.md new file mode 100644 index 000000000..ae0d96a9b --- /dev/null +++ b/docs/history.md @@ -0,0 +1,9 @@ +(history)= + +```{currentmodule} libtmux + +``` + +```{include} ../CHANGES + +``` diff --git a/docs/history.rst b/docs/history.rst deleted file mode 100644 index 8f4bc3f4f..000000000 --- a/docs/history.rst +++ /dev/null @@ -1,10 +0,0 @@ -.. _history: - -======= -History -======= - -.. module:: libtmux - -.. include:: ../CHANGES - :start-line: 4 diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 000000000..d01efbf16 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,27 @@ +(index)= + +# libtmux + +```{include} ../README.md + +``` + +## Table of Contents + +```{toctree} +:maxdepth: 2 + +quickstart +about +properties +traversal +servers +sessions +windows +panes +api +glossary +developing +history + +``` diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index 1404b4e18..000000000 --- a/docs/index.rst +++ /dev/null @@ -1,26 +0,0 @@ -.. _index: - -####### -libtmux -####### - -.. include:: ../README.rst - :start-line: 2 - -Table of Contents ------------------ -.. toctree:: - :maxdepth: 2 - - quickstart - about - properties - traversal - servers - sessions - windows - panes - api - glossary - developing - history diff --git a/docs/panes.md b/docs/panes.md new file mode 100644 index 000000000..e4ff4325b --- /dev/null +++ b/docs/panes.md @@ -0,0 +1,20 @@ +(panes)= + +# Panes + +- hold [pseudoterminal][pseudoterminal]'s ([pty(4)][pty(4)]) +- exist inside {ref}`Windows` +- identified by `%`, e.g. `%313` + +[pseudoterminal]: https://en.wikipedia.org/wiki/Pseudoterminal +[pty(4)]: https://www.freebsd.org/cgi/man.cgi?query=pty&sektion=4 + +```{eval-rst} +.. autoclass:: libtmux.Pane + :noindex: + :members: + :inherited-members: + :private-members: + :show-inheritance: + :member-order: bysource +``` diff --git a/docs/panes.rst b/docs/panes.rst deleted file mode 100644 index 97fa0755b..000000000 --- a/docs/panes.rst +++ /dev/null @@ -1,22 +0,0 @@ -.. _Panes: - -===== -Panes -===== - -- hold `pseudoterminal`_'s (`pty(4)`_) -- exist inside :ref:`Windows` -- identified by ``%``, e.g. ``%313`` - -.. _pseudoterminal: https://en.wikipedia.org/wiki/Pseudoterminal -.. _pty(4): https://www.freebsd.org/cgi/man.cgi?query=pty&sektion=4 - -.. module:: libtmux - -.. autoclass:: Pane - :noindex: - :members: - :inherited-members: - :private-members: - :show-inheritance: - :member-order: bysource diff --git a/docs/properties.md b/docs/properties.md new file mode 100644 index 000000000..cd21e218e --- /dev/null +++ b/docs/properties.md @@ -0,0 +1,221 @@ +(properties)= + +# Properties + +Get access to the data attributions behind tmux sessions, windows and panes. + +This is done through accessing the [formats][formats] available in `list-sessions`, +`list-windows` and `list-panes`. + +open two terminals: + +terminal one: start tmux in a seperate terminal: + +``` +$ tmux +``` + +:::::{NOTE} + +Make sure you have {ref}`libtmux installed `: + +```{code-block} sh + +pip install libtmux + +``` + +To upgrade: + +```{code-block} sh + +pip install -U libtmux + +``` + +::::: + +terminal two, `python` or `ptpython` if you have it: + +```{code-block} sh + +$ python + +``` + +import tmux: + +```{code-block} python + +import tmux + +``` + +attach default tmux {class}`libtmux.Server` to `t`: + +```{code-block} python + +>>> t = libtmux.Server(); +>>> t + + +``` + +## Session + +get the `session` object: + +```{code-block} python + +>>> session = t.sessions[0] + +>>> session +Session($0 libtmux) + +``` + +quick access to basic attributes: + +```{code-block} python + +>>> session.name +u'libtmux' + +>>> session.id +u'$0' + +>>> session.width +u'213' + +>>> session.height +u'114' + +``` + +to see all attributes for a session: + +```{code-block} python + +>>> session._info.keys() +[u'session_height', u'session_windows', u'session_width', u'session_id', u'session_created', u'session_attached', u'session_grouped', u'session_name'] + +>>> session._info +{u'session_height': u'114', u'session_windows': u'3', u'session_width': u'213', u'session_id': u'$0', u'session_created': u'1464905357', u'session_attached': u'1', u'session_grouped': u'0', u'session_name': u'libtmux'} + +``` + +some may conflict with python API, to access them, you can use `.get()`, to get the count +of sessions in a window: + +```{code-block} python + +>>> session.get('session_windows') +u'3' + +``` + +## Windows + +The same concepts apply for window: + +```{code-block} python + +>>> window = session.attached_window + +>>> window +Window(@2 2:docs, Session($0 libtmux)) + +``` + +basics: + +```{code-block} python + +>>> window.name +u'docs' + +>>> window.id +u'@2' + +>>> window.height +u'114' + +>>> window.width +u'213' + +``` + +everything available: + +```{code-block} python + +>>> window._info +{u'window_panes': u'4', u'window_active': u'1', u'window_height': u'114', u'window_activity_flag': u'0', u'window_width': u'213', u'session_id': u'$0', u'window_id': u'@2', u'window_layout': u'dad5,213x114,0,0[213x60,0,0,4,213x53,0,61{70x53,0,61,5,70x53,71,61,6,71x53,142,61,7}]', u'window_silence_flag': u'0', u'window_index': u'2', u'window_bell_flag': u'0', u'session_name': u'libtmux', u'window_flags': u'*', u'window_name': u'docs'} + +>>> window.keys() +[u'window_panes', u'window_active', u'window_height', u'window_activity_flag', u'window_width', u'session_id', u'window_id', u'window_layout', u'window_silence_flag', u'window_index', u'window_bell_flag', u'session_name', u'window_flags', u'window_name'] + +``` + +use `get()` for details not accessible via properties: + +```{code-block} python + +>>> pane.get('window_panes') +u'4' + +``` + +## Panes + +get the pane: + +```{code-block} python + +>>> pane = window.attached_pane + +>>> pane +Pane(%5 Window(@2 2:docs, Session($0 libtmux))) + +``` + +basics: + +```{code-block} python + +>>> pane.current_command +u'python' + +>>> pane.height +u'53' + +>>> pane.width +u'70' + +>>> pane.index +u'1' + +``` + +everything: + +```{code-block} python + +>>> pane._info +{u'alternate_saved_x': u'0', u'alternate_saved_y': u'0', u'cursor_y': u'47', u'cursor_x': u'0', u'pane_in_mode': u'0', u'insert_flag': u'0', u'keypad_flag': u'0', u'cursor_flag': u'1', u'pane_current_command': u'python', u'window_index': u'2', u'history_size': u'216', u'scroll_region_lower': u'52', u'keypad_cursor_flag': u'0', u'history_bytes': u'38778', u'pane_active': u'1', u'pane_dead': u'0', u'pane_synchronized': u'0', u'window_id': u'@2', u'pane_index': u'1', u'pane_width': u'70', u'mouse_any_flag': u'0', u'mouse_button_flag': u'0', u'window_name': u'docs', u'pane_current_path': u'/Users/me/work/python/libtmux/doc', u'pane_tty': u'/dev/ttys007', u'pane_title': u'Python REPL (ptpython)', u'session_id': u'$0', u'alternate_on': u'0', u'mouse_standard_flag': u'0', u'wrap_flag': u'1', u'history_limit': u'2000', u'pane_pid': u'37172', u'pane_height': u'53', u'session_name': u'libtmux', u'scroll_region_upper': u'0', u'pane_id': u'%5'} + +>>> pane._info.keys() +[u'alternate_saved_x', u'alternate_saved_y', u'cursor_y', u'cursor_x', u'pane_in_mode', u'insert_flag', u'keypad_flag', u'cursor_flag', u'pane_current_command', u'window_index', u'history_size', u'scroll_region_lower', u'keypad_cursor_flag', u'history_bytes', u'pane_active', u'pane_dead', u'pane_synchronized', u'window_id', u'pane_index', u'pane_width', u'mouse_any_flag', u'mouse_button_flag', u'window_name', u'pane_current_path', u'pane_tty', u'pane_title', u'session_id', u'alternate_on', u'mouse_standard_flag', u'wrap_flag', u'history_limit', u'pane_pid', u'pane_height', u'session_name', u'scroll_region_upper', u'pane_id'] + +``` + +use `get()` for details keys: + +```{code-block} python + +>>> pane.get('pane_width') +u'70' + +``` + +[formats]: http://man.openbsd.org/OpenBSD-5.9/man1/tmux.1#FORMATS diff --git a/docs/properties.rst b/docs/properties.rst deleted file mode 100644 index c70507cee..000000000 --- a/docs/properties.rst +++ /dev/null @@ -1,189 +0,0 @@ -.. _Properties: - -========== -Properties -========== - -Get access to the data attributions behind tmux sessions, windows and panes. - -This is done through accessing the `formats`_ available in ``list-sessions``, -``list-windows`` and ``list-panes``. - -open two terminals: - -terminal one: start tmux in a seperate terminal:: - - $ tmux - -.. NOTE:: - - Make sure you have :ref:`libtmux installed `: - - .. code-block:: sh - - pip install libtmux - - To upgrade: - - .. code-block:: sh - - pip install -U libtmux - -terminal two, ``python`` or ``ptpython`` if you have it: - -.. code-block:: sh - - $ python - -import tmux: - -.. code-block:: python - - import tmux - -attach default tmux :class:`libtmux.Server` to ``t``: - -.. code-block:: python - - >>> t = libtmux.Server(); - >>> t - - -Session -------- - -get the ``session`` object: - -.. code-block:: python - - >>> session = t.sessions[0] - - >>> session - Session($0 libtmux) - -quick access to basic attributes: - -.. code-block:: python - - >>> session.name - u'libtmux' - - >>> session.id - u'$0' - - >>> session.width - u'213' - - >>> session.height - u'114' - -to see all attributes for a session: - -.. code-block:: python - - >>> session._info.keys() - [u'session_height', u'session_windows', u'session_width', u'session_id', u'session_created', u'session_attached', u'session_grouped', u'session_name'] - - >>> session._info - {u'session_height': u'114', u'session_windows': u'3', u'session_width': u'213', u'session_id': u'$0', u'session_created': u'1464905357', u'session_attached': u'1', u'session_grouped': u'0', u'session_name': u'libtmux'} - - -some may conflict with python API, to access them, you can use ``.get()``, to get the count -of sessions in a window: - -.. code-block:: python - - >>> session.get('session_windows') - u'3' - -Windows -------- - -The same concepts apply for window: - -.. code-block:: python - - >>> window = session.attached_window - - >>> window - Window(@2 2:docs, Session($0 libtmux)) - -basics: - -.. code-block:: python - - >>> window.name - u'docs' - - >>> window.id - u'@2' - - >>> window.height - u'114' - - >>> window.width - u'213' - -everything available: - -.. code-block:: python - - >>> window._info - {u'window_panes': u'4', u'window_active': u'1', u'window_height': u'114', u'window_activity_flag': u'0', u'window_width': u'213', u'session_id': u'$0', u'window_id': u'@2', u'window_layout': u'dad5,213x114,0,0[213x60,0,0,4,213x53,0,61{70x53,0,61,5,70x53,71,61,6,71x53,142,61,7}]', u'window_silence_flag': u'0', u'window_index': u'2', u'window_bell_flag': u'0', u'session_name': u'libtmux', u'window_flags': u'*', u'window_name': u'docs'} - - >>> window.keys() - [u'window_panes', u'window_active', u'window_height', u'window_activity_flag', u'window_width', u'session_id', u'window_id', u'window_layout', u'window_silence_flag', u'window_index', u'window_bell_flag', u'session_name', u'window_flags', u'window_name'] - -use ``get()`` for details not accessible via properties: - -.. code-block:: python - - >>> pane.get('window_panes') - u'4' - -Panes ------ - -get the pane: - -.. code-block:: python - - >>> pane = window.attached_pane - - >>> pane - Pane(%5 Window(@2 2:docs, Session($0 libtmux))) - -basics: - -.. code-block:: python - - >>> pane.current_command - u'python' - - >>> pane.height - u'53' - - >>> pane.width - u'70' - - >>> pane.index - u'1' - -everything: - -.. code-block:: python - - >>> pane._info - {u'alternate_saved_x': u'0', u'alternate_saved_y': u'0', u'cursor_y': u'47', u'cursor_x': u'0', u'pane_in_mode': u'0', u'insert_flag': u'0', u'keypad_flag': u'0', u'cursor_flag': u'1', u'pane_current_command': u'python', u'window_index': u'2', u'history_size': u'216', u'scroll_region_lower': u'52', u'keypad_cursor_flag': u'0', u'history_bytes': u'38778', u'pane_active': u'1', u'pane_dead': u'0', u'pane_synchronized': u'0', u'window_id': u'@2', u'pane_index': u'1', u'pane_width': u'70', u'mouse_any_flag': u'0', u'mouse_button_flag': u'0', u'window_name': u'docs', u'pane_current_path': u'/Users/me/work/python/libtmux/doc', u'pane_tty': u'/dev/ttys007', u'pane_title': u'Python REPL (ptpython)', u'session_id': u'$0', u'alternate_on': u'0', u'mouse_standard_flag': u'0', u'wrap_flag': u'1', u'history_limit': u'2000', u'pane_pid': u'37172', u'pane_height': u'53', u'session_name': u'libtmux', u'scroll_region_upper': u'0', u'pane_id': u'%5'} - - >>> pane._info.keys() - [u'alternate_saved_x', u'alternate_saved_y', u'cursor_y', u'cursor_x', u'pane_in_mode', u'insert_flag', u'keypad_flag', u'cursor_flag', u'pane_current_command', u'window_index', u'history_size', u'scroll_region_lower', u'keypad_cursor_flag', u'history_bytes', u'pane_active', u'pane_dead', u'pane_synchronized', u'window_id', u'pane_index', u'pane_width', u'mouse_any_flag', u'mouse_button_flag', u'window_name', u'pane_current_path', u'pane_tty', u'pane_title', u'session_id', u'alternate_on', u'mouse_standard_flag', u'wrap_flag', u'history_limit', u'pane_pid', u'pane_height', u'session_name', u'scroll_region_upper', u'pane_id'] - -use ``get()`` for details keys: - -.. code-block:: python - - >>> pane.get('pane_width') - u'70' - -.. _formats: http://man.openbsd.org/OpenBSD-5.9/man1/tmux.1#FORMATS diff --git a/docs/quickstart.md b/docs/quickstart.md new file mode 100644 index 000000000..3a565eb81 --- /dev/null +++ b/docs/quickstart.md @@ -0,0 +1,372 @@ +(quickstart)= + +# Quickstart + +libtmux allows for developers and system administrators to control live tmux +sessions using python code. + +In this example, we will launch a tmux session and control the windows +from inside a live tmux session. + +(requirements)= + +## Requirements + +- [tmux][tmux] +- [pip][pip] - for this handbook's examples + +[pip]: https://pip.pypa.io/en/stable/installing/ + +[tmux]: https://tmux.github.io/ + +(installation)= + +## Installation + +Next, ensure `libtmux` is installed: + +```{code-block} bash + +$ [sudo] pip install libtmux + +``` + +## Start a tmux session + +Now, let's open a tmux session. + +```{code-block} bash + +$ tmux new-session -n bar -s foo + +``` + +This tutorial will be using the session and window name in the example. + +Window name `-n`: `bar` +Session name `-s`: `foo` + +## Control tmux via python + +:::{seealso} + +{ref}`api` + +::: + +```{eval-rst} +.. todo:: Do a version of this with `sliderepl`_ + +``` + +```{code-block} bash + +$ python + +``` + +For commandline completion, you can also use [ptpython][ptpython]. + +```{code-block} bash + +$ [sudo] pip install ptpython +$ ptpython + +``` + +```{module} libtmux + +``` + +First, we can grab a {class}`Server`. + +```{code-block} python + +>>> import libtmux +>>> server = libtmux.Server() +>>> server + + +``` + +:::{note} + +You can specify a `socket_name`, `socket_path` and `config_file` +in your server object. `libtmux.Server(socket_name='mysocket')` is +equivalent to `$ tmux -L mysocket`. + +::: + +`server` is now a living object bound to the tmux server's Sessions, +Windows and Panes. + +## Find your {class}`Session` + +If you have multiple tmux sessions open, you can see that all of the +methods in {class}`Server` are available. + +We can list sessions with {meth}`Server.list_sessions`: + +```{code-block} python + +>>> server.list_sessions() +[Session($3 foo), Session($1 libtmux)] + +``` + +This returns a list of {class}`Session` objects you can grab. We can +find our current session with: + +```{code-block} python + +>>> server.list_sessions()[0] + +``` + +However, this isn't guaranteed, libtmux works against current tmux information, the +session's name could be changed, or another tmux session may be created, +so {meth}`Server.get_by_id` and {meth}`Server.find_where` exists as a lookup. + +## Get session by ID + +tmux sessions use the `$[0-9]` convention as a way to identify sessions. + +`$3` is whatever the ID `list_sessions()` returned above. + +```{code-block} python + +>>> server.get_by_id('$3') +Session($3 foo) + +``` + +You may `session = server.get_by_id('$')` to use the session object. + +## Get session by name / other properties + +```{code-block} python + +>>> server.find_where({ "session_name": "foo" }) +Session($3 foo) + +``` + +With `find_where`, pass in a dict and return the first object found. In +this case, a {class}`Server` holds a collection of child {class}`Session`. +{class}`Session` and {class}`Window` both utilize `find_where` to sift +through Windows and Panes, respectively. + +So you may now use: + +```{code-block} python + +>>> session = server.find_where({ "session_name": "foo" }) + +``` + +to give us a `session` object to play with. + +## Playing with our tmux session + +We now have access to `session` from above with all of the methods +available in {class}`Session`. + +Let's make a {meth}`Session.new_window`, in the background: + +```{code-block} python + +>>> session.new_window(attach=False, window_name="ha in the bg") +Window(@8 2:ha in the bg, Session($3 foo)) + +``` + +So a few things: + +1. `attach=False` meant to create a new window, but not to switch to it. + It is the same as `$ tmux new-window -d`. +2. `window_name` may be specified. +3. Returns the {class}`Window` object created. + +:::{note} + +Use the API reference {ref}`api` for more commands. + +::: + +Let's delete that window ({meth}`Session.kill_window`). + +Method 1: Use passthrough to tmux's `target` system. + +```{code-block} python + +>>> session.kill_window("ha in") + +``` + +The window in the bg dissappeared. This was the equivalent of +`$ tmux kill-window -t'ha in'` + +Internally, tmux uses `target`. Its specific behavior depends on what the +target is, view the tmux manpage for more information: + +``` +This section contains a list of the commands supported by tmux. Most commands +accept the optional -t argument with one of target-client, target-session, +target-window, or target-pane. +``` + +In this case, you can also go back in time and recreate the window again. The CLI +should have history, so navigate up with the arrow key. + +```{code-block} python + +>>> session.new_window(attach=False, window_name="ha in the bg") +Window(@11 3:ha in the bg, Session($3 foo)) + +``` + +Try to kill the window by the matching id `@[0-9999]`. + +```{code-block} python + +>>> session.new_window(attach=False, window_name="ha in the bg") +Window(@12 3:ha in the bg, Session($3 foo)) + +``` + +In addition, you could also `.kill_window` direction from the {class}`Window` +object: + +```{code-block} python + +>>> window = session.new_window(attach=False, window_name="check this out") + +``` + +And kill: + +```{code-block} python + +>>> window.kill_window() + +``` + +Use {meth}`Session.list_windows()` and {meth}`Session.find_where()` to list and sort +through active {class}`Window`'s. + +## Manipulating windows + +Now that we know how to create windows, let's use one. Let's use {meth}`Session.attached_window()` +to grab our current window. + +```{code-block} python + +>>> window = session.attached_window() + +``` + +`window` now has access to all of the objects inside of {class}`Window`. + +Let's create a pane, {meth}`Window.split_window`: + +```{code-block} python + +>>> window.split_window(attach=False) +Pane(%23 Window(@10 1:bar, Session($3 foo))) + +``` + +Powered up. Let's have a break down: + +1. `window = session.attached_window()` gave us the {class}`Window` of the current attached to window. +2. `attach=False` assures the cursor didn't switch to the newly created pane. +3. Returned the created {class}`Pane`. + +Also, since you are aware of this power, let's commemorate the experience: + +```{code-block} python + +>>> window.rename_window('libtmuxower') +Window(@10 1:libtmuxower, Session($3 foo)) + +``` + +You should have noticed {meth}`Window.rename_window` renamed the window. + +## Moving cursor across windows and panes + +You have two ways you can move your cursor to new sessions, windows and panes. + +For one, arguments such as `attach=False` can be omittted. + +```{code-block} python + +>>> pane = window.split_window() + +``` + +This gives you the {class}`Pane` along with moving the cursor to a new window. You +can also use the `.select_*` available on the object, in this case the pane has +{meth}`Pane.select_pane()`. + +```{code-block} python + +>>> pane = window.split_window(attach=False) +>>> pane.select_pane() + +``` + +```{eval-rst} +.. todo:: create a ``kill_pane()`` method. +``` + +```{eval-rst} +.. todo:: have a ``.kill()`` and ``.select()`` proxy for Server, Session, Window and Pane objects. +``` + +## Sending commands to tmux panes remotely + +You may send commands to panes, windows and sessions **without** them being visible. +As long as you have the object, or are iterating through a list of them, you can use `.send_keys`. + +```{code-block} python + +>>> window = session.new_window(attach=False, window_name="test") +>>> pane = window.split_window(attach=False) +>>> pane.send_keys('echo hey', enter=False) + +``` + +See the other window, notice that {meth}`Pane.send_keys` has " `echo hey`" written, +_still in the prompt_. Note the leading space character so the command won't be added to the user's history. Use {}`pane.cmd('send-keys', text)` to send keys without this leading space. + +`enter=False` can be used to send keys without pressing return. In this case, +you may leave it to the user to press return himself, or complete a command +using {meth}`Pane.enter()`: + +```{code-block} python + +>>> pane.enter() + +``` + +## Final notes + +These objects created use tmux's internal usage of ID's to make servers, +sessions, windows and panes accessible at the object level. + +You don't have to see the tmux session to be able to orchestrate it. After +all, {class}`WorkspaceBuilder` uses these same internals to build your +sessions in the background. :) + +:::{seealso} + +If you want to dig deeper, check out {ref}`API`, the code for +and our [test suite][test suite] (see {ref}`developing`.) + +::: + +[sliderepl]: http://discorporate.us/projects/sliderepl/ +[workspacebuilder.py]: https://github.com/tmux-python/libtmux/blob/master/libtmux/workspacebuilder.py +[test suite]: https://github.com/tmux-python/libtmux/tree/master/tests +[ptpython]: https://github.com/jonathanslenders/ptpython diff --git a/docs/quickstart.rst b/docs/quickstart.rst deleted file mode 100644 index 0de69f9a2..000000000 --- a/docs/quickstart.rst +++ /dev/null @@ -1,320 +0,0 @@ -.. _quickstart: - -========== -Quickstart -========== - -libtmux allows for developers and system administrators to control live tmux -sessions using python code. - -In this example, we will launch a tmux session and control the windows -from inside a live tmux session. - -.. _requirements: - -Requirements ------------- - -- `tmux`_ -- `pip`_ - for this handbook's examples - -.. _pip: https://pip.pypa.io/en/stable/installing/ -.. _tmux: https://tmux.github.io/ - -.. _installation: - -Installation ------------- - -Next, ensure ``libtmux`` is installed: - -.. code-block:: bash - - $ [sudo] pip install libtmux - -Start a tmux session --------------------- - -Now, let's open a tmux session. - -.. code-block:: bash - - $ tmux new-session -n bar -s foo - -This tutorial will be using the session and window name in the example. - -Window name ``-n``: ``bar`` -Session name ``-s``: ``foo`` - -Control tmux via python ------------------------ - -.. seealso:: :ref:`api` - -.. todo:: Do a version of this with `sliderepl`_ - - -.. code-block:: bash - - $ python - -For commandline completion, you can also use `ptpython`_. - -.. code-block:: bash - - $ [sudo] pip install ptpython - $ ptpython - -.. module:: libtmux - -First, we can grab a :class:`Server`. - -.. code-block:: python - - >>> import libtmux - >>> server = libtmux.Server() - >>> server - - - -.. note:: - - You can specify a ``socket_name``, ``socket_path`` and ``config_file`` - in your server object. ``libtmux.Server(socket_name='mysocket')`` is - equivalent to ``$ tmux -L mysocket``. - -``server`` is now a living object bound to the tmux server's Sessions, -Windows and Panes. - -Find your :class:`Session` --------------------------- - -If you have multiple tmux sessions open, you can see that all of the -methods in :class:`Server` are available. - -We can list sessions with :meth:`Server.list_sessions`: - -.. code-block:: python - - >>> server.list_sessions() - [Session($3 foo), Session($1 libtmux)] - -This returns a list of :class:`Session` objects you can grab. We can -find our current session with: - -.. code-block:: python - - >>> server.list_sessions()[0] - -However, this isn't guaranteed, libtmux works against current tmux information, the -session's name could be changed, or another tmux session may be created, -so :meth:`Server.get_by_id` and :meth:`Server.find_where` exists as a lookup. - -Get session by ID ------------------ - -tmux sessions use the ``$[0-9]`` convention as a way to identify sessions. - -``$3`` is whatever the ID ``list_sessions()`` returned above. - -.. code-block:: python - - - >>> server.get_by_id('$3') - Session($3 foo) - -You may ``session = server.get_by_id('$')`` to use the session object. - -Get session by name / other properties --------------------------------------- - -.. code-block:: python - - >>> server.find_where({ "session_name": "foo" }) - Session($3 foo) - -With ``find_where``, pass in a dict and return the first object found. In -this case, a :class:`Server` holds a collection of child :class:`Session`. -:class:`Session` and :class:`Window` both utilize ``find_where`` to sift -through Windows and Panes, respectively. - -So you may now use: - -.. code-block:: python - - >>> session = server.find_where({ "session_name": "foo" }) - -to give us a ``session`` object to play with. - -Playing with our tmux session ------------------------------ - -We now have access to ``session`` from above with all of the methods -available in :class:`Session`. - -Let's make a :meth:`Session.new_window`, in the background: - -.. code-block:: python - - >>> session.new_window(attach=False, window_name="ha in the bg") - Window(@8 2:ha in the bg, Session($3 foo)) - -So a few things: - -1. ``attach=False`` meant to create a new window, but not to switch to it. - It is the same as ``$ tmux new-window -d``. -2. ``window_name`` may be specified. -3. Returns the :class:`Window` object created. - -.. note:: - - Use the API reference :ref:`api` for more commands. - -Let's delete that window (:meth:`Session.kill_window`). - -Method 1: Use passthrough to tmux's ``target`` system. - -.. code-block:: python - - >>> session.kill_window("ha in") - -The window in the bg dissappeared. This was the equivalent of -``$ tmux kill-window -t'ha in'`` - -Internally, tmux uses ``target``. Its specific behavior depends on what the -target is, view the tmux manpage for more information:: - - This section contains a list of the commands supported by tmux. Most commands - accept the optional -t argument with one of target-client, target-session, - target-window, or target-pane. - -In this case, you can also go back in time and recreate the window again. The CLI -should have history, so navigate up with the arrow key. - -.. code-block:: python - - >>> session.new_window(attach=False, window_name="ha in the bg") - Window(@11 3:ha in the bg, Session($3 foo)) - -Try to kill the window by the matching id ``@[0-9999]``. - -.. code-block:: python - - >>> session.new_window(attach=False, window_name="ha in the bg") - Window(@12 3:ha in the bg, Session($3 foo)) - -In addition, you could also ``.kill_window`` direction from the :class:`Window` -object: - -.. code-block:: python - - >>> window = session.new_window(attach=False, window_name="check this out") - -And kill: - -.. code-block:: python - - >>> window.kill_window() - -Use :meth:`Session.list_windows()` and :meth:`Session.find_where()` to list and sort -through active :class:`Window`'s. - -Manipulating windows --------------------- - -Now that we know how to create windows, let's use one. Let's use :meth:`Session.attached_window()` -to grab our current window. - -.. code-block:: python - - >>> window = session.attached_window() - -``window`` now has access to all of the objects inside of :class:`Window`. - -Let's create a pane, :meth:`Window.split_window`: - -.. code-block:: python - - >>> window.split_window(attach=False) - Pane(%23 Window(@10 1:bar, Session($3 foo))) - -Powered up. Let's have a break down: - -1. ``window = session.attached_window()`` gave us the :class:`Window` of the current attached to window. -2. ``attach=False`` assures the cursor didn't switch to the newly created pane. -3. Returned the created :class:`Pane`. - -Also, since you are aware of this power, let's commemorate the experience: - -.. code-block:: python - - >>> window.rename_window('libtmuxower') - Window(@10 1:libtmuxower, Session($3 foo)) - -You should have noticed :meth:`Window.rename_window` renamed the window. - -Moving cursor across windows and panes --------------------------------------- - -You have two ways you can move your cursor to new sessions, windows and panes. - -For one, arguments such as ``attach=False`` can be omittted. - -.. code-block:: python - - >>> pane = window.split_window() - -This gives you the :class:`Pane` along with moving the cursor to a new window. You -can also use the ``.select_*`` available on the object, in this case the pane has -:meth:`Pane.select_pane()`. - -.. code-block:: python - - >>> pane = window.split_window(attach=False) - >>> pane.select_pane() - -.. todo:: create a ``kill_pane()`` method. -.. todo:: have a ``.kill()`` and ``.select()`` proxy for Server, Session, Window and Pane objects. - -Sending commands to tmux panes remotely ---------------------------------------- - -You may send commands to panes, windows and sessions **without** them being visible. -As long as you have the object, or are iterating through a list of them, you can use ``.send_keys``. - -.. code-block:: python - - >>> window = session.new_window(attach=False, window_name="test") - >>> pane = window.split_window(attach=False) - >>> pane.send_keys('echo hey', enter=False) - -See the other window, notice that :meth:`Pane.send_keys` has " ``echo hey``" written, -*still in the prompt*. Note the leading space character so the command won't be added to the user's history. Use `pane.cmd('send-keys', text)` to send keys without this leading space. - -``enter=False`` can be used to send keys without pressing return. In this case, -you may leave it to the user to press return himself, or complete a command -using :meth:`Pane.enter()`: - -.. code-block:: python - - >>> pane.enter() - -Final notes ------------ - -These objects created use tmux's internal usage of ID's to make servers, -sessions, windows and panes accessible at the object level. - -You don't have to see the tmux session to be able to orchestrate it. After -all, :class:`WorkspaceBuilder` uses these same internals to build your -sessions in the background. :) - -.. seealso:: - - If you want to dig deeper, check out :ref:`API`, the code for - and our `test suite`_ (see :ref:`developing`.) - -.. _sliderepl: http://discorporate.us/projects/sliderepl/ -.. _workspacebuilder.py: https://github.com/tmux-python/libtmux/blob/master/libtmux/workspacebuilder.py -.. _test suite: https://github.com/tmux-python/libtmux/tree/master/tests -.. _ptpython: https://github.com/jonathanslenders/ptpython diff --git a/docs/servers.rst b/docs/servers.md similarity index 61% rename from docs/servers.rst rename to docs/servers.md index 71e8d41a4..13e508dda 100644 --- a/docs/servers.rst +++ b/docs/servers.md @@ -1,19 +1,16 @@ -.. _Servers: +(servers)= -======= -Servers -======= +# Servers -- identified by *socket path* and *socket name* +- identified by _socket path_ and _socket name_ - may have >1 servers running of tmux at the same time. -- hold :ref:`Sessions` (which hold :ref:`Windows`, which hold - :ref:`Panes`) +- hold {ref}`Sessions` (which hold {ref}`Windows`, which hold + {ref}`Panes`) In tmux, a server is automatically started on your behalf when you first run tmux. -.. module:: libtmux - +```{eval-rst} .. autoclass:: Server :noindex: :members: @@ -21,3 +18,4 @@ when you first run tmux. :private-members: :show-inheritance: :member-order: bysource +``` diff --git a/docs/sessions.rst b/docs/sessions.md similarity index 50% rename from docs/sessions.rst rename to docs/sessions.md index dd8b2f0e0..7ebf6c5ef 100644 --- a/docs/sessions.rst +++ b/docs/sessions.md @@ -1,13 +1,12 @@ -.. _Sessions: +(sessions)= -======== -Sessions -======== +# Sessions -- exist inside :ref:`Servers` -- contain :ref:`Windows` (which hold :ref:`Panes`) -- identified by ``$``, e.g. ``$313`` +- exist inside {ref}`Servers` +- contain {ref}`Windows` (which hold {ref}`Panes`) +- identified by `$`, e.g. `$313` +```{eval-rst} .. autoclass:: libtmux.Session :noindex: :members: @@ -15,3 +14,4 @@ Sessions :private-members: :show-inheritance: :member-order: bysource +``` diff --git a/docs/traversal.md b/docs/traversal.md new file mode 100644 index 000000000..0ccb707fb --- /dev/null +++ b/docs/traversal.md @@ -0,0 +1,113 @@ +(traversal)= + +# Traversal + +libtmux convenient access to move around the hierachy of sessions, +windows and panes in tmux. + +this is done by libtmux's object abstraction of {}`target`\_s (the `-t` +command) and the permanent internal ID's tmux gives to objects. + +open two terminals: + +terminal one: start tmux in a seperate terminal: + +``` +$ tmux +``` + +:::{NOTE} + +Make sure you have {ref}`libtmux installed `: + +``` +$ pip install libtmux +``` + +To upgrade: + +``` +$ pip install -U libtmux +``` + +::: + +terminal two, `python` or `ptpython` if you have it: + +``` +$ python +``` + +import tmux: + +``` +import tmux +``` + +attach default tmux {class}`libtmux.Server` to `t`: + +``` +>>> t = libtmux.Server(); +>>> t + +``` + +get first session {class}`Session` to {}`session`: + +``` +>>> session = t.sessions[0] +>>> session +Session($0 libtmux) +``` + +get a list of sessions: + +``` +>>> t.sessions +[Session($0 libtmux), Session($1 tmuxp)] +``` + +iterate through sessions in a server: + +``` +>>> for sess in t.sessions: +... print(sess) + +Session($0 libtmux) +Session($1 tmuxp) +``` + +grab a {class}`Window` from a session: + +``` +>>> session.windows[0] +Window(@1 1:libtmux, Session($0 libtmux)) +``` + +grab the currently focused window from session: + +> > > > session.attached_window +> > > > Window(@2 2:docs, Session($0 libtmux))grab the currently focused {class}`Pane` from session: + +``` +>>> session.attached_pane +Pane(%5 Window(@2 2:docs, Session($0 libtmux))) +``` + +assign the attached pane to `p`: + +``` +>>> p = session.attached_pane +``` + +access the window/server of a pane: + +``` +>>> p.window +Window(@2 2:docs, Session($0 libtmux)) + +>>> p.server + +``` + +[target]: http://man.openbsd.org/OpenBSD-5.9/man1/tmux.1#COMMANDS diff --git a/docs/traversal.rst b/docs/traversal.rst deleted file mode 100644 index 0a092bdf1..000000000 --- a/docs/traversal.rst +++ /dev/null @@ -1,89 +0,0 @@ -.. _Traversal: - -========= -Traversal -========= - -libtmux convenient access to move around the hierachy of sessions, -windows and panes in tmux. - -this is done by libtmux's object abstraction of `target`\_s (the ``-t`` -command) and the permanent internal ID's tmux gives to objects. - -open two terminals: - -terminal one: start tmux in a seperate terminal:: - - $ tmux - -.. NOTE:: - - Make sure you have :ref:`libtmux installed `:: - - $ pip install libtmux - - To upgrade:: - - $ pip install -U libtmux - -terminal two, ``python`` or ``ptpython`` if you have it:: - - $ python - -import tmux:: - - import tmux - -attach default tmux :class:`libtmux.Server` to ``t``:: - - >>> t = libtmux.Server(); - >>> t - - -get first session :class:`Session` to `session`:: - - >>> session = t.sessions[0] - >>> session - Session($0 libtmux) - -get a list of sessions:: - - >>> t.sessions - [Session($0 libtmux), Session($1 tmuxp)] - -iterate through sessions in a server:: - - >>> for sess in t.sessions: - ... print(sess) - - Session($0 libtmux) - Session($1 tmuxp) - -grab a :class:`Window` from a session:: - - >>> session.windows[0] - Window(@1 1:libtmux, Session($0 libtmux)) - -grab the currently focused window from session: - - >>> session.attached_window - Window(@2 2:docs, Session($0 libtmux)) - -grab the currently focused :class:`Pane` from session:: - - >>> session.attached_pane - Pane(%5 Window(@2 2:docs, Session($0 libtmux))) - -assign the attached pane to ``p``:: - - >>> p = session.attached_pane - -access the window/server of a pane:: - - >>> p.window - Window(@2 2:docs, Session($0 libtmux)) - - >>> p.server - - -.. _target: http://man.openbsd.org/OpenBSD-5.9/man1/tmux.1#COMMANDS diff --git a/docs/windows.rst b/docs/windows.md similarity index 50% rename from docs/windows.rst rename to docs/windows.md index 453d2c430..e67429473 100644 --- a/docs/windows.rst +++ b/docs/windows.md @@ -1,15 +1,16 @@ -.. _Windows: +(windows)= -======= -Windows -======= +# Windows -- exist inside :ref:`Sessions` -- contain :ref:`Panes` -- identified by ``@``, e.g. ``@313`` +- exist inside {ref}`Sessions` +- contain {ref}`Panes` +- identified by `@`, e.g. `@313` -.. module:: libtmux +```{module} libtmux +``` + +```{eval-rst} .. autoclass:: Window :noindex: :members: @@ -17,3 +18,4 @@ Windows :private-members: :show-inheritance: :member-order: bysource +``` diff --git a/libtmux/pane.py b/libtmux/pane.py index 6054abfb9..32f8ecbce 100644 --- a/libtmux/pane.py +++ b/libtmux/pane.py @@ -15,7 +15,7 @@ class Pane(TmuxMappingObject, TmuxRelationalObject): """ - A :term:`tmux(1)` :term:`Pane` [#]_. + A :term:`tmux(1)` :term:`Pane` [pane_manual]_. ``Pane`` instances can send commands directly to a pane, or traverse between linked tmux objects. @@ -33,7 +33,7 @@ class Pane(TmuxMappingObject, TmuxRelationalObject): References ---------- - .. [#] tmux pane. openbsd manpage for TMUX(1). + .. [pane_manual] tmux pane. openbsd manpage for TMUX(1). "Each window displayed by tmux may be split into one or more panes; each pane takes up a certain area of the display and is a separate terminal." diff --git a/libtmux/server.py b/libtmux/server.py index cd603ff72..39de8b63a 100644 --- a/libtmux/server.py +++ b/libtmux/server.py @@ -23,7 +23,7 @@ class Server(TmuxRelationalObject, EnvironmentMixin): """ - The :term:`tmux(1)` :term:`Server` [#]_. + The :term:`tmux(1)` :term:`Server` [server_manual]_. - :attr:`Server._sessions` [:class:`Session`, ...] @@ -44,7 +44,7 @@ class Server(TmuxRelationalObject, EnvironmentMixin): References ---------- - .. [#] CLIENTS AND SESSIONS. openbsd manpage for TMUX(1) + .. [server_manual] CLIENTS AND SESSIONS. openbsd manpage for TMUX(1) "The tmux server manages clients, sessions, windows and panes. Clients are attached to sessions to interact with them, either when they are created with the new-session command, or later with the diff --git a/libtmux/session.py b/libtmux/session.py index 0b19268bc..cd6af00a0 100644 --- a/libtmux/session.py +++ b/libtmux/session.py @@ -23,7 +23,7 @@ class Session(TmuxMappingObject, TmuxRelationalObject, EnvironmentMixin): """ - A :term:`tmux(1)` :term:`Session` [#]_. + A :term:`tmux(1)` :term:`Session` [session_manual]_. Holds :class:`Window` objects. @@ -33,7 +33,7 @@ class Session(TmuxMappingObject, TmuxRelationalObject, EnvironmentMixin): References ---------- - .. [#] tmux session. openbsd manpage for TMUX(1). + .. [session_manual] tmux session. openbsd manpage for TMUX(1). "When tmux is started it creates a new session with a single window and displays it on screen..." diff --git a/libtmux/window.py b/libtmux/window.py index b385b971e..3e8bbc629 100644 --- a/libtmux/window.py +++ b/libtmux/window.py @@ -17,7 +17,7 @@ class Window(TmuxMappingObject, TmuxRelationalObject): """ - A :term:`tmux(1)` :term:`Window` [#]_. + A :term:`tmux(1)` :term:`Window` [window_manual]_. Holds :class:`Pane` objects. @@ -27,7 +27,7 @@ class Window(TmuxMappingObject, TmuxRelationalObject): References ---------- - .. [#] tmux window. openbsd manpage for TMUX(1). + .. [window_manual] tmux window. openbsd manpage for TMUX(1). "Each session has one or more windows linked to it. A window occupies the entire screen and may be split into rectangular panes..." diff --git a/poetry.lock b/poetry.lock index 21723f8b6..304459161 100644 --- a/poetry.lock +++ b/poetry.lock @@ -116,6 +116,18 @@ optional = false python-versions = "*" version = "2021.5.30" +[[package]] +category = "dev" +description = "Foreign Function Interface for Python calling C code." +marker = "sys_platform == \"linux\"" +name = "cffi" +optional = false +python-versions = "*" +version = "1.14.5" + +[package.dependencies] +pycparser = "*" + [[package]] category = "dev" description = "Universal encoding detector for Python 2 and 3" @@ -155,7 +167,6 @@ requests = ">=2.7.9" [[package]] category = "dev" description = "Cross-platform colored terminal text." -marker = "python_version >= \"3.6.2\" and python_version < \"4.0.0\" and platform_system == \"Windows\" or sys_platform == \"win32\"" name = "colorama" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" @@ -163,25 +174,34 @@ version = "0.4.4" [[package]] category = "dev" -description = "Python parser for the CommonMark Markdown spec" -name = "commonmark" +description = "Code coverage measurement for Python" +name = "coverage" optional = false -python-versions = "*" -version = "0.9.1" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" +version = "5.5" [package.extras] -test = ["flake8 (3.7.8)", "hypothesis (3.55.3)"] +toml = ["toml"] [[package]] category = "dev" -description = "Code coverage measurement for Python" -name = "coverage" +description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." +marker = "sys_platform == \"linux\"" +name = "cryptography" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" -version = "5.5" +python-versions = ">=3.6" +version = "3.4.7" + +[package.dependencies] +cffi = ">=1.12" [package.extras] -toml = ["toml"] +docs = ["sphinx (>=1.6.5,<1.8.0 || >1.8.0,<3.1.0 || >3.1.0,<3.1.1 || >3.1.1)", "sphinx-rtd-theme"] +docstest = ["doc8", "pyenchant (>=1.6.11)", "twine (>=1.12.0)", "sphinxcontrib-spelling (>=4.0.1)"] +pep8test = ["black", "flake8", "flake8-import-order", "pep8-naming"] +sdist = ["setuptools-rust (>=0.11.4)"] +ssh = ["bcrypt (>=3.1.5)"] +test = ["pytest (>=6.0)", "pytest-cov", "pytest-subtests", "pytest-xdist", "pretend", "iso8601", "pytz", "hypothesis (>=1.11.4,<3.79.2 || >3.79.2)"] [[package]] category = "dev" @@ -198,7 +218,7 @@ description = "Docutils -- Python Documentation Utilities" name = "docutils" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "0.16" +version = "0.17.1" [[package]] category = "dev" @@ -236,18 +256,21 @@ version = "1.2.0" [[package]] category = "dev" description = "Read metadata from Python packages" -marker = "python_version >= \"3.6.2\" and python_version < \"3.8\" or python_version < \"3.8\"" name = "importlib-metadata" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -version = "2.1.1" +python-versions = ">=3.6" +version = "4.5.0" [package.dependencies] zipp = ">=0.5" +[package.dependencies.typing-extensions] +python = "<3.8" +version = ">=3.6.4" + [package.extras] -docs = ["sphinx", "rst.linker"] -testing = ["packaging", "pep517", "unittest2", "importlib-resources (>=1.3)"] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] [[package]] category = "dev" @@ -262,36 +285,88 @@ category = "dev" description = "A Python utility / library to sort Python imports." name = "isort" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "4.3.21" +python-versions = ">=3.6,<4.0" +version = "5.8.0" + +[package.extras] +colors = ["colorama (>=0.4.3,<0.5.0)"] +pipfile_deprecated_finder = ["pipreqs", "requirementslib"] +requirements_deprecated_finder = ["pipreqs", "pip-api"] + +[[package]] +category = "dev" +description = "Low-level, pure Python DBus protocol wrapper." +marker = "sys_platform == \"linux\"" +name = "jeepney" +optional = false +python-versions = ">=3.6" +version = "0.6.0" [package.extras] -pipfile = ["pipreqs", "requirementslib"] -pyproject = ["toml"] -requirements = ["pipreqs", "pip-api"] -xdg_home = ["appdirs (>=1.4.0)"] +test = ["pytest", "pytest-trio", "pytest-asyncio", "testpath", "trio"] [[package]] category = "dev" description = "A very fast and expressive template engine." name = "jinja2" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "2.11.3" +python-versions = ">=3.6" +version = "3.0.1" + +[package.dependencies] +MarkupSafe = ">=2.0" + +[package.extras] +i18n = ["Babel (>=2.7)"] + +[[package]] +category = "dev" +description = "Store and access your passwords safely." +name = "keyring" +optional = false +python-versions = ">=3.6" +version = "23.0.1" + +[package.dependencies] +SecretStorage = ">=3.2" +importlib-metadata = ">=3.6" +jeepney = ">=0.4.2" +pywin32-ctypes = "<0.1.0 || >0.1.0,<0.1.1 || >0.1.1" + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy"] + +[[package]] +category = "dev" +description = "Python port of markdown-it. Markdown parsing, done right!" +name = "markdown-it-py" +optional = false +python-versions = "~=3.6" +version = "1.1.0" [package.dependencies] -MarkupSafe = ">=0.23" +attrs = ">=19,<22" + +[package.dependencies.typing-extensions] +python = "<3.8" +version = ">=3.7.4" [package.extras] -i18n = ["Babel (>=0.8)"] +code_style = ["pre-commit (2.6)"] +compare = ["commonmark (>=0.9.1,<0.10.0)", "markdown (>=3.2.2,<3.3.0)", "mistletoe-ebp (>=0.10.0,<0.11.0)", "mistune (>=0.8.4,<0.9.0)", "panflute (>=1.12,<2.0)"] +linkify = ["linkify-it-py (>=1.0,<2.0)"] +plugins = ["mdit-py-plugins"] +rtd = ["myst-nb (0.13.0a1)", "pyyaml", "sphinx (>=2,<4)", "sphinx-copybutton", "sphinx-panels (>=0.4.0,<0.5.0)", "sphinx-book-theme"] +testing = ["coverage", "psutil", "pytest (>=3.6,<4)", "pytest-benchmark (>=3.2,<4.0)", "pytest-cov", "pytest-regressions"] [[package]] category = "dev" description = "Safely add untrusted strings to HTML/XML markup." name = "markupsafe" optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" -version = "1.1.1" +python-versions = ">=3.6" +version = "2.0.1" [[package]] category = "dev" @@ -301,6 +376,22 @@ optional = false python-versions = "*" version = "0.6.1" +[[package]] +category = "dev" +description = "Collection of plugins for markdown-it-py" +name = "mdit-py-plugins" +optional = false +python-versions = "~=3.6" +version = "0.2.8" + +[package.dependencies] +markdown-it-py = ">=1.0,<2.0" + +[package.extras] +code_style = ["pre-commit (2.6)"] +rtd = ["myst-parser (0.14.0a3)", "sphinx-book-theme (>=0.1.0,<0.2.0)"] +testing = ["coverage", "pytest (>=3.6,<4)", "pytest-cov", "pytest-regressions"] + [[package]] category = "dev" description = "Experimental type system extensions for programs checked with the mypy typechecker." @@ -310,6 +401,28 @@ optional = false python-versions = "*" version = "0.4.3" +[[package]] +category = "dev" +description = "An extended commonmark compliant parser, with bridges to docutils & sphinx." +name = "myst-parser" +optional = false +python-versions = ">=3.6" +version = "0.15.0" + +[package.dependencies] +docutils = ">=0.15,<0.18" +jinja2 = "*" +markdown-it-py = ">=1.0.0,<2.0.0" +mdit-py-plugins = ">=0.2.8,<0.3.0" +pyyaml = "*" +sphinx = ">=3,<5" + +[package.extras] +code_style = ["pre-commit (>=2.12,<3.0)"] +linkify = ["linkify-it-py (>=1.0,<2.0)"] +rtd = ["ipython", "sphinx-book-theme (>=0.1.0,<0.2.0)", "sphinx-panels (>=0.5.2,<0.6.0)", "sphinxcontrib-bibtex (>=2.1,<3.0)"] +testing = ["beautifulsoup4", "coverage", "docutils (>=0.17.0,<0.18.0)", "pytest (>=3.6,<4)", "pytest-cov", "pytest-regressions"] + [[package]] category = "dev" description = "Core utilities for Python packages" @@ -373,6 +486,15 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" version = "2.7.0" +[[package]] +category = "dev" +description = "C parser in Python" +marker = "sys_platform == \"linux\"" +name = "pycparser" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "2.20" + [[package]] category = "dev" description = "passive checker of Python programs" @@ -402,16 +524,16 @@ category = "dev" description = "pytest: simple powerful testing with Python" name = "pytest" optional = false -python-versions = ">=3.5" -version = "6.1.2" +python-versions = ">=3.6" +version = "6.2.4" [package.dependencies] atomicwrites = ">=1.0" -attrs = ">=17.4.0" +attrs = ">=19.2.0" colorama = "*" iniconfig = "*" packaging = "*" -pluggy = ">=0.12,<1.0" +pluggy = ">=0.12,<1.0.0a1" py = ">=1.8.2" toml = "*" @@ -420,7 +542,6 @@ python = "<3.8" version = ">=0.12" [package.extras] -checkqa_mypy = ["mypy (0.780)"] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] [[package]] @@ -444,8 +565,8 @@ category = "dev" description = "Thin-wrapper around the mock package for easier use with pytest" name = "pytest-mock" optional = false -python-versions = ">=3.5" -version = "3.5.1" +python-versions = ">=3.6" +version = "3.6.1" [package.dependencies] pytest = ">=5.0" @@ -458,11 +579,11 @@ category = "dev" description = "pytest plugin to re-run tests to eliminate flaky failures" name = "pytest-rerunfailures" optional = false -python-versions = ">=3.5" -version = "9.1.1" +python-versions = ">=3.6" +version = "10.0" [package.dependencies] -pytest = ">=5.0" +pytest = ">=5.3" setuptools = ">=40.0" [[package]] @@ -473,6 +594,23 @@ optional = false python-versions = "*" version = "2021.1" +[[package]] +category = "dev" +description = "" +marker = "sys_platform == \"win32\"" +name = "pywin32-ctypes" +optional = false +python-versions = "*" +version = "0.2.0" + +[[package]] +category = "dev" +description = "YAML parser and emitter for Python" +name = "pyyaml" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +version = "5.4.1" + [[package]] category = "dev" description = "readme_renderer is a library for rendering \"readme\" descriptions for Warehouse" @@ -490,19 +628,6 @@ six = "*" [package.extras] md = ["cmarkgfm (>=0.5.0,<0.6.0)"] -[[package]] -category = "dev" -description = "A docutils-compatibility bridge to CommonMark, enabling you to write CommonMark inside of Docutils & Sphinx projects." -name = "recommonmark" -optional = false -python-versions = "*" -version = "0.6.0" - -[package.dependencies] -commonmark = ">=0.8.1" -docutils = ">=0.11" -sphinx = ">=1.3.1" - [[package]] category = "dev" description = "Alternative regular expression module, to replace re." @@ -541,6 +666,30 @@ version = "0.9.1" [package.dependencies] requests = ">=2.0.1,<3.0.0" +[[package]] +category = "dev" +description = "Validating URI References per RFC 3986" +name = "rfc3986" +optional = false +python-versions = "*" +version = "1.5.0" + +[package.extras] +idna2008 = ["idna"] + +[[package]] +category = "dev" +description = "Python bindings to FreeDesktop.org Secret Service API" +marker = "sys_platform == \"linux\"" +name = "secretstorage" +optional = false +python-versions = ">=3.6" +version = "3.3.1" + +[package.dependencies] +cryptography = ">=2.0" +jeepney = ">=0.6" + [[package]] category = "dev" description = "Python 2 and 3 compatibility utilities" @@ -562,8 +711,8 @@ category = "dev" description = "Python documentation generator" name = "sphinx" optional = false -python-versions = ">=3.5" -version = "3.5.4" +python-versions = ">=3.6" +version = "4.0.2" [package.dependencies] Jinja2 = ">=2.3" @@ -571,7 +720,7 @@ Pygments = ">=2.0" alabaster = ">=0.7,<0.8" babel = ">=1.3" colorama = ">=0.3.5" -docutils = ">=0.12,<0.17" +docutils = ">=0.14,<0.18" imagesize = "*" packaging = "*" requests = ">=2.5.0" @@ -589,6 +738,21 @@ docs = ["sphinxcontrib-websupport"] lint = ["flake8 (>=3.5.0)", "isort", "mypy (>=0.800)", "docutils-stubs"] test = ["pytest", "pytest-cov", "html5lib", "cython", "typed-ast"] +[[package]] +category = "dev" +description = "Type hints (PEP 484) support for the Sphinx autodoc extension" +name = "sphinx-autodoc-typehints" +optional = false +python-versions = ">=3.6" +version = "1.12.0" + +[package.dependencies] +Sphinx = ">=3.0" + +[package.extras] +test = ["pytest (>=3.1.0)", "typing-extensions (>=3.5)", "sphobjinv (>=2.0)", "Sphinx (>=3.2.0)", "dataclasses"] +type_comments = ["typed-ast (>=1.4.0)"] + [[package]] category = "dev" description = "A Sphinx extension for linking to your project's issue tracker" @@ -634,8 +798,8 @@ category = "dev" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" name = "sphinxcontrib-htmlhelp" optional = false -python-versions = ">=3.5" -version = "1.0.3" +python-versions = ">=3.6" +version = "2.0.0" [package.extras] lint = ["flake8", "mypy", "docutils-stubs"] @@ -702,21 +866,20 @@ category = "dev" description = "Collection of utilities for publishing packages on PyPI" name = "twine" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "1.15.0" +python-versions = ">=3.6" +version = "3.4.1" [package.dependencies] +colorama = ">=0.4.3" +importlib-metadata = ">=3.6" +keyring = ">=15.1" pkginfo = ">=1.4.2" readme-renderer = ">=21.0" -requests = ">=2.5.0,<2.15 || >2.15,<2.16 || >2.16" +requests = ">=2.20" requests-toolbelt = ">=0.8.0,<0.9.0 || >0.9.0" -setuptools = ">=0.7.0" +rfc3986 = ">=1.4.0" tqdm = ">=4.14" -[package.extras] -keyring = ["keyring"] -with-blake2 = ["pyblake2"] - [[package]] category = "dev" description = "a fork of Python 2 and 3 ast modules with type comment support" @@ -729,7 +892,7 @@ version = "1.4.3" [[package]] category = "dev" description = "Backported and Experimental Type Hints for Python 3.5+" -marker = "python_version >= \"3.6.2\" and python_version < \"3.8\"" +marker = "python_version >= \"3.6.2\" and python_version < \"3.8\" or python_version < \"3.8\"" name = "typing-extensions" optional = false python-versions = "*" @@ -759,15 +922,14 @@ version = "0.5.1" [[package]] category = "dev" description = "Backport of pathlib-compatible object wrapper for zip files" -marker = "python_version >= \"3.6.2\" and python_version < \"3.8\" or python_version < \"3.8\" or python_version >= \"3.6.2\" and python_version < \"3.8\" and (python_version >= \"3.6.2\" and python_version < \"3.8\" or python_version < \"3.8\")" name = "zipp" optional = false -python-versions = ">=2.7" -version = "1.2.0" +python-versions = ">=3.6" +version = "3.4.1" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] -testing = ["pathlib2", "unittest2", "jaraco.itertools", "func-timeout"] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-cov", "pytest-enabler", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] [extras] coverage = [] @@ -778,7 +940,7 @@ lint = [] test = [] [metadata] -content-hash = "7cd7b596cd76515db5ec4c1b07f5b91fa5fa72d61e594154f7e25afd1efca9fd" +content-hash = "b59e2e9cf218a5fee93fbc5d360635ea0b5194b726f3a2f9727b1fc34b77eb0a" lock-version = "1.0" python-versions = "^3.6" @@ -819,6 +981,57 @@ certifi = [ {file = "certifi-2021.5.30-py2.py3-none-any.whl", hash = "sha256:50b1e4f8446b06f41be7dd6338db18e0990601dce795c2b1686458aa7e8fa7d8"}, {file = "certifi-2021.5.30.tar.gz", hash = "sha256:2bbf76fd432960138b3ef6dda3dde0544f27cbf8546c458e60baf371917ba9ee"}, ] +cffi = [ + {file = "cffi-1.14.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:bb89f306e5da99f4d922728ddcd6f7fcebb3241fc40edebcb7284d7514741991"}, + {file = "cffi-1.14.5-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:34eff4b97f3d982fb93e2831e6750127d1355a923ebaeeb565407b3d2f8d41a1"}, + {file = "cffi-1.14.5-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:99cd03ae7988a93dd00bcd9d0b75e1f6c426063d6f03d2f90b89e29b25b82dfa"}, + {file = "cffi-1.14.5-cp27-cp27m-win32.whl", hash = "sha256:65fa59693c62cf06e45ddbb822165394a288edce9e276647f0046e1ec26920f3"}, + {file = "cffi-1.14.5-cp27-cp27m-win_amd64.whl", hash = "sha256:51182f8927c5af975fece87b1b369f722c570fe169f9880764b1ee3bca8347b5"}, + {file = "cffi-1.14.5-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:43e0b9d9e2c9e5d152946b9c5fe062c151614b262fda2e7b201204de0b99e482"}, + {file = "cffi-1.14.5-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:cbde590d4faaa07c72bf979734738f328d239913ba3e043b1e98fe9a39f8b2b6"}, + {file = "cffi-1.14.5-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:5de7970188bb46b7bf9858eb6890aad302577a5f6f75091fd7cdd3ef13ef3045"}, + {file = "cffi-1.14.5-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:a465da611f6fa124963b91bf432d960a555563efe4ed1cc403ba5077b15370aa"}, + {file = "cffi-1.14.5-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:d42b11d692e11b6634f7613ad8df5d6d5f8875f5d48939520d351007b3c13406"}, + {file = "cffi-1.14.5-cp35-cp35m-win32.whl", hash = "sha256:72d8d3ef52c208ee1c7b2e341f7d71c6fd3157138abf1a95166e6165dd5d4369"}, + {file = "cffi-1.14.5-cp35-cp35m-win_amd64.whl", hash = "sha256:29314480e958fd8aab22e4a58b355b629c59bf5f2ac2492b61e3dc06d8c7a315"}, + {file = "cffi-1.14.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:3d3dd4c9e559eb172ecf00a2a7517e97d1e96de2a5e610bd9b68cea3925b4892"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:48e1c69bbacfc3d932221851b39d49e81567a4d4aac3b21258d9c24578280058"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:69e395c24fc60aad6bb4fa7e583698ea6cc684648e1ffb7fe85e3c1ca131a7d5"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:9e93e79c2551ff263400e1e4be085a1210e12073a31c2011dbbda14bda0c6132"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24ec4ff2c5c0c8f9c6b87d5bb53555bf267e1e6f70e52e5a9740d32861d36b6f"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c3f39fa737542161d8b0d680df2ec249334cd70a8f420f71c9304bd83c3cbed"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:681d07b0d1e3c462dd15585ef5e33cb021321588bebd910124ef4f4fb71aef55"}, + {file = "cffi-1.14.5-cp36-cp36m-win32.whl", hash = "sha256:58e3f59d583d413809d60779492342801d6e82fefb89c86a38e040c16883be53"}, + {file = "cffi-1.14.5-cp36-cp36m-win_amd64.whl", hash = "sha256:005a36f41773e148deac64b08f233873a4d0c18b053d37da83f6af4d9087b813"}, + {file = "cffi-1.14.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2894f2df484ff56d717bead0a5c2abb6b9d2bf26d6960c4604d5c48bbc30ee73"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0857f0ae312d855239a55c81ef453ee8fd24136eaba8e87a2eceba644c0d4c06"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:cd2868886d547469123fadc46eac7ea5253ea7fcb139f12e1dfc2bbd406427d1"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:35f27e6eb43380fa080dccf676dece30bef72e4a67617ffda586641cd4508d49"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06d7cd1abac2ffd92e65c0609661866709b4b2d82dd15f611e602b9b188b0b69"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0f861a89e0043afec2a51fd177a567005847973be86f709bbb044d7f42fc4e05"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc5a8e069b9ebfa22e26d0e6b97d6f9781302fe7f4f2b8776c3e1daea35f1adc"}, + {file = "cffi-1.14.5-cp37-cp37m-win32.whl", hash = "sha256:9ff227395193126d82e60319a673a037d5de84633f11279e336f9c0f189ecc62"}, + {file = "cffi-1.14.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9cf8022fb8d07a97c178b02327b284521c7708d7c71a9c9c355c178ac4bbd3d4"}, + {file = "cffi-1.14.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8b198cec6c72df5289c05b05b8b0969819783f9418e0409865dac47288d2a053"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ad17025d226ee5beec591b52800c11680fca3df50b8b29fe51d882576e039ee0"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6c97d7350133666fbb5cf4abdc1178c812cb205dc6f41d174a7b0f18fb93337e"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8ae6299f6c68de06f136f1f9e69458eae58f1dacf10af5c17353eae03aa0d827"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:04c468b622ed31d408fea2346bec5bbffba2cc44226302a0de1ade9f5ea3d373"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:06db6321b7a68b2bd6df96d08a5adadc1fa0e8f419226e25b2a5fbf6ccc7350f"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:293e7ea41280cb28c6fcaaa0b1aa1f533b8ce060b9e701d78511e1e6c4a1de76"}, + {file = "cffi-1.14.5-cp38-cp38-win32.whl", hash = "sha256:b85eb46a81787c50650f2392b9b4ef23e1f126313b9e0e9013b35c15e4288e2e"}, + {file = "cffi-1.14.5-cp38-cp38-win_amd64.whl", hash = "sha256:1f436816fc868b098b0d63b8920de7d208c90a67212546d02f84fe78a9c26396"}, + {file = "cffi-1.14.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1071534bbbf8cbb31b498d5d9db0f274f2f7a865adca4ae429e147ba40f73dea"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:9de2e279153a443c656f2defd67769e6d1e4163952b3c622dcea5b08a6405322"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:6e4714cc64f474e4d6e37cfff31a814b509a35cb17de4fb1999907575684479c"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:158d0d15119b4b7ff6b926536763dc0714313aa59e320ddf787502c70c4d4bee"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1bf1ac1984eaa7675ca8d5745a8cb87ef7abecb5592178406e55858d411eadc0"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:df5052c5d867c1ea0b311fb7c3cd28b19df469c056f7fdcfe88c7473aa63e333"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:24a570cd11895b60829e941f2613a4f79df1a27344cbbb82164ef2e0116f09c7"}, + {file = "cffi-1.14.5-cp39-cp39-win32.whl", hash = "sha256:afb29c1ba2e5a3736f1c301d9d0abe3ec8b86957d04ddfa9d7a6a42b9367e396"}, + {file = "cffi-1.14.5-cp39-cp39-win_amd64.whl", hash = "sha256:f2d45f97ab6bb54753eab54fffe75aaf3de4ff2341c9daee1987ee1837636f1d"}, + {file = "cffi-1.14.5.tar.gz", hash = "sha256:fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c"}, +] chardet = [ {file = "chardet-4.0.0-py2.py3-none-any.whl", hash = "sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5"}, {file = "chardet-4.0.0.tar.gz", hash = "sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa"}, @@ -836,10 +1049,6 @@ colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] -commonmark = [ - {file = "commonmark-0.9.1-py2.py3-none-any.whl", hash = "sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9"}, - {file = "commonmark-0.9.1.tar.gz", hash = "sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60"}, -] coverage = [ {file = "coverage-5.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:b6d534e4b2ab35c9f93f46229363e17f63c53ad01330df9f2d6bd1187e5eaacf"}, {file = "coverage-5.5-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:b7895207b4c843c76a25ab8c1e866261bcfe27bfaa20c192de5190121770672b"}, @@ -894,13 +1103,27 @@ coverage = [ {file = "coverage-5.5-pp37-none-any.whl", hash = "sha256:2a3859cb82dcbda1cfd3e6f71c27081d18aa251d20a17d87d26d4cd216fb0af4"}, {file = "coverage-5.5.tar.gz", hash = "sha256:ebe78fe9a0e874362175b02371bdfbee64d8edc42a044253ddf4ee7d3c15212c"}, ] +cryptography = [ + {file = "cryptography-3.4.7-cp36-abi3-macosx_10_10_x86_64.whl", hash = "sha256:3d8427734c781ea5f1b41d6589c293089704d4759e34597dce91014ac125aad1"}, + {file = "cryptography-3.4.7-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:8e56e16617872b0957d1c9742a3f94b43533447fd78321514abbe7db216aa250"}, + {file = "cryptography-3.4.7-cp36-abi3-manylinux2010_x86_64.whl", hash = "sha256:37340614f8a5d2fb9aeea67fd159bfe4f5f4ed535b1090ce8ec428b2f15a11f2"}, + {file = "cryptography-3.4.7-cp36-abi3-manylinux2014_aarch64.whl", hash = "sha256:240f5c21aef0b73f40bb9f78d2caff73186700bf1bc6b94285699aff98cc16c6"}, + {file = "cryptography-3.4.7-cp36-abi3-manylinux2014_x86_64.whl", hash = "sha256:1e056c28420c072c5e3cb36e2b23ee55e260cb04eee08f702e0edfec3fb51959"}, + {file = "cryptography-3.4.7-cp36-abi3-win32.whl", hash = "sha256:0f1212a66329c80d68aeeb39b8a16d54ef57071bf22ff4e521657b27372e327d"}, + {file = "cryptography-3.4.7-cp36-abi3-win_amd64.whl", hash = "sha256:de4e5f7f68220d92b7637fc99847475b59154b7a1b3868fb7385337af54ac9ca"}, + {file = "cryptography-3.4.7-pp36-pypy36_pp73-manylinux2010_x86_64.whl", hash = "sha256:26965837447f9c82f1855e0bc8bc4fb910240b6e0d16a664bb722df3b5b06873"}, + {file = "cryptography-3.4.7-pp36-pypy36_pp73-manylinux2014_x86_64.whl", hash = "sha256:eb8cc2afe8b05acbd84a43905832ec78e7b3873fb124ca190f574dca7389a87d"}, + {file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2010_x86_64.whl", hash = "sha256:7ec5d3b029f5fa2b179325908b9cd93db28ab7b85bb6c1db56b10e0b54235177"}, + {file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2014_x86_64.whl", hash = "sha256:ee77aa129f481be46f8d92a1a7db57269a2f23052d5f2433b4621bb457081cc9"}, + {file = "cryptography-3.4.7.tar.gz", hash = "sha256:3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713"}, +] dataclasses = [ {file = "dataclasses-0.8-py3-none-any.whl", hash = "sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf"}, {file = "dataclasses-0.8.tar.gz", hash = "sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97"}, ] docutils = [ - {file = "docutils-0.16-py2.py3-none-any.whl", hash = "sha256:0c5b78adfbf7762415433f5515cd5c9e762339e23369dbe8000d84a4bf4ab3af"}, - {file = "docutils-0.16.tar.gz", hash = "sha256:c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc"}, + {file = "docutils-0.17.1-py2.py3-none-any.whl", hash = "sha256:cf316c8370a737a022b72b56874f6602acf974a37a9fba42ec2876387549fc61"}, + {file = "docutils-0.17.1.tar.gz", hash = "sha256:686577d2e4c32380bb50cbb22f575ed742d58168cee37e99117a854bcd88f125"}, ] flake8 = [ {file = "flake8-3.9.2-py2.py3-none-any.whl", hash = "sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907"}, @@ -915,83 +1138,85 @@ imagesize = [ {file = "imagesize-1.2.0.tar.gz", hash = "sha256:b1f6b5a4eab1f73479a50fb79fcf729514a900c341d8503d62a62dbc4127a2b1"}, ] importlib-metadata = [ - {file = "importlib_metadata-2.1.1-py2.py3-none-any.whl", hash = "sha256:c2d6341ff566f609e89a2acb2db190e5e1d23d5409d6cc8d2fe34d72443876d4"}, - {file = "importlib_metadata-2.1.1.tar.gz", hash = "sha256:b8de9eff2b35fb037368f28a7df1df4e6436f578fa74423505b6c6a778d5b5dd"}, + {file = "importlib_metadata-4.5.0-py3-none-any.whl", hash = "sha256:833b26fb89d5de469b24a390e9df088d4e52e4ba33b01dc5e0e4f41b81a16c00"}, + {file = "importlib_metadata-4.5.0.tar.gz", hash = "sha256:b142cc1dd1342f31ff04bb7d022492b09920cb64fed867cd3ea6f80fe3ebd139"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] isort = [ - {file = "isort-4.3.21-py2.py3-none-any.whl", hash = "sha256:6e811fcb295968434526407adb8796944f1988c5b65e8139058f2014cbe100fd"}, - {file = "isort-4.3.21.tar.gz", hash = "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1"}, + {file = "isort-5.8.0-py3-none-any.whl", hash = "sha256:2bb1680aad211e3c9944dbce1d4ba09a989f04e238296c87fe2139faa26d655d"}, + {file = "isort-5.8.0.tar.gz", hash = "sha256:0a943902919f65c5684ac4e0154b1ad4fac6dcaa5d9f3426b732f1c8b5419be6"}, +] +jeepney = [ + {file = "jeepney-0.6.0-py3-none-any.whl", hash = "sha256:aec56c0eb1691a841795111e184e13cad504f7703b9a64f63020816afa79a8ae"}, + {file = "jeepney-0.6.0.tar.gz", hash = "sha256:7d59b6622675ca9e993a6bd38de845051d315f8b0c72cca3aef733a20b648657"}, ] jinja2 = [ - {file = "Jinja2-2.11.3-py2.py3-none-any.whl", hash = "sha256:03e47ad063331dd6a3f04a43eddca8a966a26ba0c5b7207a9a9e4e08f1b29419"}, - {file = "Jinja2-2.11.3.tar.gz", hash = "sha256:a6d58433de0ae800347cab1fa3043cebbabe8baa9d29e668f1c768cb87a333c6"}, + {file = "Jinja2-3.0.1-py3-none-any.whl", hash = "sha256:1f06f2da51e7b56b8f238affdd6b4e2c61e39598a378cc49345bc1bd42a978a4"}, + {file = "Jinja2-3.0.1.tar.gz", hash = "sha256:703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4"}, +] +keyring = [ + {file = "keyring-23.0.1-py3-none-any.whl", hash = "sha256:8f607d7d1cc502c43a932a275a56fe47db50271904513a379d39df1af277ac48"}, + {file = "keyring-23.0.1.tar.gz", hash = "sha256:045703609dd3fccfcdb27da201684278823b72af515aedec1a8515719a038cb8"}, +] +markdown-it-py = [ + {file = "markdown-it-py-1.1.0.tar.gz", hash = "sha256:36be6bb3ad987bfdb839f5ba78ddf094552ca38ccbd784ae4f74a4e1419fc6e3"}, + {file = "markdown_it_py-1.1.0-py3-none-any.whl", hash = "sha256:98080fc0bc34c4f2bcf0846a096a9429acbd9d5d8e67ed34026c03c61c464389"}, ] markupsafe = [ - {file = "MarkupSafe-1.1.1-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-win32.whl", hash = "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-win_amd64.whl", hash = "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e"}, - {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f"}, - {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-macosx_10_6_intel.whl", hash = "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_i686.whl", hash = "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_x86_64.whl", hash = "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-win32.whl", hash = "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-win_amd64.whl", hash = "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-macosx_10_6_intel.whl", hash = "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-win32.whl", hash = "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-win_amd64.whl", hash = "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d53bc011414228441014aa71dbec320c66468c1030aae3a6e29778a3382d96e5"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:3b8a6499709d29c2e2399569d96719a1b21dcd94410a586a18526b143ec8470f"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:84dee80c15f1b560d55bcfe6d47b27d070b4681c699c572af2e3c7cc90a3b8e0"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:b1dba4527182c95a0db8b6060cc98ac49b9e2f5e64320e2b56e47cb2831978c7"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-win32.whl", hash = "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:bf5aa3cbcfdf57fa2ee9cd1822c862ef23037f5c832ad09cfea57fa846dec193"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:6fffc775d90dcc9aed1b89219549b329a9250d918fd0b8fa8d93d154918422e1"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:a6a744282b7718a2a62d2ed9d993cad6f5f585605ad352c11de459f4108df0a1"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:195d7d2c4fbb0ee8139a6cf67194f3973a6b3042d742ebe0a9ed36d8b6f0c07f"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-win32.whl", hash = "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:acf08ac40292838b3cbbb06cfe9b2cb9ec78fce8baca31ddb87aaac2e2dc3bc2"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:d9be0ba6c527163cbed5e0857c451fcd092ce83947944d6c14bc95441203f032"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:caabedc8323f1e93231b52fc32bdcde6db817623d33e100708d9a68e1f53b26b"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-win32.whl", hash = "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d73a845f227b0bfe8a7455ee623525ee656a9e2e749e4742706d80a6065d5e2c"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:98bae9582248d6cf62321dcb52aaf5d9adf0bad3b40582925ef7c7f0ed85fceb"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:2beec1e0de6924ea551859edb9e7679da6e4870d32cb766240ce17e0a0ba2014"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:7fed13866cf14bba33e7176717346713881f56d9d2bcebab207f7a036f41b850"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:6f1e273a344928347c1290119b493a1f0303c52f5a5eae5f16d74f48c15d4a85"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:feb7b34d6325451ef96bc0e36e1a6c0c1c64bc1fbec4b854f4529e51887b1621"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-win32.whl", hash = "sha256:22c178a091fc6630d0d045bdb5992d2dfe14e3259760e713c490da5323866c39"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:b7d644ddb4dbd407d31ffb699f1d140bc35478da613b441c582aeb7c43838dd8"}, - {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, + {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, ] mccabe = [ {file = "mccabe-0.6.1-py2.py3-none-any.whl", hash = "sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42"}, {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, ] +mdit-py-plugins = [ + {file = "mdit-py-plugins-0.2.8.tar.gz", hash = "sha256:5991cef645502e80a5388ec4fc20885d2313d4871e8b8e320ca2de14ac0c015f"}, + {file = "mdit_py_plugins-0.2.8-py3-none-any.whl", hash = "sha256:1833bf738e038e35d89cb3a07eb0d227ed647ce7dd357579b65343740c6d249c"}, +] mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, ] +myst-parser = [ + {file = "myst-parser-0.15.0.tar.gz", hash = "sha256:3bddfbc8d8afb8dfbd4a6d4b626633585f2ef3480f2ac17eb0e771f96dd743ba"}, + {file = "myst_parser-0.15.0-py3-none-any.whl", hash = "sha256:dd9d5ab06bc7cd047f672785b44f2d172988e63452ef67dbefe0a9a38e6a4a41"}, +] packaging = [ {file = "packaging-20.9-py2.py3-none-any.whl", hash = "sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a"}, {file = "packaging-20.9.tar.gz", hash = "sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5"}, @@ -1016,6 +1241,10 @@ pycodestyle = [ {file = "pycodestyle-2.7.0-py2.py3-none-any.whl", hash = "sha256:514f76d918fcc0b55c6680472f0a37970994e07bbb80725808c17089be302068"}, {file = "pycodestyle-2.7.0.tar.gz", hash = "sha256:c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef"}, ] +pycparser = [ + {file = "pycparser-2.20-py2.py3-none-any.whl", hash = "sha256:7582ad22678f0fcd81102833f60ef8d0e57288b6b5fb00323d101be910e35705"}, + {file = "pycparser-2.20.tar.gz", hash = "sha256:2d475327684562c3a96cc71adf7dc8c4f0565175cf86b6d7a404ff4c771f15f0"}, +] pyflakes = [ {file = "pyflakes-2.3.1-py2.py3-none-any.whl", hash = "sha256:7893783d01b8a89811dd72d7dfd4d84ff098e5eed95cfa8905b22bbffe52efc3"}, {file = "pyflakes-2.3.1.tar.gz", hash = "sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db"}, @@ -1029,33 +1258,64 @@ pyparsing = [ {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, ] pytest = [ - {file = "pytest-6.1.2-py3-none-any.whl", hash = "sha256:4288fed0d9153d9646bfcdf0c0428197dba1ecb27a33bb6e031d002fa88653fe"}, - {file = "pytest-6.1.2.tar.gz", hash = "sha256:c0a7e94a8cdbc5422a51ccdad8e6f1024795939cc89159a0ae7f0b316ad3823e"}, + {file = "pytest-6.2.4-py3-none-any.whl", hash = "sha256:91ef2131a9bd6be8f76f1f08eac5c5317221d6ad1e143ae03894b862e8976890"}, + {file = "pytest-6.2.4.tar.gz", hash = "sha256:50bcad0a0b9c5a72c8e4e7c9855a3ad496ca6a881a3641b4260605450772c54b"}, ] pytest-cov = [ {file = "pytest-cov-2.12.1.tar.gz", hash = "sha256:261ceeb8c227b726249b376b8526b600f38667ee314f910353fa318caa01f4d7"}, {file = "pytest_cov-2.12.1-py2.py3-none-any.whl", hash = "sha256:261bb9e47e65bd099c89c3edf92972865210c36813f80ede5277dceb77a4a62a"}, ] pytest-mock = [ - {file = "pytest-mock-3.5.1.tar.gz", hash = "sha256:a1e2aba6af9560d313c642dae7e00a2a12b022b80301d9d7fc8ec6858e1dd9fc"}, - {file = "pytest_mock-3.5.1-py3-none-any.whl", hash = "sha256:379b391cfad22422ea2e252bdfc008edd08509029bcde3c25b2c0bd741e0424e"}, + {file = "pytest-mock-3.6.1.tar.gz", hash = "sha256:40217a058c52a63f1042f0784f62009e976ba824c418cced42e88d5f40ab0e62"}, + {file = "pytest_mock-3.6.1-py3-none-any.whl", hash = "sha256:30c2f2cc9759e76eee674b81ea28c9f0b94f8f0445a1b87762cadf774f0df7e3"}, ] pytest-rerunfailures = [ - {file = "pytest-rerunfailures-9.1.1.tar.gz", hash = "sha256:1cb11a17fc121b3918414eb5eaf314ee325f2e693ac7cb3f6abf7560790827f2"}, - {file = "pytest_rerunfailures-9.1.1-py3-none-any.whl", hash = "sha256:2eb7d0ad651761fbe80e064b0fd415cf6730cdbc53c16a145fd84b66143e609f"}, + {file = "pytest-rerunfailures-10.0.tar.gz", hash = "sha256:3906e611f962e3bdf15501e8a24ad2d12a703eff7d2030ea88acf68ad8d6b391"}, + {file = "pytest_rerunfailures-10.0-py3-none-any.whl", hash = "sha256:fb5f276df942944da80f3c7a84507ac4f92cc3f462fe6bd4bbcbef94de22db8b"}, ] pytz = [ {file = "pytz-2021.1-py2.py3-none-any.whl", hash = "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798"}, {file = "pytz-2021.1.tar.gz", hash = "sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da"}, ] +pywin32-ctypes = [ + {file = "pywin32-ctypes-0.2.0.tar.gz", hash = "sha256:24ffc3b341d457d48e8922352130cf2644024a4ff09762a2261fd34c36ee5942"}, + {file = "pywin32_ctypes-0.2.0-py2.py3-none-any.whl", hash = "sha256:9dc2d991b3479cc2df15930958b674a48a227d5361d413827a4cfd0b5876fc98"}, +] +pyyaml = [ + {file = "PyYAML-5.4.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922"}, + {file = "PyYAML-5.4.1-cp27-cp27m-win32.whl", hash = "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393"}, + {file = "PyYAML-5.4.1-cp27-cp27m-win_amd64.whl", hash = "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8"}, + {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, + {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, + {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, + {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, + {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, + {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, + {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, + {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, + {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, + {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, + {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, + {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, + {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, + {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, +] readme-renderer = [ {file = "readme_renderer-29.0-py2.py3-none-any.whl", hash = "sha256:63b4075c6698fcfa78e584930f07f39e05d46f3ec97f65006e430b595ca6348c"}, {file = "readme_renderer-29.0.tar.gz", hash = "sha256:92fd5ac2bf8677f310f3303aa4bce5b9d5f9f2094ab98c29f13791d7b805a3db"}, ] -recommonmark = [ - {file = "recommonmark-0.6.0-py2.py3-none-any.whl", hash = "sha256:2ec4207a574289355d5b6ae4ae4abb29043346ca12cdd5f07d374dc5987d2852"}, - {file = "recommonmark-0.6.0.tar.gz", hash = "sha256:29cd4faeb6c5268c633634f2d69aef9431e0f4d347f90659fd0aab20e541efeb"}, -] regex = [ {file = "regex-2021.4.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:619d71c59a78b84d7f18891fe914446d07edd48dc8328c8e149cbe0929b4e000"}, {file = "regex-2021.4.4-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:47bf5bf60cf04d72bf6055ae5927a0bd9016096bf3d742fa50d9bf9f45aa0711"}, @@ -1107,6 +1367,14 @@ requests-toolbelt = [ {file = "requests-toolbelt-0.9.1.tar.gz", hash = "sha256:968089d4584ad4ad7c171454f0a5c6dac23971e9472521ea3b6d49d610aa6fc0"}, {file = "requests_toolbelt-0.9.1-py2.py3-none-any.whl", hash = "sha256:380606e1d10dc85c3bd47bf5a6095f815ec007be7a8b69c878507068df059e6f"}, ] +rfc3986 = [ + {file = "rfc3986-1.5.0-py2.py3-none-any.whl", hash = "sha256:a86d6e1f5b1dc238b218b012df0aa79409667bb209e58da56d0b94704e712a97"}, + {file = "rfc3986-1.5.0.tar.gz", hash = "sha256:270aaf10d87d0d4e095063c65bf3ddbc6ee3d0b226328ce21e036f946e421835"}, +] +secretstorage = [ + {file = "SecretStorage-3.3.1-py3-none-any.whl", hash = "sha256:422d82c36172d88d6a0ed5afdec956514b189ddbfb72fefab0c8a1cee4eaf71f"}, + {file = "SecretStorage-3.3.1.tar.gz", hash = "sha256:fd666c51a6bf200643495a04abb261f83229dcb6fd8472ec393df7ffc8b6f195"}, +] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, @@ -1116,8 +1384,12 @@ snowballstemmer = [ {file = "snowballstemmer-2.1.0.tar.gz", hash = "sha256:e997baa4f2e9139951b6f4c631bad912dfd3c792467e2f03d7239464af90e914"}, ] sphinx = [ - {file = "Sphinx-3.5.4-py3-none-any.whl", hash = "sha256:2320d4e994a191f4b4be27da514e46b3d6b420f2ff895d064f52415d342461e8"}, - {file = "Sphinx-3.5.4.tar.gz", hash = "sha256:19010b7b9fa0dc7756a6e105b2aacd3a80f798af3c25c273be64d7beeb482cb1"}, + {file = "Sphinx-4.0.2-py3-none-any.whl", hash = "sha256:d1cb10bee9c4231f1700ec2e24a91be3f3a3aba066ea4ca9f3bbe47e59d5a1d4"}, + {file = "Sphinx-4.0.2.tar.gz", hash = "sha256:b5c2ae4120bf00c799ba9b3699bc895816d272d120080fbc967292f29b52b48c"}, +] +sphinx-autodoc-typehints = [ + {file = "sphinx-autodoc-typehints-1.12.0.tar.gz", hash = "sha256:193617d9dbe0847281b1399d369e74e34cd959c82e02c7efde077fca908a9f52"}, + {file = "sphinx_autodoc_typehints-1.12.0-py3-none-any.whl", hash = "sha256:5e81776ec422dd168d688ab60f034fccfafbcd94329e9537712c93003bddc04a"}, ] sphinx-issues = [ {file = "sphinx-issues-1.2.0.tar.gz", hash = "sha256:845294736c7ac4c09c706f13431f709e1164037cbb00f6bf623ae16eccf509f3"}, @@ -1132,8 +1404,8 @@ sphinxcontrib-devhelp = [ {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, ] sphinxcontrib-htmlhelp = [ - {file = "sphinxcontrib-htmlhelp-1.0.3.tar.gz", hash = "sha256:e8f5bb7e31b2dbb25b9cc435c8ab7a79787ebf7f906155729338f3156d93659b"}, - {file = "sphinxcontrib_htmlhelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:3c0bc24a2c41e340ac37c85ced6dafc879ab485c095b1d65d2461ac2f7cca86f"}, + {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, + {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, ] sphinxcontrib-jsmath = [ {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, @@ -1156,8 +1428,8 @@ tqdm = [ {file = "tqdm-4.61.1.tar.gz", hash = "sha256:24be966933e942be5f074c29755a95b315c69a91f839a29139bf26ffffe2d3fd"}, ] twine = [ - {file = "twine-1.15.0-py2.py3-none-any.whl", hash = "sha256:630fadd6e342e725930be6c696537e3f9ccc54331742b16245dab292a17d0460"}, - {file = "twine-1.15.0.tar.gz", hash = "sha256:a3d22aab467b4682a22de4a422632e79d07eebd07ff2a7079effb13f8a693787"}, + {file = "twine-3.4.1-py3-none-any.whl", hash = "sha256:16f706f2f1687d7ce30e7effceee40ed0a09b7c33b9abb5ef6434e5551565d83"}, + {file = "twine-3.4.1.tar.gz", hash = "sha256:a56c985264b991dc8a8f4234eb80c5af87fa8080d0c224ad8f2cd05a2c22e83b"}, ] typed-ast = [ {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6"}, @@ -1205,6 +1477,6 @@ webencodings = [ {file = "webencodings-0.5.1.tar.gz", hash = "sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923"}, ] zipp = [ - {file = "zipp-1.2.0-py2.py3-none-any.whl", hash = "sha256:e0d9e63797e483a30d27e09fffd308c59a700d365ec34e93cc100844168bf921"}, - {file = "zipp-1.2.0.tar.gz", hash = "sha256:c70410551488251b0fee67b460fb9a536af8d6f9f008ad10ac51f615b6a521b1"}, + {file = "zipp-3.4.1-py3-none-any.whl", hash = "sha256:51cb66cc54621609dd593d1787f286ee42a5c0adbb4b29abea5a63edc3e03098"}, + {file = "zipp-3.4.1.tar.gz", hash = "sha256:3607921face881ba3e026887d8150cca609d517579abe052ac81fc5aeffdbd76"}, ] diff --git a/pyproject.toml b/pyproject.toml index 3201fbc92..145d0fe88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ classifiers = [ keywords = ["tmux", "session manager", "terminal", "ncurses"] homepage = "http://github.com/tmux-python/libtmux/" -readme = "README.rst" +readme = "README.md" [tool.poetry.urls] "Bug Tracker" = "https://github.com/tmux-python/libtmux/issues" @@ -39,9 +39,10 @@ python = "^3.6" [tool.poetry.dev-dependencies] ### Docs ### sphinx = "*" -recommonmark = "^0.6.0" alagitpull = "~0.1.0" sphinx-issues = "^1.2.0" +sphinx-autodoc-typehints = "^1.12.0" +myst_parser = "^0.15.0" ### Testing ### pytest = "*" @@ -64,7 +65,7 @@ flake8 = "*" twine = "*" [tool.poetry.extras] -docs = ["sphinx", "recommonmark", "sphinx-issues", "alagitpull"] +docs = ["sphinx", "myst_parser", "sphinx-issues", "alagitpull", "sphinx-autodoc-typehints"] test = ["pytest", "pytest-rerunfailures", "pytest-mock"] coverage = ["codecov", "coverage", "pytest-cov"] format = ["black", "isort"] diff --git a/setup.py b/setup.py index 21d93ff38..d410ca1a2 100644 --- a/setup.py +++ b/setup.py @@ -18,9 +18,9 @@ tests_reqs = [line for line in f.read().split('\n') if line] if sys.version_info[0] > 2: - readme = open('README.rst', encoding='utf-8').read() + readme = open('README.md', encoding='utf-8').read() else: - readme = open('README.rst').read() + readme = open('README.md').read() history = open('CHANGES').read().replace('.. :changelog:', '')