Do tool libs internally use a different version of...
# general
h
Do tool libs internally use a different version of python for resolves? My
interpreter_constraints
match the ones used to generate the lockfile, and I don’t have any other config overwriting this.
Copy code
InvalidLockfileError: You are consuming `black~=24.3.0`, `coverage[toml]==7.2.7`, and 11 other requirements from the `tools` lockfile at requirements-tools.lock with incompatible inputs.
- The inputs use interpreter constraints (`CPython>=3.8`) that are not a subset of those used to generate the lockfile (`CPython<3.11,>=3.9`).
h
Each tool will use an interpreter that is compatible with the ICs it’s configured to use, which may be different than the ones the lockfile was generated for
Any recent changes that caused this?
h
This is on a branch enabling the Pex lockfile feature, which we weren’t using previously. But I can’t see any indication of a different IC being set. 😕
h
How did you generate
requirement-tools.lock
? What are the ICs in your pants.toml? Where did
CPython>=3.8
come from?
h
That’s what I’m confused by, other than
Copy code
# pants.toml
[python]
interpreter_constraints = ["CPython>=3.9"]
we don’t set a different IC anywhere.
requirements-tools.lock
was just generated with
pants generate-lockfiles --resolve=python-default --resolve=tools --resolve=test
whose resolves points at a requirements-tools.txt that contains black, mypy etc.
c
The error says your interpreter constraints are
CPython>=3.8
, but the toml snippet has
CPython>=3.9"
. Am I reading that right?
h
Yep, exactly. Lockfile also has no mention of 3.8
c
• Which version of Pants? • So in your repo
git grep 'CPython>=3.8'
has no results? 😕