Repository navigation
Deprecate suspicious.py? #86404
Copy link
Copy link
Closed
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee = 'https://github.com/JulienPalard'
closed_at = None
created_at = <Date 2020-11-01.23:49:23.937>
labels = ['docs']
title = 'Deprecate suspicious.py?'
updated_at = <Date 2022-04-06.11:53:50.624>
user = 'https://github.com/JulienPalard'bugs.python.org fields:
activity = <Date 2022-04-06.11:53:50.624>
actor = 'mdk'
assignee = 'mdk'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2020-11-01.23:49:23.937>
creator = 'mdk'
dependencies = []
files = []
hgrepos = []
issue_num = 42238
keywords = ['patch']
message_count = 56.0
messages = ['380167', '380169', '380171', '381075', '381802', '382219', '383149', '383171', '383292', '390898', '390904', '391163', '391164', '391177', '391182', '391185', '391209', '391212', '392165', '392177', '395311', '396567', '396568', '396774', '396891', '397792', '397802', '400259', '400324', '401123', '403523', '404067', '406575', '406604', '406654', '406810', '406978', '408724', '411565', '411571', '411636', '411642', '411983', '412135', '412136', '412355', '412377', '412382', '412403', '412980', '414984', '415860', '416639', '416643', '416759', '416861']
nosy_count = 9.0
nosy_names = ['georg.brandl', 'rhettinger', 'ned.deily', 'lukasz.langa', 'willingc', 'mdk', 'pablogsal', 'erlendaasland', 'AlexWaygood']
pr_nums = ['23313', '23802', '26575', '26966', '27238', '27945', '28137', '28827', '29636', '29652', '30879', '30981', '31097', '31977', '32070', '32292', '32329']
priority = 'normal'
resolution = None
stage = 'patch review'
status = 'open'
superseder = None
type = None
url = 'https://bugs.python.org/issue42238'
versions = []Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Activity
JulienPalard commentedon Nov 1, 2020
I was not here 21 years ago when it was introduced [1], but according to the commit message it was introduced to find leftover Latex mardown.
It tries to find 4 patterns in Sphinx node text (not in raw rst files):
::(?=[^=])| # two :: (but NOT ::=)
This one has ~100 false positive in susp-ignored.csv (pypi classifiers, slices, ipv6, ...)
:[a-zA-Z][a-zA-Z0-9]+| # :foo
This one has ~300 false positive in susp-ignored.csv (slices, C:\, ipv6, ...)
| #(seldom used by itself)This one has ~20 false positive in susp-ignored.csv (mostly reStructuredText in code-blocks)
(?<!\.)\.\.[ \t]*\w+: # .. foo: (but NOT ... else:)
This one does not have false positives.
The script, on my laptop (with a core i9), is slow (4mn20s), and it's probably way slower on the CI.
I tried to search for
suspicious is:pr in:commentson github to see if it's usefull:Case where it actually helped:
I'd go for enhancing rstlint.py (which is fast, ~1s on my laptop) a bit to try to handle the `.. literalinclude:` missing a `:` errors, and dropping suspicious.
So I'd appreciate feedback on this script, did it helped you recently?
1: 700cf28
rhettinger commentedon Nov 2, 2020
I would love to see this disappear. For me, it has been a recurring time waster.
ned-deily commentedon Nov 2, 2020
If it still does useful checks, we could just limit it to running by release managers during the release manufacturing process; it is already run then. It would still allow for problems to be caught and fixed by the RM prior to release tagging. But I don't have a strong opinion about its overall usefulness. I recall it catching at least one problem in a release I was involved with and that was probably before we had the CI checks.
JulienPalard commentedon Nov 16, 2020
Good idea Ned!
So proposed plan:
If during a few release, we notice this tool is no loger usefull we'll be able to drop it.
If we spot some errors that can be migrated to the rstlint.py we'll do.
If this tool is in fact usefull, we'll have to think about it again.
JulienPalard commentedon Nov 25, 2020
New changeset c9c6e9f by Julien Palard in branch 'master':
bpo-42238: Doc: Remove make suspicious from the CI and docs builds. (GH-23313)
c9c6e9f
JulienPalard commentedon Dec 1, 2020
I'll try to track this closely, the drop of
make suspicioushas been merged in master, but not backported yet, one week ago.Up to today, no commit has introduced suspicious warnings (0 false positive, 0 false negative).
I think I'll soon backport the PR, if no one objects, because the current situation is a bit risky: some PR could get merged to master but fail the tests during the backport.
JulienPalard commentedon Dec 16, 2020
Today I spotted one error that suspicious could have spotted:
I'm fixing it in #23800
make suspiciousfound it as:So I'll doodle around this to see if tools/rstlint.py or Sphinx itself can see the error.
JulienPalard commentedon Dec 16, 2020
I created #23802 with a port of the "wrong backtick detector" (at least, one aspect from it) from suspicious to rstlint.
I dropped the suspicious check three weeks ago, and found a single committed issue since then, which was fixable (and is fixed) in rstlint, so I'll continue this experience and see where it goes.
JulienPalard commentedon Dec 18, 2020
New changeset b973542 by Julien Palard in branch 'master':
bpo-42238: Check Misc/NEWS.d/next/ for reStructuredText issues. (GH-23802)
b973542
vstinner commentedon Apr 12, 2021
Pablo reenabled the check:
commit 20ac347 (upstream/master, master)
Author: Pablo Galindo <Pablogsal@gmail.com>
Date: Mon Apr 12 20:53:15 2021 +0100
pablogsal commentedon Apr 12, 2021
Background on why I reactivated it:
I every single alpha release I had to fix actual documentation errors (no false positives) like the one fixed here:
20ac347
I don't like the check, but the release management team don't like to have to restart the release process just fo fix a bunch of docs issues that should have been detected by the CI.
If we remove the fix, we need to coordinate all together because currently the status quo is that the RM team now is responsable of fixing the documentation errors as there are several release tools (and other ones) that depend on this target passing.
rhettinger commentedon Apr 16, 2021
If reactivated, the tool needs to be substantially improved. It is NOT smart. The false positives for slicing and logging examples are unnecessarily annoying. It creates a barrier for people submitting documentation patches. Each of the 367 entries in the susp-ignored file represents wasted time for contributors.
Also the CSV format is arcane, hard-to-read, and hard-to-edit. It looks like it was quickly thrown together by someone who didn't care about usability. Perhaps there should be a simpler tools that says, "take this current failure and mark it as a false positive" without trying to be over specific.
Mandatory checks with a high false positive rate are an anti-pattern for CI systems. Already we've had one case of a contributor (me) who abandoned a doc patch rather than fight this tooling.
pablogsal commentedon Apr 16, 2021
I agree with all you said, but I am against forcing the release management team to absorb the responsibility of fixing all the errors that the CI didn't catch, real or not. Releasing is already a multi-hour process and having many docs errors and formating mistakes to fix is a toll that should be paid at release time.
56 remaining items
[3.11] gh-86404: [doc] Fix missing space in idle documentation. (GH-9…
gh-86404: [doc] Two 'make suspicious' false positives. (GH-94407)
pythongh-86404: [doc] Fix missing space in idle documentation. (pytho…
pythongh-86404: [doc] Two 'make suspicious' false positives. (pythonG…
Doc: Drop now unused make suspicious and rstlint.
Doc: Drop now unused make suspicious and rstlint.
Doc: Drop now unused make suspicious and rstlint.
gh-86404: Doc: Drop now unused make suspicious and rstlint. (GH-98179)
vstinner commentedon Oct 11, 2022
Congrats @JulienPalard for sphinx-lint!
pythongh-86404: Doc CI: Disable suspicious checks.
[3.10] gh-86404: Doc CI: Disable suspicious checks. (GH-26575) (GH-98221