Akuli / porcupine

A decent editor written in tkinter
MIT License
143 stars 46 forks source link

Don't use "porcupine-venv" venv #1493

Closed ethical-haquer closed 3 months ago

ethical-haquer commented 3 months ago

Fixes #1456.

ethical-haquer commented 3 months ago

Thanks! A couple small things.

Thanks for the feedback!

ethical-haquer commented 3 months ago

That's weird, it looks like the Windows Python 3.11 "test" (what does it do, and what is it actually called?) failed due to a NotImplementedError. I've actually been getting the same error on Linux using Python 3.11.2:

(env) ethical_haquer@liberated-macbook:~/GitHub/porcupine$ python3 -m porcupine
log file: /home/ethical_haquer/.cache/porcupine/log/2024-04-01T11-01-46.txt
not using venv: '/home/ethical_haquer/porcupine-venv', as it contains 'porcupine-venv'
porcupine.plugins.langserver ERROR: (PID=158434) error while handling langserver event
Traceback (most recent call last):
  File "/home/ethical_haquer/GitHub/porcupine/porcupine/plugins/langserver.py", line 358, in _run_stuff_once
    self._handle_lsp_event(lsp_event)
  File "/home/ethical_haquer/GitHub/porcupine/porcupine/plugins/langserver.py", line 549, in _handle_lsp_event
    raise NotImplementedError(repr(lsp_event))
NotImplementedError: ResponseError(message_id=2, code=-32602, message='NotImplementedError: Python version 3.11 is currently not supported.', data={'traceback': ['  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pyls_jsonrpc/endpoint.py", line 113, in consume\n    self._handle_request(message[\'id\'], message[\'method\'], message.get(\'params\'))\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pyls_jsonrpc/endpoint.py", line 182, in _handle_request\n    handler_result = handler(params)\n                     ^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pyls_jsonrpc/dispatchers.py", line 23, in handler\n    return method(**(params or {}))\n           ^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pyls/python_ls.py", line 331, in m_text_document__hover\n    return self.hover(textDocument[\'uri\'], position)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pyls/python_ls.py", line 265, in hover\n    return self._hook(\'pyls_hover\', doc_uri, position=position) or {\'contents\': \'\'}\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pyls/python_ls.py", line 156, in _hook\n    return hook_handlers(config=self.config, workspace=workspace, document=doc, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pluggy/_hooks.py", line 501, in __call__\n    return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pluggy/_manager.py", line 119, in _hookexec\n    return self._inner_hookexec(hook_name, methods, kwargs, firstresult)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pluggy/_manager.py", line 473, in traced_hookexec\n    return outcome.get_result()\n           ^^^^^^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pluggy/_result.py", line 99, in get_result\n    raise exc.with_traceback(exc.__traceback__)\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pluggy/_result.py", line 61, in from_call\n    result = func()\n             ^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pluggy/_manager.py", line 470, in <lambda>\n    lambda: oldcall(hook_name, hook_impls, caller_kwargs, firstresult)\n            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pluggy/_callers.py", line 138, in _multicall\n    raise exception.with_traceback(exception.__traceback__)\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pluggy/_callers.py", line 102, in _multicall\n    res = hook_impl.function(*args)\n          ^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pyls/plugins/hover.py", line 13, in pyls_hover\n    definitions = document.jedi_script().infer(**code_position)\n                  ^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pyls/workspace.py", line 25, in wrapper\n    return method(self, *args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/pyls/workspace.py", line 279, in jedi_script\n    return jedi.Script(**kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/jedi/api/__init__.py", line 184, in __init__\n    self._inference_state = InferenceState(\n                            ^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/jedi/inference/__init__.py", line 91, in __init__\n    self.grammar = environment.get_grammar()\n                   ^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/jedi/cache.py", line 111, in wrapper\n    result = method(self, *args, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/jedi/api/environment.py", line 37, in get_grammar\n    return parso.load_grammar(version=version_string)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/parso/grammar.py", line 260, in load_grammar\n    return load_grammar(**kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^\n', '  File "/home/ethical_haquer/GitHub/porcupine/env/lib/python3.11/site-packages/parso/grammar.py", line 256, in load_grammar\n    raise NotImplementedError(message)\n']})

Is this the important part? NotImplementedError: Python version 3.11 is currently not supported.

And only the Windows 3.11 test failed, not the Linux or Darwin one?

I just found #1300, is that still relevant?

Akuli commented 3 months ago

Yes, that problem is #1300. I have xfailed (that is, "expected to fail") most relevant test, but it still causes random test failures. I will rerun the failed test and see what happens.