Pydantic Bugfix for Python 3.12.4
Posted: 13.07.2024 21:42
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
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