FeedbackXBlock 2.0.0 not compatible with Quince

The feedback xblock version 2.0.0 update includes a transition from pkg_resources API to importlib-resources API.

Unfortunately the files function was introduced in Python 3.9

Using Tutor 17.0.4 to build the Open edX image (quince.3) produces the following error when trying to access the feedback in a course, instructor dashboard, or Studio.

lms-1  | Traceback (most recent call last):
lms-1  |   File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 55, in inner
lms-1  |     response = get_response(request)
lms-1  |   File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 197, in _get_response
lms-1  |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
lms-1  |   File "/opt/pyenv/versions/3.8.18/lib/python3.8/contextlib.py", line 75, in inner
lms-1  |     return func(*args, **kwds)
lms-1  |   File "/openedx/venv/lib/python3.8/site-packages/django/utils/decorators.py", line 134, in _wrapper_view
lms-1  |     response = view_func(request, *args, **kwargs)
lms-1  |   File "/openedx/venv/lib/python3.8/site-packages/django/views/decorators/cache.py", line 40, in _cache_controlled
lms-1  |     response = viewfunc(request, *args, **kw)
lms-1  |   File "/openedx/edx-platform/./lms/djangoapps/instructor/views/instructor_dashboard.py", line 269, in instructor_dashboard_2
lms-1  |     context, instructor_template = InstructorDashboardRenderStarted.run_filter(
lms-1  |   File "/openedx/venv/lib/python3.8/site-packages/openedx_filters/learning/filters.py", line 702, in run_filter
lms-1  |     data = super().run_pipeline(context=context, template_name=template_name)
lms-1  |   File "/openedx/venv/lib/python3.8/site-packages/openedx_filters/tooling.py", line 217, in run_pipeline
lms-1  |     result = step_runner.run_filter(**accumulated_output)
lms-1  |   File "/openedx/venv/lib/python3.8/site-packages/feedback/extensions/filters.py", line 47, in run_filter
lms-1  |     self.resource_string(f"static/html/{TEMPLATE_CATEGORY}.html")
lms-1  |   File "/openedx/venv/lib/python3.8/site-packages/feedback/extensions/filters.py", line 78, in resource_string
lms-1  |     return importlib.resources.files("feedback").joinpath(path).read_text(encoding="utf-8")
lms-1  | AttributeError: module 'importlib.resources' has no attribute 'files'

Is there a way I can pin the version that gets installed to 1.6.0?

@farhan can I get your advice?

@WillEVTdigital how did you install the xblock? did you run pip install or did you use a plugin?

@WillEVTdigital We have dropped the support of Python 3.8 from v2.0.0 of FeedbackXBlock. v2.0.0 and above shouldn’t be installed on Python3.8 environment.
References:

Thanks both for getting back to me, I tracked down where I was installing the xblock and have pinned it

openedx-dockerfile-post-python-requirements

RUN pip install "feedback-xblock>=1.6.0,<2.0.0"