Fix docs environment to Python 3.12.#1942
Conversation
|
FWIW, while I philosophically support this change, I expect some subset of contributors to not understand how to satisfy this requirement....and it's usually non-trivial to explain to someone how to set up side-by-side Python installs 🫤 |
tox.ini
Outdated
| sphinx_args = --show-traceback --fail-on-warning --keep-going --jobs auto | ||
|
|
||
| [testenv:docs{,-lint,-all,-live}] | ||
| basepython = python3.12 |
There was a problem hiding this comment.
For consistency :) or perhaps the coverage section could be updated to match this
| basepython = python3.12 | |
| base_python = py312 |
There was a problem hiding this comment.
WHY ARE THERE TWO VALID SYNTAXES FOR THIS!!>!!KJHKJH!OI&!^&!
|
I agree this is a concern. However, the Sphinx ecosystem is making supporting "all valid Python versions" exceedingly difficult (deprecating Python 3.9 a full year before it goes EOL), and there are some advantages (such as being consistent with RTD rendering) that I think it's worth the pain. If it turns out that it's more trouble than wrangling version dependencies, we can easily revert this and find another way to keep dependabot happy. |
|
We now have 4 places referencing the Python version number. There's a very good chance that we'll forget one of them next time we have to update this. Three of them are unavoidable: contribute-docs.rst, tox.ini and readthedocs.yaml. But they should each have a comment referencing the other two. In pyproject.toml we can simply remove the expicit Python version number and change it to something like "Docs are always built on a specific Python version; see ...". |
The changes in #1940 didn't have the desired effect on dependabot (see #1937).
This takes a different approach - since RTD always uses Python3.12 as the build environment, we can force tox to also use Python3.12 as a development environment. This radically simplifies dependency configuration (as we only
need to worry about a single Python version), and eliminates a potential source of bugs (as different Python versions can render details like type annotations differently).
PR Checklist: