-
Notifications
You must be signed in to change notification settings - Fork 368
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 on usage of imp in loader.py #675
Comments
For what it's worth, there's a workaround that will suppress that one particular warning. I use it on pytest but I believe it's going to be mostly the same with other test frameworks:
|
I have also spotted this - the question is really: which versions of python is invoke committed to supporting? The docs say 2.7 and >=3.4. However, we have now passed 2020-01-01, so the sun has officially gone down on python 2. If I had a vote (which I don't obviously), it would be to drop support for 2.7 and switch this code to Instead I'm adding a warning filter (https://docs.pytest.org/en/latest/warnings.html#pytest-mark-filterwarnings) and have logged an issue on our project. |
This issue was brought up again in #829. I would be happy to submit a PR if the team is looking for help. |
Hi, But yes, very soon Python2 will be dropped clearing out issues such as this. |
Listening in as I also see this warning. |
2022, still here ...... 🧟 |
This will break in python 3.12:
May I suggest the use of a conditional import based on the python version? This would address the warnings will ensuring forward compatibility with Python 3.12. I'm not very fond of silencing the warning since it is very legitimate. |
#919 merged and released in Invoke 2.1.0 today. Thanks! |
The imp dependency has been replaced. Can you verify what version you are using? |
My fault, sorry, I thought I was using latest version but due to a typo I was using 2.0.0, that's why I have deleted my comment. |
No worries |
When running my test suite which uses invoke (via fabric) I see:
The used parts of the
imp
module have been deprecated since Python 3.3 and the replacementimportlib
has been available since Python 3.1.The text was updated successfully, but these errors were encountered: