[Python-modules-commits] [python-neovim] 03/04: Import python-neovim_0.1.12.orig.tar.gz

Víctor Cuadrado Juan viccuad-guest at moszumanska.debian.org
Fri Dec 9 22:06:40 UTC 2016


This is an automated email from the git hooks/post-receive script.

viccuad-guest pushed a commit to branch master
in repository python-neovim.

commit 85b9da87f439dff6d4da0ba6f16641fe56048995
Author: Víctor Cuadrado Juan <me at viccuad.me>
Date:   Thu Dec 8 20:15:27 2016 +0100

    Import python-neovim_0.1.12.orig.tar.gz
---
 PKG-INFO                 |  4 ++--
 neovim.egg-info/PKG-INFO |  4 ++--
 neovim/__init__.py       |  2 +-
 neovim/api/buffer.py     |  2 +-
 neovim/api/common.py     |  3 +++
 setup.py                 |  4 ++--
 test/test_window.py      | 14 ++++++++++++++
 7 files changed, 25 insertions(+), 8 deletions(-)

diff --git a/PKG-INFO b/PKG-INFO
index cd97ef9..a868801 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,11 +1,11 @@
 Metadata-Version: 1.1
 Name: neovim
-Version: 0.1.11
+Version: 0.1.12
 Summary: Python client to neovim
 Home-page: http://github.com/neovim/python-client
 Author: Thiago de Arruda
 Author-email: tpadilha84 at gmail.com
 License: Apache
-Download-URL: https://github.com/neovim/python-client/archive/0.1.10.tar.gz
+Download-URL: https://github.com/neovim/python-client/archive/0.1.12.tar.gz
 Description: UNKNOWN
 Platform: UNKNOWN
diff --git a/neovim.egg-info/PKG-INFO b/neovim.egg-info/PKG-INFO
index cd97ef9..a868801 100644
--- a/neovim.egg-info/PKG-INFO
+++ b/neovim.egg-info/PKG-INFO
@@ -1,11 +1,11 @@
 Metadata-Version: 1.1
 Name: neovim
-Version: 0.1.11
+Version: 0.1.12
 Summary: Python client to neovim
 Home-page: http://github.com/neovim/python-client
 Author: Thiago de Arruda
 Author-email: tpadilha84 at gmail.com
 License: Apache
-Download-URL: https://github.com/neovim/python-client/archive/0.1.10.tar.gz
+Download-URL: https://github.com/neovim/python-client/archive/0.1.12.tar.gz
 Description: UNKNOWN
 Platform: UNKNOWN
diff --git a/neovim/__init__.py b/neovim/__init__.py
index 35e5353..4e49af1 100644
--- a/neovim/__init__.py
+++ b/neovim/__init__.py
@@ -21,7 +21,7 @@ __all__ = ('tcp_session', 'socket_session', 'stdio_session', 'child_session',
            'shutdown_hook', 'attach', 'setup_logging', 'ErrorResponse')
 
 
-VERSION = Version(major=0, minor=1, patch=11, prerelease="dev")
+VERSION = Version(major=0, minor=1, patch=12, prerelease="")
 
 
 def start_host(session=None):
diff --git a/neovim/api/buffer.py b/neovim/api/buffer.py
index 4d71263..b368b4f 100644
--- a/neovim/api/buffer.py
+++ b/neovim/api/buffer.py
@@ -128,7 +128,7 @@ class Buffer(Remote):
     @property
     def number(self):
         """Get the buffer number."""
-        return self.request('nvim_buf_get_number')
+        return self.handle
 
 
 class Range(object):
diff --git a/neovim/api/common.py b/neovim/api/common.py
index bc6523e..6a4aabe 100644
--- a/neovim/api/common.py
+++ b/neovim/api/common.py
@@ -1,6 +1,8 @@
 """Code shared between the API classes."""
 import functools
 
+from msgpack import unpackb
+
 from ..compat import unicode_errors_default
 
 
@@ -21,6 +23,7 @@ class Remote(object):
         """
         self._session = session
         self.code_data = code_data
+        self.handle = unpackb(code_data[1])
         self.api = RemoteApi(self, self._api_prefix)
         self.vars = RemoteMap(self, self._api_prefix + 'get_var',
                               self._api_prefix + 'set_var')
diff --git a/setup.py b/setup.py
index 36ecedb..9d8b87f 100644
--- a/setup.py
+++ b/setup.py
@@ -19,10 +19,10 @@ if platform.python_implementation() != 'PyPy':
     install_requires.append('greenlet')
 
 setup(name='neovim',
-      version='0.1.11',
+      version='0.1.12',
       description='Python client to neovim',
       url='http://github.com/neovim/python-client',
-      download_url='https://github.com/neovim/python-client/archive/0.1.10.tar.gz',
+      download_url='https://github.com/neovim/python-client/archive/0.1.12.tar.gz',
       author='Thiago de Arruda',
       author_email='tpadilha84 at gmail.com',
       license='Apache',
diff --git a/test/test_window.py b/test/test_window.py
index d2cd955..23e2b3d 100644
--- a/test/test_window.py
+++ b/test/test_window.py
@@ -103,3 +103,17 @@ def test_number():
     eq(vim.current.window.number, curnum + 1)
     vim.command('bot split')
     eq(vim.current.window.number, curnum + 2)
+
+
+ at with_setup(setup=cleanup)
+def test_handle():
+    hnd1 = vim.current.window.handle
+    vim.command('bot split')
+    hnd2 = vim.current.window.handle
+    ok(hnd2 != hnd1)
+    vim.command('bot split')
+    hnd3 = vim.current.window.handle
+    ok(hnd3 != hnd1)
+    ok(hnd3 != hnd2)
+    vim.command('wincmd w')
+    eq(vim.current.window.handle,hnd1)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-neovim.git



More information about the Python-modules-commits mailing list