-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add deprecated-attribute message
#8857
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
Merged
Pierre-Sassoulas
merged 24 commits into
pylint-dev:main
from
AmanSal1:Attribute_message
Oct 29, 2023
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
f41828d
Added the message for deprecated attribute.
AmanSal1 7991753
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 5063ba8
Register message, add one deprecated attribute, adjust logic
jacobtylerwalls 81421f0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] bad6c98
Address failing tests
jacobtylerwalls 1b31042
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 16ae5ab
Remove old_names
jacobtylerwalls b9b11d8
Remove Container
jacobtylerwalls 3df5647
Use qname
jacobtylerwalls beec69c
shared: True
jacobtylerwalls 2a25f5a
Add further 3.12 deprecations
jacobtylerwalls e2bf5c0
Add news
jacobtylerwalls 2a310c6
Add functional test
jacobtylerwalls ac275d7
Fix tests
jacobtylerwalls 9b1e4c0
Document message with examples
jacobtylerwalls d6e06d9
Merge branch 'main' into Attribute_message
jacobtylerwalls dfeda75
Update bad.py
jacobtylerwalls 9ac41f2
Bump Python to 3.12 on remaining CI jobs
jacobtylerwalls 81a2574
Revert "Bump Python to 3.12 on remaining CI jobs"
jacobtylerwalls 065d0bd
Add further deprecated items
jacobtylerwalls efe03a4
Update example
jacobtylerwalls 934540b
Add deprecated-attribute to overview table
jacobtylerwalls c69302c
Upgrade feature.rst with new doc
Pierre-Sassoulas b8eae93
missing whitespace
Pierre-Sassoulas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,2 @@ | ||
| This message can be raised on your own code using a `custom deprecation checker`_ (follow link for a full example). | ||
|
|
||
| Loading this custom checker using ``load-plugins`` would start raising ``deprecated-argument``. | ||
|
|
||
| The actual replacement then need to be studied on a case by case basis by reading the | ||
| deprecation warning or the release notes. | ||
|
|
||
| .. _`custom deprecation checker`: https://github.com/pylint-dev/pylint/blob/main/examples/deprecation_checker.py | ||
| The actual replacement needs to be studied on a case by case basis | ||
| by reading the deprecation warning or the release notes. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| from configparser import ParsingError | ||
|
|
||
| err = ParsingError("filename") | ||
| source = err.filename # [deprecated-attribute] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| The actual replacement needs to be studied on a case by case basis | ||
| by reading the deprecation warning or the release notes. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| from configparser import ParsingError | ||
|
|
||
| err = ParsingError("filename") | ||
| source = err.source |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| The actual replacement need to be studied on a case by case basis | ||
| The actual replacement needs to be studied on a case by case basis | ||
| by reading the deprecation warning or the release notes. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| The actual replacement need to be studied on a case by case basis | ||
| The actual replacement needs to be studied on a case by case basis | ||
| by reading the deprecation warning or the release notes. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| The actual replacement need to be studied on a case by case basis | ||
| The actual replacement needs to be studied on a case by case basis | ||
| by reading the deprecation warning or the release notes. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| The actual replacement need to be studied on a case by case basis | ||
| The actual replacement needs to be studied on a case by case basis | ||
| by reading the deprecation warning or the release notes. |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Added a ``deprecated-attribute`` message to check deprecated attributes in the stdlib. | ||
|
|
||
| Closes #8855 |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| """Test deprecated-attribute""" | ||
|
|
||
| import calendar | ||
| print(calendar.January) # [deprecated-attribute] |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| [testoptions] | ||
| min_pyver=3.12 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| deprecated-attribute:4:6:4:22::Using deprecated attribute 'calendar.January':INFERENCE |
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.