Repository navigation
Doc workflow is failing due to a missing file 'Doc/sphinx-warnings.txt' #118401
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Apr 29, 2024 - changed the title
[-]Doc workflow is failing due to a missing file[/-][+]Doc workflow is failing due to a missing file 'Doc/sphinx-warnings.txt'[/+]on Apr 29, 2024 We upgraded Sphinx an hour ago: #118397
Thanks for the report, I'll check it.
This is what's happening:
The PR branch still has the old Sphinx 7.2:
The error on the CI is actually in the previous step:
https://github.com/python/cpython/actions/runs/8883326110/job/24389960128?pr=118368#step:6:23
sphinx-build: error: unrecognized arguments: --quiet --nitpicky --fail-on-warning --warning-file
These long options were only added in Sphinx 7.3, and added to the workflow in #118397:
make -C Doc/ PYTHON=../python SPHINXOPTS="--quiet --nitpicky --fail-on-warning --keep-going --warning-file sphinx-warnings.txt" htmlBut your PR branch still has the short options:
make -C Doc/ PYTHON=../python SPHINXOPTS="-q -n -W --keep-going -w sphinx-warnings.txt" htmlSo it looks like, because the CI is started from a
pull_requesttrigger (and notpush), GitHub is installing Sphinx 7.2 as defined in your branch, but then running the Sphinx 7.3 command frommain, and not the workflow from your branch?The quick solution is to update your branch from
main. But this will happen to other PRs too (I just saw another PR reference this issue as I was typing :), so instead I'll revert the changes to keep using the short options for longer.Reacted by Serhiy StorchakaPlease see PR #118403.
- added a commit that references this issue
on Apr 29, 2024 Merged.
I restarted this docs build and it failed again:
https://github.com/python/cpython/actions/runs/8883326110/job/24395466270?pr=118368
It probably needs a new commit to re-sync or something? I updated the PR from
main, and it now passed 👍https://github.com/python/cpython/actions/runs/8885080408/job/24395617997?pr=118368
Hopefully it won't happen again for new PRs.
Thanks!
Bug report
Bug description:
Example: https://github.com/python/cpython/actions/runs/8883326110/job/24389960128?pr=118368
The
'Doc/sphinx-warnings.txt'file is a generated file so maybe we upgraded sphinx at some point and the new version does not generate the file if there's no warnings?CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs