Skip to content

Conversation

@llimeht
Copy link
Contributor

@llimeht llimeht commented Nov 4, 2025

Description

The pkg_resources module 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:

from sas.qtgui.MainWindow.PackageGatherer import PackageGatherer; p = PackageGatherer(); p.log_imported_packages()

Review Checklist:

[if using the editor, use [x] in place of [ ] to check a box]

Documentation (check at least one)

  • There is nothing that needs documenting
  • Documentation changes are in this PR
  • There is an issue open for the documentation (link?)

Installers

  • There is a chance this will affect the installers, if so
    • Windows installer (GH artifact) has been tested (installed and worked)
    • MacOSX installer (GH artifact) has been tested (installed and worked)
    • Wheels installer (GH artifact) has been tested (installed and worked)

Licensing (untick if necessary)

  • The introduced changes comply with SasView license (BSD 3-Clause)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace deprecated pkg_resources check

1 participant