cool-easter-32542
04/02/2024, 1:35 PMpython_source target in the same directory as a python_test target. Both are parametrized for multiple resolves/environments/interpreter constraints. The python_test target in question does not import the python_source target but instead calls it via the subprocess module, so I have the python_source target as an explicit dependency of the python_test one. This is causing an error because the python_test target is grabbing the first parametrization as the dependency instead of the matching one. pants peek output below:
{
"address": "my/python/tests/test_the_thing.py@parametrize=py311",
"target_type": "python_test",
"batch_compatibility_tag": null,
"dependencies": [
"my/inferred_dep/__init__.py@parametrize=py311",
"my/python/tests/__init__.py:sources_for_tests@parametrize=py38",
"my/python/tests/source_for_test.py:sources_for_tests@parametrize=py38"
],
"dependencies_raw": [
":sources_for_tests"
],
"description": null,
"environment": "py311-test",
"extra_env_vars": null,
"interpreter_constraints": [
"==3.11.*"
],
"resolve": "py311",
"run_goal_use_sandbox": null,
"runtime_package_dependencies": null,
"skip_black": false,
"skip_docformatter": false,
"skip_isort": false,
"skip_mypy": true,
"skip_ruff": true,
"skip_tests": false,
"source_raw": "test_the_thing.py",
"sources": [
"my/python/tests/test_the_thing.py"
],
"sources_fingerprint": "b1274e36d37387cc0fca9f18cd77e456483663e6ac869ec1ecce9aaa502a8d83",
"tags": null,
"timeout": null,
"xdist_concurrency": null
}
Pants version
2.19.1
OS
Intel Mac
pantsbuild/pantscool-easter-32542
04/12/2024, 7:20 AM