<@U01PZK60W2F> Trying out the new multi parametriz...
# development
r
@curved-television-6568 Trying out the new multi parametrize logic in 2.19.0rc4 and I'm getting the following error from it. Here's my defaults block
Copy code
__defaults__(
    {
        (python_test, python_tests): {
            **parametrize("py38", interpreter_constraints=["==3.8.*"], resolve="py38", environment="py38"),
            **parametrize("py311", interpreter_constraints=["==3.11.*"], resolve="py311", environment="py311")
        },
        (python_source, python_sources, python_test_utils): {
            **parametrize("py38", interpreter_constraints=["==3.8.*"], resolve="py38"),
            **parametrize("py311", interpreter_constraints=["==3.11.*"], resolve="py311")
        },
    },
    extend=True,
)
And the error I'm getting
Copy code
Unrecognized field `parametrize_-8470896455302443883:580806178752=parametrize('py38', interpreter_constraints=('==3.8.*',), resolve='py38')` in target <my target>. Valid fields for the target type `python_sources`: ['dependencies', 'description', 'interpreter_constraints', 'overrides', 'resolve', 'restartable', 'run_goal_use_sandbox', 'skip_black', 'skip_docformatter', 'skip_isort', 'skip_mypy', 'skip_ruff', 'sources', 'tags'].
👍 1
Okay I'm getting an error for non-defaults too so there's definitely something screwy in my env
Looks like this doesn't work for target generators / defaults. I got it working for an individual
python_source
target.
c
ooohhh... ok. Thanks for filing, will take a look at it.
Fix in https://github.com/pantsbuild/pants/pull/20429 It would be nice to get this into 2.19.0 (I do realize it's really late to the party, but it's a fix for a new feature and this is kind of crucial to make it generally useful) cc @happy-kitchen-89482
h
I'll get it in to 2.19.0rc5
🙏 1