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

wooden-thailand-8386

09/27/2022, 3:08 PM
Hey, qq - a coworker and I are trying to update the runtime for the Google Cloud Function to
python310
and we noticed that there’s a list of available targets that are being defined on
pants
. By checking out the code we found this ( https://github.com/pantsbuild/pants/blob/2fbd8bb618cbc06bb242e461be9e9942e7699e65/[…]thon/pants/backend/google_cloud_function/python/target_types.py ) would the change be as easy as adding the new runtime there? Also, this is more out of curiosity, but how does
pants
handles runtimes that are a different version than the python defined on
pants.toml
? Tks!
h

hundreds-father-404

09/27/2022, 7:08 PM
Hello!
Also, this is more out of curiosity, but how does pants handles runtimes that are a different version than the python defined on pants.toml? Tks!
I'm not sure I follow this?
w

wooden-thailand-8386

09/27/2022, 7:43 PM
Hey Eric! I have my interpreter_constraints defined as
==3.9.*
but
pants
was able to “figure it out” the proper 3rd party dependencies for 3.10 when I set the runtime of that cloud function as
python310
. How does it handle that?
I’m guessing that whatever
pex
does under the hood has nothing to do with the interpreter_constraints that
pants
uses to run itself?
h

hundreds-father-404

09/27/2022, 8:19 PM
I have my interpreter_constraints defined as ==3.9.*
Via
[python].interpreter_constraints
? That is constraints for your own code, not Pants itself
2 Views