Merge pull request #36044 from openedx/pkg_resources-depr

Replace pkg_resources with importlib.resources
This commit is contained in:
Feanil Patel
2025-01-23 11:05:45 -05:00
committed by GitHub
14 changed files with 48 additions and 62 deletions

View File

@@ -1,7 +1,7 @@
"""
Lookup list of installed XBlocks, to aid XBlock developers
"""
import pkg_resources
from importlib.metadata import entry_points
def get_without_builtins():
@@ -12,11 +12,10 @@ def get_without_builtins():
"""
xblocks = [
entry_point.name
for entry_point in pkg_resources.iter_entry_points('xblock.v1')
if not entry_point.module_name.startswith('xmodule')
for entry_point in entry_points(group='xblock.v1')
if not entry_point.module.startswith('xmodule')
]
xblocks = sorted(xblocks)
return xblocks
return sorted(xblocks)
def main():