Tab-completions crash ILua on Ubuntu 20.04. It makes no difference whether I install it via Pip or from sources. To minimize possible interactions with installed Pip-packages (or even apt-installed packages), I tried to install ILua into its own virtual environment.
rhaberkorn@thinkpad-x270:~/working-copies/ilua$ python3 -m venv env
rhaberkorn@thinkpad-x270:~/working-copies/ilua$ . env/bin/activate
(env) rhaberkorn@thinkpad-x270:~/working-copies/ilua$ python3 -m pip install -e .
Obtaining file:///home/rhaberkorn/working-copies/ilua
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting twisted
Using cached twisted-23.8.0-py3-none-any.whl (3.1 MB)
Collecting pygments
Using cached Pygments-2.16.1-py3-none-any.whl (1.2 MB)
Collecting termcolor
Using cached termcolor-2.3.0-py3-none-any.whl (6.9 kB)
Collecting txzmq
Using cached txZMQ-1.0.0-py3-none-any.whl (24 kB)
Collecting jupyter-console
Using cached jupyter_console-6.6.3-py3-none-any.whl (24 kB)
Collecting jupyter-core
Using cached jupyter_core-5.4.0-py3-none-any.whl (28 kB)
Collecting attrs>=21.3.0
Using cached attrs-23.1.0-py3-none-any.whl (61 kB)
Collecting automat>=0.8.0
Using cached Automat-22.10.0-py2.py3-none-any.whl (26 kB)
Collecting typing-extensions>=3.10.0
Using cached typing_extensions-4.8.0-py3-none-any.whl (31 kB)
Collecting zope-interface>=5
Using cached zope.interface-6.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (249 kB)
Collecting incremental>=22.10.0
Using cached incremental-22.10.0-py2.py3-none-any.whl (16 kB)
Collecting constantly>=15.1
Using cached constantly-15.1.0-py2.py3-none-any.whl (7.9 kB)
Collecting hyperlink>=17.1.1
Using cached hyperlink-21.0.0-py2.py3-none-any.whl (74 kB)
Collecting pyzmq>=13
Using cached pyzmq-25.1.1-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.1 MB)
Collecting prompt-toolkit>=3.0.30
Using cached prompt_toolkit-3.0.39-py3-none-any.whl (385 kB)
Collecting jupyter-client>=7.0.0
Using cached jupyter_client-8.4.0-py3-none-any.whl (103 kB)
Collecting traitlets>=5.4
Using cached traitlets-5.11.2-py3-none-any.whl (83 kB)
Collecting ipykernel>=6.14
Using cached ipykernel-6.25.2-py3-none-any.whl (154 kB)
Collecting ipython
Using cached ipython-8.12.3-py3-none-any.whl (798 kB)
Collecting platformdirs>=2.5
Using cached platformdirs-3.11.0-py3-none-any.whl (17 kB)
Collecting six
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Requirement already satisfied: setuptools in ./env/lib/python3.8/site-packages (from zope-interface>=5->twisted->ilua==0.2.2.dev18+g05eb181) (44.0.0)
Collecting idna>=2.5
Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting wcwidth
Using cached wcwidth-0.2.8-py2.py3-none-any.whl (31 kB)
Collecting python-dateutil>=2.8.2
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting tornado>=6.2
Using cached tornado-6.3.3-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (427 kB)
Collecting importlib-metadata>=4.8.3; python_version < "3.10"
Using cached importlib_metadata-6.8.0-py3-none-any.whl (22 kB)
Collecting debugpy>=1.6.5
Using cached debugpy-1.8.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB)
Collecting nest-asyncio
Using cached nest_asyncio-1.5.8-py3-none-any.whl (5.3 kB)
Collecting matplotlib-inline>=0.1
Using cached matplotlib_inline-0.1.6-py3-none-any.whl (9.4 kB)
Collecting psutil
Using cached psutil-5.9.6-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (283 kB)
Collecting comm>=0.1.1
Using cached comm-0.1.4-py3-none-any.whl (6.6 kB)
Collecting packaging
Using cached packaging-23.2-py3-none-any.whl (53 kB)
Collecting pexpect>4.3; sys_platform != "win32"
Using cached pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
Collecting stack-data
Using cached stack_data-0.6.3-py3-none-any.whl (24 kB)
Collecting jedi>=0.16
Using cached jedi-0.19.1-py2.py3-none-any.whl (1.6 MB)
Collecting pickleshare
Using cached pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting decorator
Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting backcall
Using cached backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting zipp>=0.5
Using cached zipp-3.17.0-py3-none-any.whl (7.4 kB)
Collecting ptyprocess>=0.5
Using cached ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Collecting asttokens>=2.1.0
Using cached asttokens-2.4.0-py2.py3-none-any.whl (27 kB)
Collecting pure-eval
Using cached pure_eval-0.2.2-py3-none-any.whl (11 kB)
Collecting executing>=1.2.0
Using cached executing-2.0.0-py2.py3-none-any.whl (24 kB)
Collecting parso<0.9.0,>=0.8.3
Using cached parso-0.8.3-py2.py3-none-any.whl (100 kB)
Installing collected packages: attrs, six, automat, typing-extensions, zope-interface, incremental, constantly, idna, hyperlink, twisted, pygments, termcolor, pyzmq, txzmq, wcwidth, prompt-toolkit, python-dateutil, traitlets, tornado, platformdirs, jupyter-core, zipp, importlib-metadata, jupyter-client, debugpy, nest-asyncio, matplotlib-inline, ptyprocess, pexpect, asttokens, pure-eval, executing, stack-data, parso, jedi, pickleshare, decorator, backcall, ipython, psutil, comm, packaging, ipykernel, jupyter-console, ilua
Running setup.py develop for ilua
Successfully installed asttokens-2.4.0 attrs-23.1.0 automat-22.10.0 backcall-0.2.0 comm-0.1.4 constantly-15.1.0 debugpy-1.8.0 decorator-5.1.1 executing-2.0.0 hyperlink-21.0.0 idna-3.4 ilua importlib-metadata-6.8.0 incremental-22.10.0 ipykernel-6.25.2 ipython-8.12.3 jedi-0.19.1 jupyter-client-8.4.0 jupyter-console-6.6.3 jupyter-core-5.4.0 matplotlib-inline-0.1.6 nest-asyncio-1.5.8 packaging-23.2 parso-0.8.3 pexpect-4.8.0 pickleshare-0.7.5 platformdirs-3.11.0 prompt-toolkit-3.0.39 psutil-5.9.6 ptyprocess-0.7.0 pure-eval-0.2.2 pygments-2.16.1 python-dateutil-2.8.2 pyzmq-25.1.1 six-1.16.0 stack-data-0.6.3 termcolor-2.3.0 tornado-6.3.3 traitlets-5.11.2 twisted-23.8.0 txzmq-1.0.0 typing-extensions-4.8.0 wcwidth-0.2.8 zipp-3.17.0 zope-interface
(env) rhaberkorn@thinkpad-x270:~/working-copies/ilua$ python3 setup.py install_data
WARNING: The wheel package is not available.
WARNING: The wheel package is not available.
WARNING: The wheel package is not available.
/home/rhaberkorn/working-copies/ilua/.eggs/setuptools_scm-8.0.4-py3.8.egg/setuptools_scm/_integration/setuptools.py:30: RuntimeWarning:
ERROR: setuptools==44.0.0 is used in combination with setuptools_scm>=8.x
Your build configuration is incomplete and previously worked by accident!
setuptools_scm requires setuptools>=61
Suggested workaround if applicable:
- migrating from the deprecated setup_requires mechanism to pep517/518
and using a pyproject.toml to declare build dependencies
which are reliably pre-installed before running the build tools
warnings.warn(
running install_data
creating /home/rhaberkorn/working-copies/ilua/env/share/jupyter/kernels/lua
copying defaultspec/logo-64x64.png -> /home/rhaberkorn/working-copies/ilua/env/share/jupyter/kernels/lua
copying defaultspec/logo-license.txt -> /home/rhaberkorn/working-copies/ilua/env/share/jupyter/kernels/lua
copying defaultspec/logo-32x32.png -> /home/rhaberkorn/working-copies/ilua/env/share/jupyter/kernels/lua
copying defaultspec/kernel.json -> /home/rhaberkorn/working-copies/ilua/env/share/jupyter/kernels/lua
(env) rhaberkorn@thinkpad-x270:~/working-copies/ilua$ ilua
Jupyter console 6.6.3
ILua 0.2.2.dev18+g05eb181
In [1]: print2023-10-22T01:27:26+0300 [ilua.kernel.ILuaKernel#critical] Uncought exception in message handler
Traceback (most recent call last):
File "/home/rhaberkorn/working-copies/ilua/env/lib/python3.8/site-packages/twisted/internet/defer.py", line 1997, in _inlineCallbacks
result = context.run(gen.send, result)
File "/home/rhaberkorn/working-copies/ilua/ilua/kernelbase.py", line 199, in handle_message
content = yield self.do_complete(**msg['content'])
File "/home/rhaberkorn/working-copies/ilua/env/lib/python3.8/site-packages/twisted/internet/defer.py", line 2245, in unwindGenerator
return _cancellableInlineCallbacks(gen)
File "/home/rhaberkorn/working-copies/ilua/env/lib/python3.8/site-packages/twisted/internet/defer.py", line 2157, in _cancellableInlineCallbacks
_inlineCallbacks(None, gen, status, _copy_context())
--- <exception caught here> ---
File "/home/rhaberkorn/working-copies/ilua/ilua/kernelbase.py", line 199, in handle_message
content = yield self.do_complete(**msg['content'])
File "/home/rhaberkorn/working-copies/ilua/env/lib/python3.8/site-packages/twisted/internet/defer.py", line 1997, in _inlineCallbacks
result = context.run(gen.send, result)
File "/home/rhaberkorn/working-copies/ilua/ilua/kernel.py", line 197, in do_complete
result = yield self.proto.sendRequest({
builtins.AttributeError: 'ILuaKernel' object has no attribute 'proto'
Unhandled exception in event loop:
File "/home/rhaberkorn/working-copies/ilua/env/lib/python3.8/site-packages/prompt_toolkit/buffer.py", line 1919, in new_coroutine
await coroutine(*a, **kw)
File "/home/rhaberkorn/working-copies/ilua/env/lib/python3.8/site-packages/prompt_toolkit/buffer.py", line 1743, in async_completer
async for completion in async_generator:
File "/home/rhaberkorn/working-copies/ilua/env/lib/python3.8/site-packages/prompt_toolkit/completion/base.py", line 323, in get_completions_async
async for completion in completer.get_completions_async(
File "/home/rhaberkorn/working-copies/ilua/env/lib/python3.8/site-packages/prompt_toolkit/completion/base.py", line 199, in get_completions_async
for item in self.get_completions(document, complete_event):
File "/home/rhaberkorn/working-copies/ilua/env/lib/python3.8/site-packages/jupyter_console/ptshell.py", line 150, in get_completions
content = self.jup_completer.complete_request(
File "/home/rhaberkorn/working-copies/ilua/env/lib/python3.8/site-packages/jupyter_console/completer.py", line 37, in complete_request
msg = run_sync(self.client.shell_channel.get_msg)(timeout=self.timeout)
File "/home/rhaberkorn/working-copies/ilua/env/lib/python3.8/site-packages/jupyter_client/channels.py", line 233, in get_msg
raise Empty
Exception
Press ENTER to continue...
In [1]:
Do you really want to exit ([y]/n)? y
Shutting down kernel
(env) rhaberkorn@thinkpad-x270:~/working-copies/ilua$ python3 --version
Python 3.8.10
The Python is quite old as you see, but Ubuntu 20.04 is still LTS. It also makes no difference which Lua interpreter I specify via -i
.