I’ve started to get random `error: Library stubs n...
# development
I’ve started to get random
error: Library stubs not installed for "pkg_resources"
when running
in the Pants repo… anyone else observed that?
Copy code
11:26:18.02 [ERROR] Completed: Typecheck using MyPy - mypy - mypy failed (exit code 1).
.cache/pex_root/venvs/07570716880b83f98097b50a2089bac0b0397777/c6572eb523940752245b735806568695597a4d1f/lib/python3.9/site-packages/pytest/__init__.py:37: note: In module imported here,
src/python/pants/engine/internals/dep_rules_test.py:10: note: ... from here:
.cache/pex_root/venvs/07570716880b83f98097b50a2089bac0b0397777/c6572eb523940752245b735806568695597a4d1f/lib/python3.9/site-packages/_pytest/monkeypatch.py:323:1: error: Library stubs not installed for "pkg_resources" (or incompatible with Python 3.9)  [import]
                from pkg_resources import fixup_namespace_packages
.cache/pex_root/venvs/07570716880b83f98097b50a2089bac0b0397777/c6572eb523940752245b735806568695597a4d1f/lib/python3.9/site-packages/_pytest/monkeypatch.py:323:1: note: Hint: "python3 -m pip install types-setuptools"
re-running and the error usually goes away.. 🤷
Might be related to the mypy cache, but maybe a red herring
I've sometimes seen this in the past year when the transitive closure isn't just right. I think a 3rdparty dep is missing a declared dep on setuptools, so it ends up not being in the venv and Pants is mad
Ah… interesting.
Yes, I see those from time to time, but only on my macbook, not in CI
And I think only when running on a subset of files