Changed importlib_metadata to have requirement for < python 3.10#577
Conversation
mitya57
left a comment
There was a problem hiding this comment.
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 metadataAdd I hope |
|
I have added the |
|
|
|
Yes, you need two spaces before |
|
Okay, I have changed the formatting and removed the comments. |
…e import to make it more symmetrical.
jaraco
left a comment
There was a problem hiding this comment.
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!!