Skip to content

refactor: replace deprecated pkg_resources API and drop Python 3.8 support#45

Merged
luisfelipec95 merged 18 commits into
mainfrom
lfc/deprecate-pkg-resources
Feb 11, 2025
Merged

refactor: replace deprecated pkg_resources API and drop Python 3.8 support#45
luisfelipec95 merged 18 commits into
mainfrom
lfc/deprecate-pkg-resources

Conversation

@luisfelipec95

@luisfelipec95 luisfelipec95 commented Feb 3, 2025

Copy link
Copy Markdown
Contributor

Description

  • Dropped support for Python 3.8
  • Upgrade requirements
  • Replace pkg_resources lib with importlib.resources:

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:
image

  1. Create Unit -> Advance -> filesmanager

Other Information

openedx/public-engineering#273

@luisfelipec95
luisfelipec95 requested a review from a team as a code owner February 3, 2025 20:58
Comment thread requirements/base.in Outdated
@luisfelipec95 luisfelipec95 changed the title refactor: replace deprecated pkg_resources API refactor: replace deprecated pkg_resources API and drop Python 3.8 support Feb 5, 2025
Comment thread filesmanager/filesmanager.py Outdated
@DeimerM

DeimerM commented Feb 7, 2025

Copy link
Copy Markdown

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

@luisfelipec95
luisfelipec95 requested a review from DeimerM February 7, 2025 20:27

@magajh magajh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread CHANGELOG.rst Outdated
Comment thread CHANGELOG.rst Outdated
Comment thread filesmanager/filesmanager.py
@luisfelipec95
luisfelipec95 requested a review from magajh February 10, 2025 21:36
Comment thread CHANGELOG.rst Outdated
Comment thread CHANGELOG.rst Outdated
Comment thread requirements/constraints.txt Outdated
Comment thread requirements/constraints.txt
luisfelipec95 and others added 3 commits February 11, 2025 11:22
Co-authored-by: Maga Giorgianni <maria.jaimes@edunext.co>
Co-authored-by: Maga Giorgianni <maria.jaimes@edunext.co>
@luisfelipec95
luisfelipec95 requested a review from magajh February 11, 2025 16:24

@magajh magajh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@luisfelipec95
luisfelipec95 merged commit 3039b1c into main Feb 11, 2025
@luisfelipec95
luisfelipec95 deleted the lfc/deprecate-pkg-resources branch February 11, 2025 22:48
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.

3 participants