You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python -W error -c 'import astroid'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "../astroid/__init__.py", line 63, in <module>
from astroid.nodes import *
File "../astroid/nodes.py", line 23, in <module>
from astroid.node_classes import (
File "../astroid/node_classes.py", line 38, in <module>
from astroid import bases
File "../astroid/bases.py", line 33, in <module>
MANAGER = manager.AstroidManager()
File "../astroid/util.py", line 26, in <lambda>
lambda: importlib.import_module("." + module_name, "astroid")
File ".../importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "../astroid/manager.py", line 24, in <module>
from astroid.interpreter._import import spec
File "../astroid/interpreter/_import/spec.py", line 12, in <module>
import imp
File ".../imp.py", line 33, in <module>
DeprecationWarning, stacklevel=2)
DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
$
Thanks for the report! We had #594 for moving away from imp to something like importlib but it fell off the radar for some time. This means we definitely need to prioritize the switch sooner.
Steps to reproduce
Import astroid.
Current behavior
There's a DeprecationWarning:
We've been using
-W error
to run the trio test suite for a long time, but this warning only became an issue when migrating trio to pytest 5 which has changes related to warnings.Expected behavior
No warning:
python -c "from astroid import __pkginfo__; print(__pkginfo__.version)"
output2.2.5
Thank you!
The text was updated successfully, but these errors were encountered: