Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
Metadata-Version: 2.1
Name: pynvim
Version: 0.4.2
Summary: Python client to neovim
Version: 0.5.0
Summary: Python client for Neovim
Home-page: http://github.com/neovim/pynvim
Author: Thiago de Arruda
Author-email: [email protected]
Download-URL: https://github.com/neovim/pynvim/archive/0.5.0.tar.gz
Author: Neovim Authors
License: Apache
Download-URL: https://github.com/neovim/pynvim/archive/0.4.2.tar.gz
Description: UNKNOWN
Platform: UNKNOWN
Requires-Python: >=3.7
License-File: LICENSE
Requires-Dist: msgpack>=0.5.0
Requires-Dist: greenlet>=3.0
Provides-Extra: pyuv
Requires-Dist: pyuv>=1.0.0; extra == "pyuv"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
71 changes: 33 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Pynvim: Python client to [Neovim](https://github.com/neovim/neovim)
===================================================================

[![Build Status](https://travis-ci.org/neovim/pynvim.svg?branch=master)](https://travis-ci.org/neovim/pynvim)
[![Documentation Status](https://readthedocs.org/projects/pynvim/badge/?version=latest)](http://pynvim.readthedocs.io/en/latest/?badge=latest)
[![Documentation Status](https://readthedocs.org/projects/pynvim/badge/?version=latest)](https://readthedocs.org/projects/pynvim/builds/)
[![Code coverage](https://codecov.io/gh/neovim/pynvim/branch/master/graph/badge.svg)](https://codecov.io/gh/neovim/pynvim)

Pynvim implements support for python plugins in Nvim. It also works as a library for
Expand All @@ -11,40 +10,30 @@ connecting to and scripting Nvim processes through its msgpack-rpc API.
Install
-------

Supports python 2.7, and 3.4 or later.
Supports python 3.7 or later.

```sh
pip2 install pynvim
pip3 install pynvim
```

If you only use one of python2 or python3, it is enough to install that
version. You can install the package without being root by adding the `--user`
flag.
pip3 install pynvim

You can install the package without being root by adding the `--user` flag.
Anytime you upgrade Neovim, make sure to upgrade pynvim as well:
```sh
pip2 install --upgrade pynvim
pip3 install --upgrade pynvim
```

Alternatively, the master version could be installed by executing the following
in the root of this repository:
```sh
pip2 install .
pip3 install .
```
pip3 install --upgrade pynvim

Alternatively, you can install the development version by cloning this
repository and executing the following at the top level:

pip3 install .

Python Plugin API
-----------------

Pynvim supports python _remote plugins_ (via the language-agnostic Nvim rplugin
interface), as well as _Vim plugins_ (via the `:python[3]` interface). Thus when
pynvim is installed Neovim will report support for the `+python[3]` Vim feature.
interface), as well as _Vim plugins_ (via the `:python3` interface). Thus when
pynvim is installed Neovim will report support for the `+python3` Vim feature.

The rplugin interface allows plugins to handle vimL function calls as well as
defining commands and autocommands, and such plugins can operate asynchronously
without blocking nvim. For details on the new rplugin interface,
without blocking nvim. For details on the new rplugin interface,
see the [Remote Plugin](http://pynvim.readthedocs.io/en/latest/usage/remote-plugins.html) documentation.

Pynvim defines some extensions over the vim python API:
Expand All @@ -59,10 +48,10 @@ See the [Python Plugin API](http://pynvim.readthedocs.io/en/latest/usage/python-
Development
-----------

Use (and activate) a local virtualenv.
Use (and activate) a local virtualenv, for example:

python3 -m venv env36
source env36/bin/activate
python3 -m virtualenv venv
source venv/bin/activate

If you change the code, you must reinstall for the changes to take effect:

Expand All @@ -81,7 +70,7 @@ documentation.

A number of different transports are supported, but the simplest way to get
started is with the python REPL. First, start Nvim with a known address (or use
the `$NVIM_LISTEN_ADDRESS` of a running instance):
the `$NVIM_LISTEN_ADDRESS` of a running instance):

```sh
$ NVIM_LISTEN_ADDRESS=/tmp/nvim nvim
Expand All @@ -92,10 +81,10 @@ to the one exposed by the [python-vim
bridge](http://vimdoc.sourceforge.net/htmldoc/if_pyth.html#python-vim)):

```python
>>> from pynvim import attach
>>> import pynvim
# Create a python API session attached to unix domain socket created above:
>>> nvim = attach('socket', path='/tmp/nvim')
# Now do some work.
>>> nvim = pynvim.attach('socket', path='/tmp/nvim')
# Now do some work.
>>> buffer = nvim.current.buffer # Get the current buffer
>>> buffer[0] = 'replace first line'
>>> buffer[:] = ['replace whole buffer']
Expand All @@ -110,27 +99,33 @@ You can embed Neovim into your python application instead of connecting to
a running Neovim instance.

```python
>>> from pynvim import attach
>>> nvim = attach('child', argv=["/bin/env", "nvim", "--embed", "--headless"])
>>> import pynvim
>>> nvim = pynvim.attach('child', argv=["/usr/bin/env", "nvim", "--embed", "--headless"])
```

- The ` --headless` argument tells `nvim` not to wait for a UI to connect.
- The `--headless` argument tells `nvim` not to wait for a UI to connect.
- Alternatively, use `--embed` _without_ `--headless` if your client is a UI
and you want `nvim` to wait for your client to `nvim_ui_attach` before
continuing startup.

See the tests for more examples.
See the [tests](https://github.com/neovim/pynvim/tree/master/test) for more examples.

Release
-------

1. Create a release commit with title `Pynvim x.y.z`
- list significant changes in the commit message
- bump the version in `pynvim/util.py` and `setup.py` (3 places in total)
- bump the version in `pynvim/_version.py`
2. Make a release on GitHub with the same commit/version tag and copy the message.
3. Run `scripts/disable_log_statements.sh`
4. Run `python setup.py sdist`
4. Run `python -m build`
- diff the release tarball `dist/pynvim-x.y.z.tar.gz` against the previous one.
5. Run `twine upload -r pypi dist/pynvim-x.y.z.tar.gz`
5. Run `twine upload -r pypi dist/*`
- Assumes you have a pypi account with permissions.
6. Run `scripts/enable_log_statements.sh` or `git reset --hard` to restore the working dir.
7. Bump up to the next development version in `pynvim/_version.py`, with `prerelease` suffix `dev0`.

License
-------

[Apache License 2.0](https://github.com/neovim/pynvim/blob/master/LICENSE)
16 changes: 16 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
python-pynvim (0.5.0-1) unstable; urgency=medium

[ Debian Janitor ]
* Update standards version to 4.6.2, no changes needed.

[ James McCoy ]
* Remove obsolete transitional package and Breaks/Replaces for
python3-neovim (Closes: #1038308)
* Remove obsolete Breaks on neovim < 0.2.1
* Remove mention of non-existent python2 package in long description
* New upstream release
+ Python 3.12 support (Closes: #1056498)
* Add pybuild-plugin-pyproject to Build-Depends

-- James McCoy <[email protected]> Wed, 06 Dec 2023 11:03:30 -0500

python-pynvim (0.4.2-2) unstable; urgency=medium

* Bump debhelper from old 12 to 13.
Expand Down
17 changes: 2 additions & 15 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Rules-Requires-Root: no
Build-Depends:
debhelper-compat (= 13),
dh-python,
pybuild-plugin-pyproject,
python3-all,
python3-setuptools,
# dependencies for python3:
Expand All @@ -19,20 +20,11 @@ Build-Depends:
python3-pytest (>= 3.4.0),
# dependencies for setup:
python3-pytest-runner,
Standards-Version: 4.5.1
Standards-Version: 4.6.2
Homepage: https://github.com/neovim/python-client
Vcs-Git: https://salsa.debian.org/python-team/packages/python-pynvim.git
Vcs-Browser: https://salsa.debian.org/python-team/packages/python-pynvim

Package: python3-neovim
Architecture: all
Depends:
python3-pynvim,
${misc:Depends}
Section: oldlibs
Description: transitional dummy package
This is a transitional dummy package. It can safely be removed.

Package: python3-pynvim
Architecture: all
Depends:
Expand All @@ -42,12 +34,7 @@ Provides:
python3-neovim (= ${source:Version}),
${python3:Provides},
vim-python3,
Breaks: neovim (<< 0.2.1), python3-neovim (<< 0.4.0~)
Replaces: python3-neovim (<< 0.4.0~)
Recommends: neovim
Description: Python3 library for scripting Neovim processes through its msgpack-rpc API
Neovim is a Vim fork that focuses on refactoring, extensibility and
simplification of the original code base.
.
This is the Python3 version of the package (If you only use one of python2 or
python3, it is enough to install that version.)
17 changes: 10 additions & 7 deletions pynvim.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
Metadata-Version: 2.1
Name: pynvim
Version: 0.4.2
Summary: Python client to neovim
Version: 0.5.0
Summary: Python client for Neovim
Home-page: http://github.com/neovim/pynvim
Author: Thiago de Arruda
Author-email: [email protected]
Download-URL: https://github.com/neovim/pynvim/archive/0.5.0.tar.gz
Author: Neovim Authors
License: Apache
Download-URL: https://github.com/neovim/pynvim/archive/0.4.2.tar.gz
Description: UNKNOWN
Platform: UNKNOWN
Requires-Python: >=3.7
License-File: LICENSE
Requires-Dist: msgpack>=0.5.0
Requires-Dist: greenlet>=3.0
Provides-Extra: pyuv
Requires-Dist: pyuv>=1.0.0; extra == "pyuv"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
10 changes: 8 additions & 2 deletions pynvim.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
LICENSE
MANIFEST.in
README.md
pyproject.toml
setup.cfg
setup.py
neovim/__init__.py
neovim/api/__init__.py
pynvim/__init__.py
pynvim/_version.py
pynvim/compat.py
pynvim/util.py
pynvim.egg-info/PKG-INFO
pynvim.egg-info/SOURCES.txt
pynvim.egg-info/dependency_links.txt
pynvim.egg-info/not-zip-safe
pynvim.egg-info/requires.txt
pynvim.egg-info/top_level.txt
pynvim/api/__init__.py
Expand All @@ -32,6 +33,7 @@ pynvim/plugin/__init__.py
pynvim/plugin/decorators.py
pynvim/plugin/host.py
pynvim/plugin/script_host.py
test/__init__.py
test/conftest.py
test/test_buffer.py
test/test_client_rpc.py
Expand All @@ -41,5 +43,9 @@ test/test_events.py
test/test_host.py
test/test_logging.py
test/test_tabpage.py
test/test_version.py
test/test_vim.py
test/test_window.py
test/test_window.py
test/fixtures/module_plugin/rplugin/python3/mymodule/__init__.py
test/fixtures/module_plugin/rplugin/python3/mymodule/plugin.py
test/fixtures/simple_plugin/rplugin/python3/simple_nvim.py
1 change: 0 additions & 1 deletion pynvim.egg-info/not-zip-safe

This file was deleted.

4 changes: 2 additions & 2 deletions pynvim.egg-info/requires.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
greenlet
msgpack>=0.5.0
greenlet>=3.0

[pyuv]
pyuv>=1.0.0

[test]
pytest>=3.4.0
pytest
Loading
Loading