pynvim
pynvim copied to clipboard
imp module is deprecated
../../.local/lib/python3.9/site-packages/pynvim/compat.py:5
/home/shougo/.local/lib/python3.9/site-packages/pynvim/compat.py:5: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation
for alternative uses
from imp import find_module as original_find_module
I think importlib
is better.
Would a pull request be of interest to the pynvim team?
The PR is not easy.
Because, importlib
is not the same function.
Related changes: https://github.com/neovim/pynvim/pull/461
This is now removed from Python 3.12, so pynvim is currently broken for the upcoming Fedora 39 (that will be released this fall circa October-November)
https://bugzilla.redhat.com/show_bug.cgi?id=2220350
is there any blocker to merging #461 - just the loss of Python 2.x compatibility?
@justinmk looks like there's some more call sites that are not fixed by #461
File "/builddir/build/BUILDROOT/python-neovim-0.4.3-10.fc39.x86_64/usr/lib/python3.12/site-packages/p
ynvim/compat.py", line 5, in <module>
from imp import find_module as original_find_module
ModuleNotFoundError: No module named 'imp'
I'll see if I can get those addressed
@michel-slm thank you! If you find the time to do that I'll find the time to publish a release here, and revive the CI :)
@justinmk the commit you rebased from @Shougo is similar to what I had (but I was trying to get it to apply to 0.4.3 so it looked slightly different). I just switched to using the latest Git master, and on Fedora 38 (Python 3.11) I get an assertion error while on Fedora 39 (Python 3.12) I get more serious errors involving the event loop. Let me file two separate issues for those and we can continue this there.
@justinmk let's continue this in #528