Document permanentely deleted messages#11051
Open
Pierre-Sassoulas wants to merge 7 commits into
Open
Conversation
Generate a redirect-style page for every entry in ``DELETED_MESSAGES_IDS`` (and for their old names) so that symbols like ``print-statement`` are searchable on the docs site, with a link to the PR or release notes that explain the removal. The new pages are also listed in the messages overview under a per-category "All permanently deleted messages" toctree, next to the renamed ones. Closes pylint-dev#6670
Each ``DeletedMessage`` entry can now carry the original short message text the symbol used to emit and the first pylint release that no longer ships it, recovered from ``git show <removal-commit>~1:<source>`` and ``git tag --contains <commit> | sort -V | head -1`` respectively. The documentation extension surfaces both on the per-symbol redirect page so readers know what the symbol used to mean and when it stopped existing. Also drops a duplicate ``W1601 apply-builtin`` entry that was listed twice under the PR pylint-dev#4942 group. Refs pylint-dev#6670
`_get_deleted_messages` already flattens the source dict; thread the `DeletedMessage` plus the two extra bits (the removal-reason URL and the canonical symbol for old-name entries) through as a tuple instead of wrapping them in a separate NamedTuple that duplicated four fields of the source type.
The example-code literalinclude paths were computed relative to ``Path.cwd()``, so running ``sphinx-build`` from the repository root (rather than from ``doc/`` as ``tox -e docs`` does) produced paths with a doubled ``doc/doc/...`` prefix and emitted "Include file not found" warnings. Anchor on ``PYLINT_BASE_PATH / "doc"`` so the path is correct regardless of the working directory.
Moving ``removed_in`` and ``original_message`` onto the runtime ``DeletedMessage`` NamedTuple broke positional unpacking in ``test_no_removed_msgid_or_symbol_used`` and added doc-only baggage to a runtime type. Pull the metadata back into ``doc/exts/pylint_messages.py`` as a sidecar dict keyed by symbol; ``DeletedMessage`` returns to its three-field shape.
Contributor
|
🤖 Effect of this PR on checked open source code: 🤖 Effect on home-assistant: The following messages are now emitted: Details
This comment was generated for commit 6fcfd35 |
Fold the removal version into the lead sentence ("has been removed in
pylint 2.6.0") instead of trailing it on its own line, drop the
"permanently" qualifier throughout, and replace ``%s`` placeholders in
the captured original-message strings with concrete example values so
the code block reads like something the user could have seen on screen.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #11051 +/- ##
=======================================
Coverage 96.24% 96.24%
=======================================
Files 178 178
Lines 19709 19709
=======================================
Hits 18968 18968
Misses 741 741 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type of Changes
Description
Closes #6670. It has all the info, we can make it pretty and add little emojis like ruff do in another PR.