Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does 1.128 beta support Python 3.13 on Linux? #5722

Closed
Alexey-T opened this issue Oct 8, 2024 · 29 comments
Closed

Does 1.128 beta support Python 3.13 on Linux? #5722

Alexey-T opened this issue Oct 8, 2024 · 29 comments

Comments

@Alexey-T
Copy link
Owner

Alexey-T commented Oct 8, 2024

beta files:
https://github.com/Alexey-T/CudaText/discussions/5720

Pls check somebody the support of Py 3.13 (which is released this week). I don't know how to test it with Ubuntu which has 3.10. maybe ArchLinux is good to have here.

@bogen85
Copy link
Contributor

bogen85 commented Oct 10, 2024

I will try to test Py 3.13 support in fedora 41 (as it is available there, it is the default) later this week.

@Alexey-T
Copy link
Owner Author

Alexey-T commented Oct 10, 2024

It should work. I tested it on mate's pc under win10. But next year we will have 3.14 and its not supported yet, its api has hard changes.

@Alexey-T
Copy link
Owner Author

does it work?

@bogen85
Copy link
Contributor

bogen85 commented Oct 15, 2024

Been so busy with work that I've not gotten back to this. So I've not tried yet.

@bogen85
Copy link
Contributor

bogen85 commented Oct 15, 2024

Without cuda LSP

Python 3.13.0
Init: cuda_project_man
Loading project: ~/.config/cudatext/settings/temporary.cuda-proj
Init: cuda_modeline
Loaded session: "history session.json", 30ms, 8 file(s) + 1 modified
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Startup: 280ms, plugins: 50ms (project_man 40ms, modeline 6ms)
Saved session: "history session.json", 8 file(s) + 1 untitled, by timer at 23:15:56

@bogen85
Copy link
Contributor

bogen85 commented Oct 15, 2024

But then after reinstalling cuda LSP

Python 3.13.0
Init: cuda_project_man
Loading project: ~/.config/cudatext/settings/temporary.cuda-proj
Init: cuda_lsp
Traceback (most recent call last):
  File "/home/dwight/.config/cudatext/py/cuda_lsp/__init__.py", line 1, in <module>
    from .lsp import Command
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp.py", line 36, in <module>
    from .language import CompletionMan, DiagnosticsMan, Language
  File "/home/dwight/.config/cudatext/py/cuda_lsp/language.py", line 54, in <module>
    from .sansio_lsp_client import client as lsp
  File "/home/dwight/.config/cudatext/py/cuda_lsp/sansio_lsp_client/__init__.py", line 3, in <module>
    from .client import *
  File "/home/dwight/.config/cudatext/py/cuda_lsp/sansio_lsp_client/client.py", line 6, in <module>
    from pydantic import parse_obj_as, ValidationError
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/__init__.py", line 7, in <module>
    from pydantic.env_settings import BaseSettings
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/env_settings.py", line 23, in <module>
    class BaseSettings(BaseModel):
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/main.py", line 178, in __new__
    annotations = resolve_annotations(namespace.get('__annotations__', {}), namespace.get('__module__', None))
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/typing.py", line 403, in resolve_annotations
    value = _eval_type(value, base_globals, None, type_params=())
TypeError: _eval_type() got an unexpected keyword argument 'type_params'
ERROR: Exception in CudaText for cuda_lsp.on_open: TypeError: _eval_type() got an unexpected keyword argument 'type_params'
Init: cuda_modeline
Init: cuda_lsp
Traceback (most recent call last):
  File "/home/dwight/.config/cudatext/py/cuda_lsp/__init__.py", line 1, in <module>
    from .lsp import Command
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp.py", line 36, in <module>
    from .language import CompletionMan, DiagnosticsMan, Language
  File "/home/dwight/.config/cudatext/py/cuda_lsp/language.py", line 54, in <module>
    from .sansio_lsp_client import client as lsp
  File "/home/dwight/.config/cudatext/py/cuda_lsp/sansio_lsp_client/__init__.py", line 3, in <module>
    from .client import *
  File "/home/dwight/.config/cudatext/py/cuda_lsp/sansio_lsp_client/client.py", line 6, in <module>
    from pydantic import parse_obj_as, ValidationError
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/__init__.py", line 7, in <module>
    from pydantic.env_settings import BaseSettings
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/env_settings.py", line 23, in <module>
    class BaseSettings(BaseModel):
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/main.py", line 178, in __new__
    annotations = resolve_annotations(namespace.get('__annotations__', {}), namespace.get('__module__', None))
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/typing.py", line 403, in resolve_annotations
    value = _eval_type(value, base_globals, None, type_params=())
TypeError: _eval_type() got an unexpected keyword argument 'type_params'
ERROR: Exception in CudaText for cuda_lsp.on_open: TypeError: _eval_type() got an unexpected keyword argument 'type_params'
Init: cuda_lsp
Traceback (most recent call last):
  File "/home/dwight/.config/cudatext/py/cuda_lsp/__init__.py", line 1, in <module>
    from .lsp import Command
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp.py", line 36, in <module>
    from .language import CompletionMan, DiagnosticsMan, Language
  File "/home/dwight/.config/cudatext/py/cuda_lsp/language.py", line 54, in <module>
    from .sansio_lsp_client import client as lsp
  File "/home/dwight/.config/cudatext/py/cuda_lsp/sansio_lsp_client/__init__.py", line 3, in <module>
    from .client import *
  File "/home/dwight/.config/cudatext/py/cuda_lsp/sansio_lsp_client/client.py", line 6, in <module>
    from pydantic import parse_obj_as, ValidationError
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/__init__.py", line 7, in <module>
    from pydantic.env_settings import BaseSettings
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/env_settings.py", line 23, in <module>
    class BaseSettings(BaseModel):
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/main.py", line 178, in __new__
    annotations = resolve_annotations(namespace.get('__annotations__', {}), namespace.get('__module__', None))
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/typing.py", line 403, in resolve_annotations
    value = _eval_type(value, base_globals, None, type_params=())
TypeError: _eval_type() got an unexpected keyword argument 'type_params'
ERROR: Exception in CudaText for cuda_lsp.on_open: TypeError: _eval_type() got an unexpected keyword argument 'type_params'
Init: cuda_lsp
Traceback (most recent call last):
  File "/home/dwight/.config/cudatext/py/cuda_lsp/__init__.py", line 1, in <module>
    from .lsp import Command
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp.py", line 36, in <module>
    from .language import CompletionMan, DiagnosticsMan, Language
  File "/home/dwight/.config/cudatext/py/cuda_lsp/language.py", line 54, in <module>
    from .sansio_lsp_client import client as lsp
  File "/home/dwight/.config/cudatext/py/cuda_lsp/sansio_lsp_client/__init__.py", line 3, in <module>
    from .client import *
  File "/home/dwight/.config/cudatext/py/cuda_lsp/sansio_lsp_client/client.py", line 6, in <module>
    from pydantic import parse_obj_as, ValidationError
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/__init__.py", line 7, in <module>
    from pydantic.env_settings import BaseSettings
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/env_settings.py", line 23, in <module>
    class BaseSettings(BaseModel):
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/main.py", line 178, in __new__
    annotations = resolve_annotations(namespace.get('__annotations__', {}), namespace.get('__module__', None))
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/typing.py", line 403, in resolve_annotations
    value = _eval_type(value, base_globals, None, type_params=())
TypeError: _eval_type() got an unexpected keyword argument 'type_params'
ERROR: Exception in CudaText for cuda_lsp.on_open: TypeError: _eval_type() got an unexpected keyword argument 'type_params'
Init: cuda_lsp
Traceback (most recent call last):
  File "/home/dwight/.config/cudatext/py/cuda_lsp/__init__.py", line 1, in <module>
    from .lsp import Command
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp.py", line 36, in <module>
    from .language import CompletionMan, DiagnosticsMan, Language
  File "/home/dwight/.config/cudatext/py/cuda_lsp/language.py", line 54, in <module>
    from .sansio_lsp_client import client as lsp
  File "/home/dwight/.config/cudatext/py/cuda_lsp/sansio_lsp_client/__init__.py", line 3, in <module>
    from .client import *
  File "/home/dwight/.config/cudatext/py/cuda_lsp/sansio_lsp_client/client.py", line 6, in <module>
    from pydantic import parse_obj_as, ValidationError
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/__init__.py", line 7, in <module>
    from pydantic.env_settings import BaseSettings
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/env_settings.py", line 23, in <module>
    class BaseSettings(BaseModel):
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/main.py", line 178, in __new__
    annotations = resolve_annotations(namespace.get('__annotations__', {}), namespace.get('__module__', None))
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/typing.py", line 403, in resolve_annotations
    value = _eval_type(value, base_globals, None, type_params=())
TypeError: _eval_type() got an unexpected keyword argument 'type_params'
ERROR: Exception in CudaText for cuda_lsp.on_open: TypeError: _eval_type() got an unexpected keyword argument 'type_params'
Init: cuda_lsp
Traceback (most recent call last):
  File "/home/dwight/.config/cudatext/py/cuda_lsp/__init__.py", line 1, in <module>
    from .lsp import Command
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp.py", line 36, in <module>
    from .language import CompletionMan, DiagnosticsMan, Language
  File "/home/dwight/.config/cudatext/py/cuda_lsp/language.py", line 54, in <module>
    from .sansio_lsp_client import client as lsp
  File "/home/dwight/.config/cudatext/py/cuda_lsp/sansio_lsp_client/__init__.py", line 3, in <module>
    from .client import *
  File "/home/dwight/.config/cudatext/py/cuda_lsp/sansio_lsp_client/client.py", line 6, in <module>
    from pydantic import parse_obj_as, ValidationError
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/__init__.py", line 7, in <module>
    from pydantic.env_settings import BaseSettings
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/env_settings.py", line 23, in <module>
    class BaseSettings(BaseModel):
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/main.py", line 178, in __new__
    annotations = resolve_annotations(namespace.get('__annotations__', {}), namespace.get('__module__', None))
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/typing.py", line 403, in resolve_annotations
    value = _eval_type(value, base_globals, None, type_params=())
TypeError: _eval_type() got an unexpected keyword argument 'type_params'
ERROR: Exception in CudaText for cuda_lsp.on_open: TypeError: _eval_type() got an unexpected keyword argument 'type_params'
Init: cuda_lsp
Traceback (most recent call last):
  File "/home/dwight/.config/cudatext/py/cuda_lsp/__init__.py", line 1, in <module>
    from .lsp import Command
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp.py", line 36, in <module>
    from .language import CompletionMan, DiagnosticsMan, Language
  File "/home/dwight/.config/cudatext/py/cuda_lsp/language.py", line 54, in <module>
    from .sansio_lsp_client import client as lsp
  File "/home/dwight/.config/cudatext/py/cuda_lsp/sansio_lsp_client/__init__.py", line 3, in <module>
    from .client import *
  File "/home/dwight/.config/cudatext/py/cuda_lsp/sansio_lsp_client/client.py", line 6, in <module>
    from pydantic import parse_obj_as, ValidationError
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/__init__.py", line 7, in <module>
    from pydantic.env_settings import BaseSettings
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/env_settings.py", line 23, in <module>
    class BaseSettings(BaseModel):
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/main.py", line 178, in __new__
    annotations = resolve_annotations(namespace.get('__annotations__', {}), namespace.get('__module__', None))
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/typing.py", line 403, in resolve_annotations
    value = _eval_type(value, base_globals, None, type_params=())
TypeError: _eval_type() got an unexpected keyword argument 'type_params'
ERROR: Exception in CudaText for cuda_lsp.on_open: TypeError: _eval_type() got an unexpected keyword argument 'type_params'
Init: cuda_lsp
Traceback (most recent call last):
  File "/home/dwight/.config/cudatext/py/cuda_lsp/__init__.py", line 1, in <module>
    from .lsp import Command
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp.py", line 36, in <module>
    from .language import CompletionMan, DiagnosticsMan, Language
  File "/home/dwight/.config/cudatext/py/cuda_lsp/language.py", line 54, in <module>
    from .sansio_lsp_client import client as lsp
  File "/home/dwight/.config/cudatext/py/cuda_lsp/sansio_lsp_client/__init__.py", line 3, in <module>
    from .client import *
  File "/home/dwight/.config/cudatext/py/cuda_lsp/sansio_lsp_client/client.py", line 6, in <module>
    from pydantic import parse_obj_as, ValidationError
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/__init__.py", line 7, in <module>
    from pydantic.env_settings import BaseSettings
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/env_settings.py", line 23, in <module>
    class BaseSettings(BaseModel):
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/main.py", line 178, in __new__
    annotations = resolve_annotations(namespace.get('__annotations__', {}), namespace.get('__module__', None))
  File "/home/dwight/.config/cudatext/py/cuda_lsp/lsp_modules/pydantic/typing.py", line 403, in resolve_annotations
    value = _eval_type(value, base_globals, None, type_params=())
TypeError: _eval_type() got an unexpected keyword argument 'type_params'
ERROR: Exception in CudaText for cuda_lsp.on_open: TypeError: _eval_type() got an unexpected keyword argument 'type_params'
Loaded session: "history session.json", 100ms, 8 file(s) + 1 modified
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Startup: 360ms, plugins: 120ms (project_man 40ms, lsp 71ms, modeline 4ms)

@bogen85
Copy link
Contributor

bogen85 commented Oct 15, 2024

But that might be a different issue:

Python 3.12.6
Init: cuda_project_man
Loading project: ~/.config/cudatext/settings/temporary.cuda-proj
Init: cuda_lsp
/home/dwight/.config/cudatext/py/cuda_lsp/dlg.py:958: SyntaxWarning: invalid escape sequence '\('
  signature = re.sub(".*?\(","", signature, count=1) # remove method name and first bracket '('
/home/dwight/.config/cudatext/py/cuda_lsp/dlg.py:960: SyntaxWarning: invalid escape sequence '\)'
  signature = re.sub("\)[^,)]*$","", signature, count=1) # remove last bracket ')' and return value
/home/dwight/.config/cudatext/py/cuda_lsp/util.py:80: SyntaxWarning: invalid escape sequence '\('
  '''-+*=/\()[]{}<>"'.,:;~?!@#$%^&|`…''',
/home/dwight/.config/cudatext/py/cuda_lsp/language.py:1802: SyntaxWarning: invalid escape sequence '\('
  text = re.sub('\([^)]*\)(;|\$\d)?$', '', text)
/home/dwight/.config/cudatext/py/cuda_lsp/language.py:1836: SyntaxWarning: invalid escape sequence '\.'
  if re.match('^\.?\w+\(\)$', text) and not is_destructor:
Init: cuda_modeline
Loaded session: "history session.json", 230ms, 8 file(s) + 1 modified
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Startup: 510ms, plugins: 250ms (project_man 41ms, lsp 203ms, modeline 5ms)

@bogen85
Copy link
Contributor

bogen85 commented Oct 15, 2024

NAME="openSUSE Leap"
VERSION="15.6"
$ python3.13 --version
Python 3.13.0a4

@Alexey-T
Copy link
Owner Author

@Alexey-T
Copy link
Owner Author

Alexey-T commented Oct 15, 2024

@ildarkhasanshin can you try to update Pydantic module in LSP from v1.10.x to v2 ? get v2 in PyPI.org.

@Alexey-T
Copy link
Owner Author

@bogen85 I got advice that you must upgrade to the RELEASE of 3.13 (you have beta version).

@bogen85
Copy link
Contributor

bogen85 commented Oct 15, 2024

@Alexey-T Thanks. Yeah, distrobox is broken on Opensuse so could not quickly try it with Fedora 41, so I added one of the OpenSuse language devel repos to get python 3.13.

If anyone here tries this with distrobox before I get to it, use create with the --home option to specify an alt home sub-directory and copy your cudatext config into that. I've not tried distrobox on ubuntu, I would hope it is not broken there. It is not broken for Enterprise Linux and Enteprise Linux clones.

@bogen85
Copy link
Contributor

bogen85 commented Oct 15, 2024

@bogen85 I got advice that you must upgrade to the RELEASE of 3.13 (you have beta version).

My bad, I did not have access to my proper setup to test this. I will try to test this with the 3.13 release when I get a chance.

@bogen85
Copy link
Contributor

bogen85 commented Oct 15, 2024

Alright, got fedora 41 working with rootlless distrobox on opensuse.
distrobox create --home ${HOME}/fedora41-01 --image quay.io/fedora/fedora:41 --name fedora41-01

So I ran 1.128 beta in that.

Python 3.13.0
Init: cuda_project_man
Loading project: /home/dwight/.config/cudatext/settings/temporary.cuda-proj
Init: cuda_lsp
/home/dwight/fedora41-01/.config/cudatext/py/cuda_lsp/dlg.py:958: SyntaxWarning: invalid escape sequence '\('
  signature = re.sub(".*?\(","", signature, count=1) # remove method name and first bracket '('
/home/dwight/fedora41-01/.config/cudatext/py/cuda_lsp/dlg.py:960: SyntaxWarning: invalid escape sequence '\)'
  signature = re.sub("\)[^,)]*$","", signature, count=1) # remove last bracket ')' and return value
/home/dwight/fedora41-01/.config/cudatext/py/cuda_lsp/util.py:80: SyntaxWarning: invalid escape sequence '\('
  '''-+*=/\()[]{}<>"'.,:;~?!@#$%^&|`…''',
/home/dwight/fedora41-01/.config/cudatext/py/cuda_lsp/language.py:1802: SyntaxWarning: invalid escape sequence '\('
  text = re.sub('\([^)]*\)(;|\$\d)?$', '', text)
/home/dwight/fedora41-01/.config/cudatext/py/cuda_lsp/language.py:1836: SyntaxWarning: invalid escape sequence '\.'
  if re.match('^\.?\w+\(\)$', text) and not is_destructor:
Traceback (most recent call last):
  File "/home/dwight/fedora41-01/.config/cudatext/py/cuda_lsp/__init__.py", line 1, in <module>
    from .lsp import Command
  File "/home/dwight/fedora41-01/.config/cudatext/py/cuda_lsp/lsp.py", line 36, in <module>
    from .language import CompletionMan, DiagnosticsMan, Language
  File "/home/dwight/fedora41-01/.config/cudatext/py/cuda_lsp/language.py", line 54, in <module>
    from .sansio_lsp_client import client as lsp
  File "/home/dwight/fedora41-01/.config/cudatext/py/cuda_lsp/sansio_lsp_client/__init__.py", line 3, in <module>
    from .client import *
  File "/home/dwight/fedora41-01/.config/cudatext/py/cuda_lsp/sansio_lsp_client/client.py", line 69, in <module>
    from .io_handler import _make_request, _parse_messages, _make_response
  File "/home/dwight/fedora41-01/.config/cudatext/py/cuda_lsp/sansio_lsp_client/io_handler.py", line 1, in <module>
    import cgi
ModuleNotFoundError: No module named 'cgi'
ERROR: Exception in CudaText for cuda_lsp.on_open: ModuleNotFoundError: No module named 'cgi'
Init: cuda_modeline
Loaded session: "history session.json", 190ms, 1 file(s) + 1 modified
Saving project: /home/dwight/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Startup: 460ms, plugins: 250ms (project_man 64ms, lsp 182ms, modeline 4ms)

I'll reinstall the cuda LSP plugin.

$ python --version
Python 3.13.0
NAME="Fedora Linux"
VERSION="41 (Container Image Prerelease)"

@bogen85
Copy link
Contributor

bogen85 commented Oct 15, 2024

Without Cuda LSP

Python 3.13.0
Init: cuda_project_man
Loading project: ~/.config/cudatext/settings/temporary.cuda-proj
Init: cuda_modeline
Loaded session: "history session.json", 10ms, 1 file(s) + 1 modified
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Startup: 250ms, plugins: 40ms (exterminal 1ms, project_man 40ms, modeline 3ms)

And with Cuda LSP reinstalled.

Python 3.13.0
Init: cuda_project_man
Loading project: ~/.config/cudatext/settings/temporary.cuda-proj
Init: cuda_lsp
Init: cuda_modeline
Loaded session: "history session.json", 90ms, 1 file(s) + 1 modified
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Startup: 310ms, plugins: 110ms (project_man 35ms, lsp 76ms, modeline 3ms)

@bogen85
Copy link
Contributor

bogen85 commented Oct 15, 2024

I was not sure what to do about the missing cgi module so prior to reinstall of Cuda LSP I did:

sudo dnf install python3-legacy-cgi

@bogen85
Copy link
Contributor

bogen85 commented Oct 15, 2024

I did not remove exterminal and it was working for the above, so I restarted.

Python 3.13.0
Init: cuda_project_man
Loading project: ~/.config/cudatext/settings/temporary.cuda-proj
Init: cuda_lsp
Init: cuda_modeline
Init: cuda_exterminal
Loaded session: "history session.json", 100ms, 1 file(s) + 1 modified
Init: cudatext
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Startup: 340ms, plugins: 140ms (project_man 41ms, lsp 85ms, modeline 4ms, exterminal 7ms)

Not sure why exterminal was not listed on the previous run.

@Alexey-T
Copy link
Owner Author

cgi module was removed from 3.13. maybe we can include it to folder 'lsp_modules'. but that will conflict with module from 3.12 distro. maybe we can include folder 'lsp_modules313' with 'cgi.py'.

language.py has

ver = sys.version_info
if (ver.major, ver.minor) < (3, 7):
    modules36_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'lsp_modules36')
    #sys.path.append(modules36_dir)
    # instead of append use insert
    sys.path.insert(0, modules36_dir) 

@Alexey-T
Copy link
Owner Author

Alexey-T commented Oct 15, 2024

made this change. updated LSP plugin. pls try with removed python-legacy-cgi.

@Alexey-T
Copy link
Owner Author

Alexey-T commented Oct 15, 2024

SyntaxWarning must be fixed already, no? in the updated plugin.

@bogen85
Copy link
Contributor

bogen85 commented Oct 15, 2024

SyntaxWarning must be fixed already, no? in the updated plugin.

Yes, those are fixed. See above output, warnings are not there. I should have noted that.

@bogen85
Copy link
Contributor

bogen85 commented Oct 15, 2024

CudaText 1.218.0.2, linux-x86_64-qt5, fpc 3.2.3
Python 3.13.0

$ rpm -qa | fgrep python3-3.13
python3-3.13.0-1.fc41.x86_64
$ python --version
Python 3.13.0

@Alexey-T
Copy link
Owner Author

Is module cgi found now (remove it from OS first)?

@bogen85
Copy link
Contributor

bogen85 commented Oct 15, 2024

Is module cgi found now (remove it from OS first)?

I removed it from the OS, restarted Cuda, got the no cgi module found error.
I removed and reinstalled the plugin, restarted Cuda, the error is gone.

Python 3.13.0
Init: cuda_project_man
Loading project: ~/.config/cudatext/settings/temporary.cuda-proj
Init: cuda_modeline
Loaded session: "history session.json", 10ms, 1 file(s) + 1 modified
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Startup: 260ms, plugins: 40ms (project_man 38ms, modeline 3ms, tabs_list 1ms)

@Alexey-T
Copy link
Owner Author

Ok. Issue solved.
Your log has 3 saving-project lines. Why. Is it unoptimal saves in the projMan? You maybe can add print() calls to projMan to find how these lines come.

@bogen85
Copy link
Contributor

bogen85 commented Oct 15, 2024

I've not touched project_man code yet. I'll try to look at that later.

I get that in 3.12 as well.

Python 3.12.6
Init: cuda_project_man
Loading project: ~/.config/cudatext/settings/temporary.cuda-proj
Init: cuda_lsp
Init: cuda_modeline
Loaded session: "history session.json", 120ms, 8 file(s) + 1 modified
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Saving project: ~/.config/cudatext/settings/temporary.cuda-proj
Startup: 410ms, plugins: 140ms (project_man 41ms, lsp 93ms, modeline 6ms)

@Alexey-T
Copy link
Owner Author

Ok. In python we can add some small code to print the stacktrace. I suggest to do it near the place which prints 'Saving project'.

@bogen85
Copy link
Contributor

bogen85 commented Oct 15, 2024

Sure. I don't have time now, I will look at it later.

@Alexey-T
Copy link
Owner Author

We will discuss it in #5733. closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants