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

DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses #111

Open
egbuck opened this issue Jul 30, 2020 · 4 comments · May be fixed by #119

Comments

@egbuck
Copy link

egbuck commented Jul 30, 2020

It looks like imp module is still used in
.../pyutilib/misc/import_file.py on line 11

I noticed this while using pytest, with importing io, sys, & pyomo

Let me know if more details are required - I would put more, but this seems descriptive enough for this small warning.

@egbuck
Copy link
Author

egbuck commented Jul 30, 2020

imp.find_module() and imp.load_source() - these appear to be the only times imp is used throughout this file, if that helps

@mrmundt
Copy link
Contributor

mrmundt commented Aug 4, 2020

Thanks for reporting this. I'm looking into converting these.

@timmy61109
Copy link

timmy61109 commented Nov 30, 2020

Suggestions can refer to the following suggestions.

../../.local/lib/python3.8/site-packages/pyutilib/misc/import_file.py:11
  /home/timmy/.local/lib/python3.8/site-packages/pyutilib/misc/import_file.py:11: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
    import imp

-- Docs: https://docs.pytest.org/en/stable/warnings.html

@nehadimri1991
Copy link

This issue seems to be still open. pyutilib does not work with Python 3.12 as the imp module has been deprecated.

This was referenced Aug 29, 2024
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

Successfully merging a pull request may close this issue.

4 participants