Merge pull request #36044 from openedx/pkg_resources-depr
Replace pkg_resources with importlib.resources
This commit is contained in:
@@ -11,7 +11,7 @@ from datetime import datetime
|
||||
from tempfile import NamedTemporaryFile, mkdtemp
|
||||
|
||||
import olxcleaner
|
||||
import pkg_resources
|
||||
from importlib.metadata import entry_points
|
||||
from ccx_keys.locator import CCXLocator
|
||||
from celery import shared_task
|
||||
from celery.utils.log import get_task_logger
|
||||
@@ -85,7 +85,7 @@ LOGGER = get_task_logger(__name__)
|
||||
FILE_READ_CHUNK = 1024 # bytes
|
||||
FULL_COURSE_REINDEX_THRESHOLD = 1
|
||||
ALL_ALLOWED_XBLOCKS = frozenset(
|
||||
[entry_point.name for entry_point in pkg_resources.iter_entry_points("xblock.v1")]
|
||||
[entry_point.name for entry_point in entry_points(group="xblock.v1")]
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -16,10 +16,6 @@ filterwarnings =
|
||||
ignore:.*You can remove default_app_config.*:PendingDeprecationWarning
|
||||
# ABC deprecation Warning comes from libsass
|
||||
ignore:Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated.*:DeprecationWarning:sass
|
||||
# declare_namespace Warning comes from XBlock https://github.com/openedx/XBlock/issues/641
|
||||
# and also due to dependency: https://github.com/PyFilesystem/pyfilesystem2
|
||||
ignore:Deprecated call to `pkg_resources.declare_namespace.*:DeprecationWarning
|
||||
ignore:.*pkg_resources is deprecated as an API.*:DeprecationWarning
|
||||
ignore:'etree' is deprecated. Use 'xml.etree.ElementTree' instead.:DeprecationWarning:wiki
|
||||
|
||||
norecursedirs = envs
|
||||
|
||||
Reference in New Issue
Block a user