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

Add a test to check that no old msgid or symbol are used #5839

Merged
merged 7 commits into from
Feb 26, 2022

Conversation

Pierre-Sassoulas
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas commented Feb 25, 2022

Type of Changes

Type
🐛 Bug fix

Description

This is a work in progress, I still need to make an exhaustive list of what was removed previously which is the hard part. I'm not sure if it's exhaustive but I can't think of any more msgid we deleted. Then we need to decide what we do when two name clash like for Message id 'W1601' cannot have both 'apply-builtin' and 'using-f-string-in-unsupported-version' as symbolic name.

I think it's better to add a simple check and later on think about making the performance better for run time checking of the existence of a message in #5607.

Closes #5729

@Pierre-Sassoulas Pierre-Sassoulas added Bug 🪲 Blocker 🙅 Blocks the next release Documentation 📗 Maintenance Discussion or action around maintaining pylint or the dev workflow labels Feb 25, 2022
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.13.0 milestone Feb 25, 2022
@coveralls
Copy link

coveralls commented Feb 25, 2022

Pull Request Test Coverage Report for Build 1902891175

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 93.997%

Totals Coverage Status
Change from base Build 1902688047: 0.002%
Covered Lines: 14937
Relevant Lines: 15891

💛 - Coveralls

@@ -15,6 +15,15 @@ Release date: TBA

Closes #352

* ``using-f-string-in-unsupported-version`` and ``using-final-decorator-in-unsupported-version`` msgids
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, this is difficult. This is an important change, but this is technically breaking... Should it be in 3.0?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to fix this "fast" as we don't want to have a lot of content on the web with W1601 and W1602 meaning the new message. The breaking change is reasonable imo as it only breaks disable using msgid and not the symbol directly. (Also, the symbol should be preferred we even have a check for that so it's probably not affecting a lot of users ?)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah and I guess you could consider the previous change breaking. As in, we're reverting a previously unnoticed breaking change here.
Let's just go ahead with it.

ChangeLog Outdated Show resolved Hide resolved
ChangeLog Outdated Show resolved Hide resolved
doc/whatsnew/2.13.rst Outdated Show resolved Hide resolved
ChangeLog Outdated Show resolved Hide resolved
doc/whatsnew/2.13.rst Outdated Show resolved Hide resolved
doc/whatsnew/2.13.rst Outdated Show resolved Hide resolved
pylint/checkers/__init__.py Outdated Show resolved Hide resolved
script/get_unused_message_id_category.py Outdated Show resolved Hide resolved
tests/message/test_no_removed_msgid_or_symbol_used.py Outdated Show resolved Hide resolved
@Pierre-Sassoulas
Copy link
Member Author

The timeout for python 3.8 seems repeatable. Do we put change the value to 15 ? It could be because we're calculating the coverage for 3.8, but it seems we're doing

      - name: Upload coverage artifact
        uses: actions/[email protected]
        with:
          name: coverage-${{ matrix.python-version }}
          path: .coverage

for all python version. And the other interpreter all take less than 4mn.

@Pierre-Sassoulas
Copy link
Member Author

Let me rebase on #5841 :)

Copy link
Collaborator

@DanielNoord DanielNoord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small changes and questions. Rest looks good to go!

ChangeLog Show resolved Hide resolved
tests/message/test_no_removed_msgid_or_symbol_used.py Outdated Show resolved Hide resolved
tests/message/test_no_removed_msgid_or_symbol_used.py Outdated Show resolved Hide resolved
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 this pull request may close these issues.

Pylint needs to forbid to re-use the msgid or symbol of old deleted msgid/symbol
3 participants