refactor: replace deprecated pkg_resources API and drop Python 3.8 support#45
Merged
Conversation
magajh
reviewed
Feb 3, 2025
DeimerM
reviewed
Feb 7, 2025
|
I was checking the xblock in the sumac release and it's working very well https://studio.sumac.releases.edunext.link/container/block-v1:OpenedX+101+2025+type@vertical+block@46af3d74b8fc42129b21ebdf7a5be318 |
DeimerM
approved these changes
Feb 7, 2025
magajh
requested changes
Feb 10, 2025
magajh
left a comment
Contributor
There was a problem hiding this comment.
- We need to update the compatibility table since we are dropping support for pretty much all versiones < Redwood, we should also mention it in the changelog https://github.com/eduNEXT/xblock-filesmanager?tab=readme-ov-file#compatibility-notes
- Review and remove unnecessary constraints since we are dropping support for python 3.8 and django 3.2 https://github.com/eduNEXT/xblock-filesmanager/blob/main/requirements/constraints.txt. We probably would also need to run
make upgradeagain after removing the constraints
Co-authored-by: Maga Giorgianni <maria.jaimes@edunext.co>
magajh
reviewed
Feb 11, 2025
Co-authored-by: Maga Giorgianni <maria.jaimes@edunext.co>
Co-authored-by: Maga Giorgianni <maria.jaimes@edunext.co>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_resources library, used to load static assets, is deprecated. Replace pkg_resources lib with importlib.resources.
importlib-resources is included by default in Python 3.11. However, to maintain compatibility with Python 3.8, we need to install the importlib_resources backport explicitly. This ensures that the required functionality remains available across supported Python versions.
Testing instructions
1, Create a Sumac environment using Tutor or TVM.

2. Install xblock-filesmanager using this branch you can follow the official tutor documentation.
3. In a course of study:
Navigate to Settings -> Advanced Settings and go to Advanced Module List settings.
Add:
Other Information
openedx/public-engineering#273