DEP: refactored out runtime dependency on setuptools by neutrinoceros · Pull Request #258 · scientific-python/pytest-doctestplus
Yesterday we ran into some issues with the latest version of setuptools at astropy (see this issue for context).
In summary, what happened is that setuptools 71 brought in a couple runtime side effects, resulting in some confusing error messages.
My analysis showed that setuptools is only present in the runtime environment that astropy runs tests with because it's brought in by this package, which only requires it for a single line of code, so I refactored it using standard lib importlib.metadata + packagaging (which is already a runtime dependency here), eliminating setuptools as a runtime dependency, which down the road eliminates a source of instabilitly for any package that relies on pytest-doctestplus.
In case it's not clear (it wasn't to me), note that pkg_resources is really part of setuptools and not included in the standard library.