is there any reason `pantsbuild.pants` requires Py...
# general
h
is there any reason
pantsbuild.pants
requires PyYAML 6 as a minimum requirement? https://github.com/pantsbuild/pants/blob/main/3rdparty/python/requirements.txt#L21 i believe we use this as an optional dev dependency for typing hints, but this conflicts with a few other dependencies, such as sagemaker: https://github.com/aws/sagemaker-python-sdk/blob/dev/setup.py#L55
e
Are you developing a Pants plugin? I ask because Pants installs itself off in a venv to the side that should have no interaction with your project requirements otherwise.
f
It’s in our repository pyproject.toml only so we can get IDE autocompletion when developing pants plugins 🙂
e
Ah, ok. Thanks for confirming. We've had folks setup Pants via
pip install
which can lead to this sort of trouble. You're not doing that, yay! I'll let others answer your question then.
h
the side that should have no interaction with your project requirements otherwise.
Yeah, unless you want to use Pants to format/typecheck/test your plugin, which we encourage. https://www.pantsbuild.org/v2.10/docs/plugins-overview#building-in-repo-plugins-with-pants The best solution is to use Pants 2.10's new "multiple resolves" feature, which got a soft launch. It's designed for use cases like this. See https://www.pantsbuild.org/v2.10/docs/plugins-overview#building-in-repo-plugins-with-pants Note that there are caveats. I didn't finish rewriting the python-third-party dependencies page, and the best docs are currrently at https://www.pantsbuild.org/v2.10/docs/reference-python#section-enable-resolves and the following option