Skip to content

Conversation

crusaderky
Copy link
Contributor

Follow-up to #507.
Do not run the 'parallel' tox environment (which is hardcoded to 3.14t) twice unnecessarily:

  • once on the 3.13t CI job (but it runs python 3.14t)
  • once on the 3.14t CI job

@davidism
Copy link
Member

It seems like adding 3.13t to base_python for this env may do the right thing. I want to avoid hard coding specific versions in more places, such as CI, especially outside the matrix, because it's more likely to be missed when changing what versions we test.

@crusaderky
Copy link
Contributor Author

apologies, my tox/uv knowledge is very limited (I normally use pixi) and can't figure this out.

If I change pyproject.toml to

[tool.tox.env.parallel]
description = "check for free threading issues"
base_python = ["3.13t", "3.14t"]
commands = [[
    "pytest", "-v", "--tb=short", "--basetemp=env_tmp_dir",
    "--parallel-threads=8",
    {replace = "posargs", default = [], extend = true},
]]

then uv run --locked tox run -e parallel always runs on 3.13t.
Is there a command syntax (which I can't find in the documentation) to force 3.14t? Or should I just duplicate the environment?

[tool.tox.env.parallel-3.13t]
description = "check for free threading issues"
base_python = ["3.13t"]
commands = [[
    "pytest", "-v", "--tb=short", "--basetemp=env_tmp_dir",
    "--parallel-threads=8",
    {replace = "posargs", default = [], extend = true},
]]
[tool.tox.env.parallel-3.14t]
description = "check for free threading issues"
base_python = ["3.14t"]
commands = [[
    "pytest", "-v", "--tb=short", "--basetemp=env_tmp_dir",
    "--parallel-threads=8",
    {replace = "posargs", default = [], extend = true},
]]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants