-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
ImportError: cannot import name 'metadata' with v0.6.1 on python 3.6 #797
Comments
Strange enough it works for me in local tox as well as on travis: https://travis-ci.org/github/svinota/pyroute2/builds/771564718
yep, that may be the case. Let me dig a bit around. |
A pip3 install of pyroute2 picking up 0.6.1 results in the following output for a pip3 freeze
And on this we see the importlib-metadata issue above. |
@XN137 yep, looks like importlib-metadata is installed as a dependency for the project test environment. I include it into the deps for python < 3.8 |
0.6.2 is on it's way |
looks like its working:
thanks for the quick fix! issue should be good to close now, wdyt? |
Yep. Thanks! |
svinota/pyroute2#797 Signed-off-by: Wataru Ishida <wataru.ishid@gmail.com>
we have automated tests that install
tcconfig==0.24.1
on python 3.6 and they started failing 1-2 days ago with:pinning
pyroute2
to0.5.19
fixes the issue, see reproduction below:looking at
https://docs.python.org/3.7/library/importlib.html
https://docs.python.org/3.8/library/importlib.metadata.html
it seems like the import and fallback here can only work on python 3.8+:
pyroute2/pyroute2/pyroute2/__init__.py
Lines 43 to 46 in 59d6546
somewhat related (i.e. a potential fix):
python-poetry/poetry#1586
tox.ini
on the project suggestspy36
is being tested as part of CI, so not sure how this did not fail early.maybe one of the test dependencies happens to also install
importlib-metadata
along the way already.The text was updated successfully, but these errors were encountered: