aboutsummaryrefslogtreecommitdiff
path: root/runtime/autoload/provider/script_host.py
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2015-07-16 21:03:27 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2015-07-18 22:39:28 +0200
commitc7bfbd4fd9ca533795cd9e58d479d6035e5cddb6 (patch)
treee713a4406fc57c3453d3dbb94a6cf826b86ca79f /runtime/autoload/provider/script_host.py
parent1d4f68a2f5f9536791fb271f9d29287da5875748 (diff)
downloadrneovim-c7bfbd4fd9ca533795cd9e58d479d6035e5cddb6.tar.gz
rneovim-c7bfbd4fd9ca533795cd9e58d479d6035e5cddb6.tar.bz2
rneovim-c7bfbd4fd9ca533795cd9e58d479d6035e5cddb6.zip
python3: remove decoding logic, as this is now done in plugin host #3026
DecodeHook isn't needed since neovim/python-client#53 rpc methods won't pass bytes anymore, ref neovim/python-client#129
Diffstat (limited to 'runtime/autoload/provider/script_host.py')
-rw-r--r--runtime/autoload/provider/script_host.py8
1 files changed, 0 insertions, 8 deletions
diff --git a/runtime/autoload/provider/script_host.py b/runtime/autoload/provider/script_host.py
index e0b9ee6012..0a7eb53a0e 100644
--- a/runtime/autoload/provider/script_host.py
+++ b/runtime/autoload/provider/script_host.py
@@ -32,10 +32,6 @@ class ScriptHost(object):
# it seems some plugins assume 'sys' is already imported, so do it now
exec('import sys', self.module.__dict__)
self.legacy_vim = nvim.with_hook(LegacyEvalHook())
- if IS_PYTHON3:
- self.legacy_vim = self.legacy_vim.with_hook(
- neovim.DecodeHook(
- encoding=nvim.options['encoding']))
sys.modules['vim'] = self.legacy_vim
def setup(self, nvim):
@@ -93,10 +89,6 @@ class ScriptHost(object):
stop -= 1
fname = '_vim_pydo'
- # Python3 code (exec) must be a string, mixing bytes with
- # function_def would use bytes.__repr__ instead
- if isinstance and isinstance(code, bytes):
- code = code.decode(nvim.options['encoding'])
# define the function
function_def = 'def %s(line, linenr):\n %s' % (fname, code,)
exec(function_def, self.module.__dict__)