ripe-gigabyte-88964
03/21/2023, 4:24 PMpants check
after configuring a custom linter plugin.
12:11:57.96 [ERROR] 1 Exception encountered:
Engine traceback:
in `check` goal
InvalidLockfileError: You are using the `pants-plugins` lockfile at 3rdparty/python/pants-plugins.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.9.*`).- The input interpreter constraints are specified by your code, using the `[python].interpreter_constraints` option and the `interpreter_constraints` target field.
- To create a lockfile with new interpreter constraints, update the option `[python].resolves_to_interpreter_constraints`, and then generate the lockfile (see below).
See {doc_url('python-interpreter-compatibility')} for details.
To regenerate your lockfile, run `pants generate-lockfiles --resolve=pants-plugins`.
See <https://www.pantsbuild.org/v2.16/docs/python-third-party-dependencies> for details.
My default interpreter is Python 3.8, but I have my pants-plugins
resolve set to use Python 3.9 in my pants.toml
[python.resolves_to_interpreter_constraints]
pants-plugins = [ "CPython==3.9.*" ]
ripe-gigabyte-88964
03/21/2023, 4:29 PMripe-gigabyte-88964
03/21/2023, 4:30 PMripe-gigabyte-88964
03/21/2023, 4:33 PM- The inputs use interpreter constraints (`CPython<4,>=3.7`) that are not a subset of those used to generate the lockfile (`CPython==3.9.*`).- The input interpreter constraints are specified by your code, using the `[python].interpreter_constraints` option and the `interpreter_constraints` target field.
happy-kitchen-89482
03/21/2023, 6:26 PMbroad-processor-92400
03/21/2023, 6:40 PMpants.toml
(and elsewhere)? The ones mentioned in that second message look like the default onesripe-gigabyte-88964
03/21/2023, 7:01 PMpants.toml
I have
[python]
interpreter_constraints = [ "CPython>=3.8,<3.11" ]
enable_resolves = true
[python.resolves]
python-default = "default.lock"
pants-plugins = "plugins.lock"
[python.resolves_to_interpreter_constraints]
python-default = [ "==3.8.*" ]
pants-plugins = [ "==3.9.*" ]
Then in my lockfiles for both mypy and pytest I see
// "valid_for_interpreter_constraints": [
// "CPython<3.11,>=3.8"
// ],
ripe-gigabyte-88964
03/21/2023, 7:02 PM14:58:20.23 [ERROR] 1 Exception encountered:
Engine traceback:
in `check` goal
InvalidLockfileError: You are using the `pants-plugins` lockfile at 3rdparty/python/pants-plugins.lock with incompatible inputs.
- The inputs use interpreter constraints (`CPython<3.11,>=3.8`) that are not a subset of those used to generate the lockfile (`CPython==3.9.*`).- The input interpreter constraints are specified by your code, using the `[python].interpreter_constraints` option and the `interpreter_constraints` target field.
- To create a lockfile with new interpreter constraints, update the option `[python].resolves_to_interpreter_constraints`, and then generate the lockfile (see below).
See {doc_url('python-interpreter-compatibility')} for details.
To regenerate your lockfile, run `pants generate-lockfiles --resolve=pants-plugins`.
See <https://www.pantsbuild.org/v2.16/docs/python-third-party-dependencies> for details.
ripe-gigabyte-88964
03/21/2023, 7:09 PMripe-gigabyte-88964
03/21/2023, 7:10 PMripe-gigabyte-88964
03/21/2023, 7:30 PMripe-gigabyte-88964
03/21/2023, 7:33 PMripe-gigabyte-88964
03/21/2023, 7:38 PM- The inputs use interpreter constraints (`CPython<4,>=3.7`) that are not a subset of those used to generate the lockfile (`CPython==3.8.* OR CPython==3.9.*`).- The input interpreter constraints may be specified by `[{resolve}].interpreter_constraints` (if applicable).
But when I run pants py-constraints --summary
I only see dependencies with interpreter constraints ==3.8.*
or ==3.9.*
happy-kitchen-89482
03/21/2023, 9:23 PM