https://pantsbuild.org/ logo
#general
Title
# general
f

future-oxygen-10553

04/24/2023, 9:14 PM
Apologies if this has been asked/answered recently… I’m wondering about the status of Python 3.10 support for pants itself. I recall reading some months ago that I was work-in-progress but was asked today by a coworker about the status of that. Thanks!
👋 1
b

bitter-ability-32190

04/24/2023, 9:23 PM
For running pants? Check out the new pants binary on the docs site under "installing pants" (I think that's the name)
f

future-oxygen-10553

04/24/2023, 9:37 PM
Hey Josh! Thanks, I’m already using that… so pants itself supports running under Python 3.10? How do I control that?
Let me look at the docs 😄
e

enough-analyst-54434

04/24/2023, 9:37 PM
No
It runs under 3.9 but the 3.9 is ~included in the binary now.
f

future-oxygen-10553

04/24/2023, 9:37 PM
Oh, got it
e

enough-analyst-54434

04/24/2023, 9:37 PM
So do you actually still care about 3.10?
f

future-oxygen-10553

04/24/2023, 9:41 PM
Great, thank you! So in GitHub Actions, do I even need to run the
setup-python
action with
version: 3.9
for pants to run (especially if I have local plugins)?
e

enough-analyst-54434

04/24/2023, 9:43 PM
No.
f

future-oxygen-10553

04/24/2023, 9:44 PM
Yes
I’ve vendored a copy of it, but yes
e

enough-analyst-54434

04/24/2023, 9:45 PM
Ok, well the recent versions handle scie-pants.
f

future-oxygen-10553

04/24/2023, 9:45 PM
Yeah, I vendored it approximately last week
e

enough-analyst-54434

04/24/2023, 9:45 PM
Ok.
f

future-oxygen-10553

04/24/2023, 9:45 PM
The only need for setting up a Python 3.9 is if I’m testing local pants plugins?
I see that as an option in the action
e

enough-analyst-54434

04/24/2023, 9:46 PM
Local code is local code. If it's Python and you want to run Pants goals against it (fmt, lint, check, test, etc) you need Python. If you don't want to do those things and you just want Pants to run the plugin code, you don't need your own Python. You must now pretend Pants is native and the PBS CPython 3.9 it uses internally is an implementation detail.
So my no above was incorrect!
Sorry about that.
f

future-oxygen-10553

04/24/2023, 9:48 PM
No problem 😄 I’m not actually testing our plugin directly, since we run it and we’ll find out if it breaks. Just trying to understand the limits
e

enough-analyst-54434

04/24/2023, 9:48 PM
Are you network isolated? What drives vendoring the action?
f

future-oxygen-10553

04/24/2023, 9:48 PM
The default cache locations didn’t work in our self-hosted runners for reasons that I didn’t root cause
e

enough-analyst-54434

04/24/2023, 9:48 PM
Gotcha.
f

future-oxygen-10553

04/24/2023, 9:49 PM
The path here is hardcoded instead of configured with `pants.ci.toml`: https://github.com/pantsbuild/actions/blob/main/init-pants/action.yaml#L140
e

enough-analyst-54434

04/24/2023, 9:51 PM
I think it goes without saying we welcome parametrization contributions.
f

future-oxygen-10553

04/24/2023, 9:51 PM
Or being configurable by an input to the action
😄 I’ll try to put something together soon
2 Views