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
Changed importlib_metadata to have requirement for < python 3.10 #577
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please see what I wrote in this comment:
#576 (review)
Co-authored-by: Dmitry Shachnev <mitya57@users.noreply.github.com>
I have updated the imports as per #576 (review) |
Co-authored-by: Dmitry Shachnev <mitya57@users.noreply.github.com>
Hmm, any idea what might cause the tests to fail? I didn't change anything that could cause errors. I'll try to investigate. If you find anything, let me know! |
So mypy complains about this:
I would simply silence that. Try adding Like this: try:
from importlib import metadata
except ImportError:
import importlib_metadata as metadata # type: ignore |
Alright I have added that. Thanks for the help! |
I am sorry. It still doesn't work because Python 3.9 and earlier does have Let's try this: import sys
if sys.version_info >= (3, 10):
from importlib import metadata
else:
import importlib_metadata as metadata Add I hope |
I have added the |
|
Yes, you need two spaces before |
Okay, I have changed the formatting and removed the comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, now CI finally passes. Thanks!
You have my approval, but let's wait for @jaraco who is the chief maintainer.
…e import to make it more symmetrical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a couple of nitpicky changes and a changelog, but this looks good. Thanks for pulling it together!
Thanks for merging it! |
Trying to fix the issue #575.
Hope it works!!