-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Remove dependency to pkg_resources #9691
Conversation
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the the following people are requested to review this:
|
hmm |
Pull Request Test Coverage Report for Build 4302012175
💛 - Coveralls |
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.
Thanks for the quick reaction!
(cherry picked from commit b7a63c3)
if sys.version_info >= (3, 8): | ||
from importlib.metadata import version | ||
else: | ||
from importlib_metadata import version |
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.
FWIW, I think we can probably do this as a module level import. The pkg_resources
import was done at runtime because it was exceedingly slow. I don't expect importlib.metadata
to have this issue (but it would be worth checking to confirm) and I think it probably gets pulled in already via our plugin interfaces. That being said it doesn't actually matter in practice so it's not worth a follow up PR.
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.
Thanks. I did not know the reason of lazy import here.
Summary
Since
pkg_resources.declare_namespace
has been deprecated, our CI is failed.I removed the dependency to
pkg_resources
.Details and comments
CI message