pkg_resources deprecation/removal breaks helpers/file_func.py (setuptools >= 81)
Context
Please check:
- I've read the docs for Wfuzz
Please describe your local environment:
Wfuzz version: 3.1.1 (installed from the v3.1.1 tag)
Python version: 3.13
OS: Linux
Report
What is the current behavior?
src/wfuzz/helpers/file_func.py:4 imports pkg_resources and calls pkg_resources.resource_filename("wfuzz", "advanced.rst") (line 18) to locate the bundled filter-help file. pkg_resources is deprecated as an API in setuptools and is scheduled for removal as early as 2025-11-30; setuptools 81 will drop the pkg_resources package entirely.
Every wfuzz invocation currently emits, on import:
.../wfuzz/helpers/file_func.py:4: UserWarning:pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.Once distributions ship setuptools >= 81, import pkg_resources will fail with ModuleNotFoundError, breaking get_filter_help_file() and any code path that reaches it (e.g. --help filter documentation).
What is the expected or desired behavior?
wfuzz should locate its bundled advanced.rst resource without relying on the removed pkg_resources API, and should not emit a deprecation warning on every invocation.
Please provide steps to reproduce, including exact wfuzz command executed and output:
- Install wfuzz under any currently supported Python:
python -m pip install git+https://github.com/xmendez/[email protected] - Run any wfuzz command, e.g.:
wfuzz --version - Observe the
UserWarning: pkg_resources is deprecated as an APIprinted to stderr. - To reproduce the future hard failure (once setuptools >= 81 is available in your environment):
python -c "from wfuzz.helpers.file_func import get_filter_help_file; get_filter_help_file()"will raiseModuleNotFoundError: No module named 'pkg_resources'.
Other relevant information:
- Only call site:
src/wfuzz/helpers/file_func.py:4,18(rg -n "pkg_resources" src/returns these two hits). - Setuptools deprecation notice: https://setuptools.pypa.io/en/latest/pkg_resources.html
- Related Python 3.13 stdlib-removal cleanup: #380.
Source: xmendez/wfuzz