-
-
Notifications
You must be signed in to change notification settings - Fork 31.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: Ensure no warnings are found in the NEWS file before a given line number #119221
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if the error message referenced the specific blurb file instead of the giant NEWS file, but I understand that would be difficult to achieve.
Thanks, this is a great improvement.
This reverts commit 2ff144f.
Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
Sorry, @hugovk, I could not cleanly backport this to
|
Sorry, @hugovk, I could not cleanly backport this to
|
…iven line number (pythonGH-119221) (cherry picked from commit 034cf0c) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
…ne number (python#119221) (cherry picked from commit 034cf0c)
GH-119261 is a backport of this pull request to the 3.13 branch. |
GH-119261 is a backport of this pull request to the 3.13 branch. |
GH-119266 is a backport of this pull request to the 3.12 branch. |
…iven line number (pythonGH-119221) (cherry picked from commit 034cf0c) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Re: #118694 (comment)
We have tooling in place to ensure reST files under
Doc/
don't introduce new Sphinx reference warnings.We ignore those that are in
.nitignore
because they've not been "cleaned" yet, because we don't want to hassle people over warnings which they didn't introduce.Similarly, we ignore the news files under
Misc/NEWS.d/
, because during the Sphinx build, blurb compiles then into a giant 45k linebuild/NEWS
which has 700+ warnings (and growing, because we don't check them).We do lint the news files with Sphinx Lint, but that doesn't catch everything, especially not bad references.
And so we don't want to warn for every single PR that adds a small NEWS blurb about those 700 warnings that they didn't introduce.
New entries are added to the top of the compiled NEWS file.
This PR adds a check to ensure the top 200 lines remain clean. Most NEWS entries are under 10 lines long, and the biggest right now is 18 lines, so checking the top 200 will prevent new warnings being introduced.
I cleaned the top 200 lines (3 news files), but also introduced one temporarily to demonstrate how the CI fails. I'll revert that commit before merge.
📚 Documentation preview 📚: https://cpython-previews--119221.org.readthedocs.build/