Page 1 of 1

Pydantic Bugfix for Python 3.12.4

Posted: 13.07.2024 21:42
by Random Void User
CudaText is a fantastic editor, thank you. I found and fixed a bug in this version: CudaText 1.215.0.2, linux-x86_64-gtk2, fpc 3.2.3. Python 3.12.4 introduced an issue with pydantic:

https://github.com/pydantic/pydantic/issues/9609

On launch, with Python 3.12.4 as system Python, CudaText emits the recursion_guard Python error. Fixing is simple. Replate the entire pydantic folder at

"${XDG_CONFIG_HOME}/cudatext/py/cuda_lsp/lsp_modules/pydantic"

with pydantic "1.10.X-fixes" branch from

https://github.com/pydantic/pydantic/tree/1.10.X-fixes

No make or install is needed. Just copy the pydantic subfolder from this branch to the lsp_modules folder above.

I puzzle how CudaText uses Python. Is it a venv? If not, how is it configured? Does it use "pip"? I fished around but got lost. Nonetheless I fixed a bug by hand. In a venv I might have used "pip" to update pydantic. Actually, I prefer micromamba over pip. Micromamba is nearing a fresh 2.0.0 release, too.

An AppImage for Linux would be really nice!

Thank you!
- Random

Re: Pydantic Bugfix for Python 3.12.4

Posted: 14.07.2024 11:17
by main Alexey
>with pydantic "1.10.X-fixes" branch from
I prefer the release version, not some fixes-branch. is release dir have the bug fixed?
>I puzzle how CudaText uses Python. Is it a venv? If not, how is it configured?
no. it uses Python4Delphi fork in my github (named Python4Lazarus).
>An AppImage for Linux would be really nice!
I don't plan it, so pls create it and publish it somewhere (Flatpak version was made and published by 3rd party).

Re: Pydantic Bugfix for Python 3.12.4

Posted: 15.07.2024 09:56
by main Alexey
ok, updated Pydantic to 1.10-fixes in the LSP plugin, and published LSP. i hope it won't give us regressions.

Re: Pydantic Bugfix for Python 3.12.4

Posted: 15.07.2024 21:55
by Random Void User
Void Linux has an outdated version of Lazarus IDE and the package is orphaned. If Void would keep Lazarus fresh, an AppImage effort might be worth it for me. I could not find an AppImage of Lazarus, either, nor a generic Linux binary, just .debs and .rpms. I do not use Flatpaks. They have been far more trouble in my experience.

Re: Pydantic Bugfix for Python 3.12.4

Posted: 16.07.2024 08:49
by main Alexey
I posted the GH issue about too old lazarus in Void:
https://github.com/void-linux/void-pack ... sues/51288