tox
tox copied to clipboard
Use tomllib from the standard library on Python 3.11+
Fallback to tomli, which has the same API.
Fixes https://github.com/tox-dev/tox/issues/2462
Contribution checklist:
(also see CONTRIBUTING.rst for details)
- [x] wrote descriptive pull request text
- [ ] added/updated test(s)
- [ ] updated/extended the documentation
- [x] added relevant issue keyword in message body
- [ ] added news fragment in changelog folder
- fragment name:
<issue number>.<type>.rst
for example (588.bugfix.rst) -
<type>
is must be one ofbugfix
,feature
,deprecation
,breaking
,doc
,misc
- if PR has no issue: consider creating one first or change it to the PR number after creating the PR
- "sign" fragment with
-- by :user:`<your username>`.
- please, use full sentences with correct case and punctuation, for example:
Fixed an issue with non-ascii contents in doctest text files -- by :user:`superuser`.
- also see examples
- fragment name:
- [x] added yourself to
CONTRIBUTORS
(preserving alphabetical order)
Looks good to me!
But neither tox nor gh actions run Python 3.11.
@gaborbernat What do you think? Are you ok with the changes? This would mean we need to run CI with Python 3.11 beta.
But neither tox nor gh actions run Python 3.11.
Yeah, we need to change that before we merge this. I'll add 3.11 to virtualenv today and then move to tox.
Is the Python 2 compatibility no longer a concern?
Is the Python 2 compatibility no longer a concern?
The information is split between the issue and the pr.
@gaborbernat The Python 2 comp was discussed at https://github.com/tox-dev/tox/issues/2462#issuecomment-1192926874
Seems we'll need to fallback to toml on python 2.
Yes. See my fixup: Fallback to toml, not tomli, for Python 2 support commit which can still be seen here at github. It seems to have been erased away.
Because you've fallen back to toml on Python 3.11 or less and not just Python 2. 🤔
So you'd prefer a three-way split? I can do that, I just considered it a bit redundant.
So you'd prefer a three-way split? I can do that, I just considered it a bit redundant.
Yes.
Looks like 3.5 will also need toml. Will update this later today.
This seems to work. At least on cpythons.
Let me know if you prefer to use toml also on 3.6 and pin tomli to 2+.
Let me know if you want me to rebase or squash somehow.
Let me know if you prefer to use toml also on 3.6 and pin tomli to 2+.
I've done that now. Feel free to revert the commit.