openedx / openedx/openedx-platform
Remove setuptools<82 constraint once pyfilesystem2 (fs) drops pkg_resources usage
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.2k
- Forks
- 4.4k
- Avg merge
- 6d 18h
- Merged PRs (30d)
- 42
Description
Context
setuptools 82.0.0 removed pkg_resources from its distribution (see https://setuptools.pypa.io/en/stable/history.html#v82-0-0).
The fs (pyfilesystem2) package still uses pkg_resources for namespace package declarations in its __init__.py:
__import__("pkg_resources").declare_namespace(__name__)
This causes ModuleNotFoundError: No module named 'pkg_resources' whenever code imports from fs, which is used throughout the platform (e.g., lms/djangoapps/courseware/courses.py, xblocks_contrib).
Upstream tracking issue: https://github.com/PyFilesystem/pyfilesystem2/issues/577
Current Workaround
setuptools<82 was added to requirements/constraints.txt in https://github.com/openedx/openedx-platform/pull/38067 to unblock the make upgrade run.
Resolution
This constraint can be removed once pyfilesystem2 releases a new version that no longer uses pkg_resources for its namespace package declaration.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with requirements/constraints.txt and review the upstream pyfilesystem2 issue #577 and its release status. Once a pyfilesystem2 version no longer uses pkg_resources, remove the setuptools<82 constraint and run the make upgrade workflow to confirm dependency resolution and fs imports work without the workaround.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100