Skip to content

Commit c771bfd

Browse files
committed
hamster wheel: avoid deprecated "encoding" msgpack param
"encoding" was deprecated in msgpack module. raw_as_bytes was added in 0.5.2 and is recommended going forward, but it's not clear to me if we have any reason to specify it. ref msgpack/msgpack-python@5534d0c#diff-88b99bb28683bd5b7e3a204826ead112R40
1 parent 8a6bfa2 commit c771bfd

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

README.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,23 @@ See the [Python Plugin API](http://pynvim.readthedocs.io/en/latest/usage/python-
5656

5757
#### Development
5858

59-
If you change the code, you need to run
60-
```sh
61-
pip2 install .
62-
pip3 install .
63-
```
64-
for the changes to have effect. For instructions of testing and troubleshooting,
65-
see the [development](http://pynvim.readthedocs.io/en/latest/development.html) documentation.
59+
Use (and activate) a local virtualenv.
60+
61+
python3 -m venv env36
62+
source env36/bin/activate
63+
64+
If you change the code, you must reinstall for the changes to take effect:
65+
66+
pip install .
67+
68+
Use `pytest` to run the tests. Invoking with `python -m` prepends the current
69+
directory to `sys.path` (otherwise `pytest` might find other versions!):
70+
71+
python -m pytest
72+
73+
For details about testing and troubleshooting, see the
74+
[development](http://pynvim.readthedocs.io/en/latest/development.html)
75+
documentation.
6676

6777
#### Usage through the python REPL
6878

docs/development.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ in order for Neovim to use it for the plugin host.
1919

2020
To run the tests execute::
2121

22-
pytest
22+
python -m pytest
23+
24+
This will run the tests in an embedded instance of Neovim, with the current
25+
directory added to ``sys.path``.
2326

24-
This will run the tests in an embedded instance of Neovim.
2527
If you want to test a different version than ``nvim`` in ``$PATH`` use::
2628

2729
NVIM_CHILD_ARGV='["/path/to/nvim", "-u", "NONE", "--embed"]' pytest
@@ -30,7 +32,7 @@ Alternatively, if you want to see the state of nvim, you could use::
3032

3133
export NVIM_LISTEN_ADDRESS=/tmp/nvimtest
3234
xterm -e "nvim -u NONE"&
33-
pytest
35+
python -m pytest
3436

3537
But note you need to restart Neovim every time you run the tests!
3638
Substitute your favorite terminal emulator for ``xterm``.

pynvim/msgpack_rpc/msgpack_stream.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ class MsgpackStream(object):
2020
def __init__(self, event_loop):
2121
"""Wrap `event_loop` on a msgpack-aware interface."""
2222
self.loop = event_loop
23-
self._packer = Packer(encoding='utf-8',
24-
unicode_errors=unicode_errors_default)
23+
self._packer = Packer(unicode_errors=unicode_errors_default)
2524
self._unpacker = Unpacker()
2625
self._message_cb = None
2726

0 commit comments

Comments
 (0)