Skip to content
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

Pylint needs to forbid to re-use the msgid or symbol of old deleted msgid/symbol #5729

Closed
Pierre-Sassoulas opened this issue Jan 26, 2022 · 2 comments · Fixed by #5839
Closed
Assignees
Labels
Blocker 🙅 Blocks the next release Bug 🪲 Documentation 📗 Maintenance Discussion or action around maintaining pylint or the dev workflow
Milestone

Comments

@Pierre-Sassoulas
Copy link
Member

Pierre-Sassoulas commented Jan 26, 2022

Bug description

Right now it's possible to reuse old msgid that were removed, for example, everything from the python 3 checker (the problem was detected with using-f-string-in-unsupported-version vs apply-builtin), or mixed-indentation, bad-whitespace, bad-continuation... maybe other that I don't remember that we deleted.

We have a mechanism in place for renamed message with old_name, but nothing for removed message.

Related to #5723 and #5607

This is going to cause occasional bug, but more than that confusion and inconsistencies when searching for the msgid online.

Expected behavior

Impossible to use an old message id or symbol.

@Pierre-Sassoulas Pierre-Sassoulas added Bug 🪲 Documentation 📗 Maintenance Discussion or action around maintaining pylint or the dev workflow labels Jan 26, 2022
@DanielNoord
Copy link
Collaborator

I would suggest to see if we can find a way to do this in the form of a test. Registering a dict of old_names during runtime unnecessarily impacts performance. We could do something similar to how I recently added a check for non overlapping symbol prefixes.

@Pierre-Sassoulas
Copy link
Member Author

Pierre-Sassoulas commented Jan 26, 2022

Registering a dict of old_names during runtime unnecessarily impacts performance.

I completely agree, I think we should probably generate an efficient and pre-checked message store that's why I think it's related to #5607. See PyCQA/flake8#1545 for what I have in mind: There's code generation with a check that it's up to date (I don't expect 10% better performance though 😄 ).

@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.13.0 milestone Jan 28, 2022
@Pierre-Sassoulas Pierre-Sassoulas added the Blocker 🙅 Blocks the next release label Jan 28, 2022
@Pierre-Sassoulas Pierre-Sassoulas self-assigned this Feb 10, 2022
Pierre-Sassoulas added a commit that referenced this issue Feb 26, 2022
* Add deleted msgid and symbol from the Python 3K+ checker and other deleted checks.

See #4942

Closes #5729

Co-authored-by: Daniël van Noord <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocker 🙅 Blocks the next release Bug 🪲 Documentation 📗 Maintenance Discussion or action around maintaining pylint or the dev workflow
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants