Remove uses (and traces!) of pkg_resources #3678
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
The
pkg_resourcesmodule has been deprecated for some time and will disappear in the coming couple of months in various downstream places.It's relatively easy to replace the remaining use of pkg_resources (and a faux-use of it that has already been fixed). This PR also fixes some other bugs in the package gatherer regarding how it was finding stdlib and removes some Python2-isms in the code.
There was discussion about removing this code entirely; that can still happen sometime in the future, or we can decide to expose this output in an About box tab if harvesting the details is useful. In any case, this PR still brings in a useful new addition to the module resource manager that can then be used in other locations.
Fixes #3096
How Has This Been Tested?
These functions are not currently exposed in the UI but you can run at the IPython prompt within sasview to see it in action:
Review Checklist:
[if using the editor, use
[x]in place of[ ]to check a box]Documentation (check at least one)
Installers
Licensing (untick if necessary)