-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Refactor and deprecate resolving of interface implementations in pyreverse
#6713
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
Refactor and deprecate resolving of interface implementations in pyreverse
#6713
Conversation
Pull Request Test Coverage Report for Build 2397637286
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great clean up, apparently it was 16 years overdue 😂
* ``pyreverse``: Resolving and displaying implemented interfaces that are defined by the ``__implements__`` | ||
attribute has been deprecated and will be removed in 3.0. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done 😊
warnings.warn( | ||
"pyreverse will drop support for resolving and displaying implemented interfaces in pylint 3.0. " | ||
"The implementation relies on the '__implements__' attribute proposed in PEP 245, which was rejected " | ||
"in 2006.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, 2006 😄 I was copy pasting javascript and basic for high school calculator at the time.
Co-authored-by: Pierre Sassoulas <[email protected]>
…eNr33/pylint into refactor-pyreverse-inspector
* ``pylint.pyreverse.ASTWalker`` has been removed, as it was only used internally by a single child class. | ||
|
||
Ref #6712 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is now under "Deprecations" in order to be grouped with #6713, although this is technically not a deprecation but a hard removal. Let me know if that's OK for you to put it there.
@@ -110,7 +110,7 @@ class Concrete23(Concrete1): pass | |||
("Concrete0", ["MyIFace"]), | |||
("Concrete1", ["MyIFace", "AnotherIFace"]), | |||
("Concrete2", ["MyIFace", "AnotherIFace"]), | |||
("Concrete23", ["MyIFace", "AnotherIFace"]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason this test changed is that the unit test actually used the default value of True
for the now removed herited
parameter, but in production this parameter was always False
. So after removing the parameter from the function signature I had to update this test case accordingly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
doc/whatsnew/<current release.rst>
.and preferred name in
script/.contributors_aliases.json
Type of Changes
Description
Ref #6582
As we also deprecated the use of
__implements__
in our own codebase, deprecating thepyreverse
functionality to resolve and display implemented interfaces is the right consequence.To make this change transparent for users, a
DeprecationWarning
will be issued when such an__implements__
attribute has been found.Additionally, I removed parameters and checks that were always constant in production use of the code.