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

imp module is deprecated #478

Closed
Shougo opened this issue Jan 31, 2021 · 8 comments
Closed

imp module is deprecated #478

Shougo opened this issue Jan 31, 2021 · 8 comments

Comments

@Shougo
Copy link
Contributor

Shougo commented Jan 31, 2021

../../.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.

@kkirsche
Copy link

Would a pull request be of interest to the pynvim team?

@Shougo
Copy link
Contributor Author

Shougo commented Jun 24, 2021

The PR is not easy.
Because, importlib is not the same function.

@Shougo
Copy link
Contributor Author

Shougo commented Jun 24, 2021

Related changes: #461

@michel-slm
Copy link
Contributor

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?

@michel-slm
Copy link
Contributor

@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

@justinmk
Copy link
Member

@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 :)

@michel-slm
Copy link
Contributor

@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.

@michel-slm
Copy link
Contributor

@justinmk let's continue this in #528

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

4 participants