Is there a canonical example of: - Running the bul...
# plugins
a
Is there a canonical example of: • Running the bulk (all of) your product code in an (old) version of python • Running your pants plugin code w/ whatever version of python Pants requires (3.9 prior to 2.25, 3.11 after) • Running python codegen plugin code against the version of python that your product code needs • running pytest and mypy against it all We kinda got lucky that our vendor required Py3.9 But they upgraded to py3.10 which pants completely skipped. And now we're struggling with resolves and interpreter constraints and stuff
b
heya, sorry for the trouble. I don't know about a strong canonical example... have you seen https://www.pantsbuild.org/stable/docs/writing-plugins/overview#building-in-repo-plugins-with-pants ? In particular the use of
[python.resolves_to_interpreter_constraints]
(oh, that page has a typo, saying 3.9 where it should say 3.11. Fixed by: https://github.com/pantsbuild/pants/pull/22136)
a
hm, I'll re-read the docs and have a play again on Monday