Skip to content

Document permanentely deleted messages#11051

Open
Pierre-Sassoulas wants to merge 7 commits into
pylint-dev:mainfrom
Pierre-Sassoulas:document-deleted-messages-redo
Open

Document permanentely deleted messages#11051
Pierre-Sassoulas wants to merge 7 commits into
pylint-dev:mainfrom
Pierre-Sassoulas:document-deleted-messages-redo

Conversation

@Pierre-Sassoulas

@Pierre-Sassoulas Pierre-Sassoulas commented May 27, 2026

Copy link
Copy Markdown
Member

Type of Changes

Type
📜 Docs

Description

Closes #6670. It has all the info, we can make it pretty and add little emojis like ruff do in another PR.

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.
@github-actions

Copy link
Copy Markdown
Contributor

🤖 Effect of this PR on checked open source code: 🤖

Effect on home-assistant:

The following messages are now emitted:

Details
  1. import-private-name:
    Imported private module (_collections_abc)
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/smlight/binary_sensor.py#L5

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

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.24%. Comparing base (880b90d) to head (af033d0).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Pierre-Sassoulas Pierre-Sassoulas marked this pull request as ready for review May 27, 2026 19:28
@Pierre-Sassoulas Pierre-Sassoulas added Needs review 🔍 Needs to be reviewed by one or multiple more persons and removed Work in progress labels May 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation 📗 Needs review 🔍 Needs to be reviewed by one or multiple more persons

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deleted messages and checkers are still being searched on ReadTheDoc but they are not documented at all in latest version

1 participant