chore: tox toml#1033
Conversation
22e0f50 to
81528c9
Compare
| flags: tests | ||
| env_vars: PYTHON | ||
| name: ${{ matrix.py }} - ${{ matrix.os }} | ||
| name: ${{ matrix.py }} - ${{ matrix.os }} - ${{ matrix.tox-target }} |
There was a problem hiding this comment.
Unrelated change, but seems like this is needed, otherwise two jobs have the same name.
| TEST_STATUS_DIR = "{envtmpdir}" | ||
|
|
||
| [env_base.min] | ||
| factors = [["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.9", "pypy3.10", "pypy3.11"]] |
There was a problem hiding this comment.
I don't think I can use range here.
Also, I don't like that we have to make this list so many times, it would be nice if I could reuse it somehow. But maybe it's easy enough to update with AI. ¯\_(ツ)_/¯
81528c9 to
524dcf1
Compare
|
@henryiii did tox get a decent CLI UX with the new config format recently? Like show the commands I can run without learning about tox.ini and stuff? |
|
|
|
Yes, |
|
It takes sooo long. I couldn't wait. # time tox l
ROOT: will run in automatically provisioned tox, host /usr/local/bin/python3.14 is missing [requires (has)]: tox-uv
ROOT: install_deps> python -I -m pip install tox tox-uv 'tox>=4.22' 'virtualenv>=20.0.34'
^C
real 0m8.066s
user 0m1.767s
sys 0m0.184sIt appears it can not just run itself to show help and needs to create virtualenv. Or no, the rabbit hole. I am not going to get down there. :D I made a fix to remove that argparse "feature" 10 years ago, but didn't post it anywhere. |
Mean, you have an old outdated version of the tool that doesn't support the new features; so needs to install a newer version of itself following https://tox.wiki/en/4.53.0/explanation.html#auto-provisioning, the speed here will depend a lot on your network. |
|
@gaborbernat it was But I can't repeat that anymore. I guess it was its local state in mounted dir that had to be updated. |
Convert the INI-format tox configuration to the recommended TOML
format (tox.toml). The environment list and all behaviours are
preserved; tox list output is identical before and after.
Key translation notes:
- [tox] top-level keys → bare top-level keys
- [testenv] → [env_run_base]
- [testenv:name] → [env.name]
- set_env → TOML subtable / inline table; empty INI value → `{}`
- commands → list of lists; `{posargs:-n auto}` → replace/default inline table
- basepython → base_python, changedir → change_dir
- Generative section `[testenv:{py314,...}-min]` (INI-only feature) expanded
into nine explicit `[env.XXX-min]` sections
Assisted-by: Copilot:claude-sonnet-4.6
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Replace nine identical `[env.XXX-min]` sections with a single `[env_base.min]` template. The env_base factors mechanism generates min-py314, min-py313, ... (prefix ordering is required by TOML's env_base, which always prepends the template name). env_list uses a product dict to keep the min variants concise. coverage.depends is updated to the new names. Assisted-by: Copilot:claude-sonnet-4.6 Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
2dae265 to
c161522
Compare
pip 23.2 fails on Python 3.15 with: TypeError: Can't instantiate abstract class WheelDistribution without an implementation for abstract method 'locate_file' WheelDistribution.locate_file() was added in pip 25.0 (January 2025). Assisted-by: Copilot:claude-sonnet-4.6 Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
pip 25.0/25.1 fail on Python 3.15 with: AttributeError: module 'typing' has no attribute 'no_type_check_decorator' typing.no_type_check_decorator was removed in Python 3.15. pip's vendored typing_extensions still referenced it until pip 25.3. Assisted-by: Copilot:claude-sonnet-4.6 Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
There was a problem hiding this comment.
Pull request overview
This PR migrates the project’s tox configuration from tox.ini to tox.toml, updating CI, packaging, and docs to reference the new config file.
Changes:
- Replace
tox.iniwith a newtox.tomltox configuration (including generated env lists and tox-uv integration). - Update CI workflows and release/docs references to use the new tox env naming and config file.
- Adjust packaging/test fixtures to include
tox.tomlin sdists and update constraints for newer Python/pip.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tox.toml | New tox TOML configuration replacing the removed tox.ini. |
| tox.ini | Removed legacy tox INI configuration. |
| tests/test_self_packaging.py | Updates sdist expectations to include tox.toml instead of tox.ini. |
| tests/constraints.txt | Updates pip constraints for newer Python versions. |
| pyproject.toml | Updates flit sdist include list to ship tox.toml. |
| docs/development/release.rst | Updates documentation reference from tox.ini to tox.toml. |
| docs/development/contributing.rst | Updates contributor docs with new tox invocation examples. |
| .pre-commit-config.yaml | Removes tox-ini-fmt hook since tox.ini is removed. |
| .github/workflows/reusable-pytest.yml | Adjusts tox env selection logic to match the new env naming scheme. |
| .github/workflows/reusable-change-detection.yml | Updates change-detection filters to track tox.toml instead of tox.ini. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
c80d4a6 to
a2fa274
Compare
Signed-off-by: Henry Schreiner <henryfs@princeton.edu>
Description
This is an attempt to convert the tox.ini to tox.toml. I started
by pointing copilot at the tox documentation for configuration.
I then asked it to use a generative list, telling it it was okay to reverse
the order
...-mintomin-....Still need to:
🤖 I'm manually using Linux's
Assisted-bytrailer for comments. UsedCopilot:claude-sonnet-4.6Changelog
docs/changelog/<pr_number>.<type>.rstfeature,bugfix,doc,removal,misc123.feature.rstcontainingAdd custom backend support - by :user:`yourname`Checklist
tox)tox -e fix)tox -e type)tox -e docs)