Skip to content
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

Switch off of deprecated pkg_resources library #641

Closed
Tracked by #32888
kdmccormick opened this issue May 25, 2023 · 1 comment
Closed
Tracked by #32888

Switch off of deprecated pkg_resources library #641

kdmccormick opened this issue May 25, 2023 · 1 comment
Labels
maintenance Routine upkeep necessary for the health of the platform

Comments

@kdmccormick
Copy link
Member

kdmccormick commented May 25, 2023

Background

The pkg_resources library, used by XBlock to load static assets, is deprecated. The removal timeline is unknown.

XBlock uses pkg_resources in a couple places.

XBlock also recommend pkg_resources in its docs: https://edx.readthedocs.io/projects/xblock-tutorial/en/latest/anatomy/python.html

To do

First, choose a new resource loading interface. Options:

  • Use importlib.resources. Unfortunately, this will become deprecated in Python 3.11 and replaced with a yet-to-be-determined interface.
  • Wait until Python 3.11, and then switch to the 3.11 replacement.
  • Merge xblock-utils into this repository. That library provides a ResourceLoader abstraction; adopt that.

Then:

  • Update the docs to recommend the new interface.
  • Update any uses of pkg_resources in this repo.
  • Reach out to XBlock maintainers (including maintainers of edx-platform, which defines several XBlocks!) to request that they switch from pkg_resources to the new interface.

Related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Routine upkeep necessary for the health of the platform
Projects
Status: Done
Development

No branches or pull requests

3 participants