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

Added support for deprecated method alias #4619

Merged
merged 5 commits into from
Jun 29, 2021

Conversation

matusvalo
Copy link
Collaborator

Steps

  • Add yourself to CONTRIBUTORS if you are a new contributor.
  • Add a ChangeLog entry describing what your PR does.
  • If it's a new feature or an important bug fix, add a What's New entry in
    doc/whatsnew/<current release.rst>.
  • Write a good description on what the PR does.

Description

This PR adds support for deprecated methods/functions which are just aliases to new names.
Examples of such methods/functions:

  • threading.currentThread
  • threading.activeCount
  • threading.Condition.notifyAll
  • threading.Event.isSet
  • threading.Thread.setName
  • threading.thread.getName
  • threading.Thread.isDaemon
  • threading.Thread.setDaemon

Type of Changes

Type
βœ“ πŸ› Bug fix
✨ New feature
πŸ”¨ Refactoring
πŸ“œ Docs

Related Issue

Closes #4618

@Pierre-Sassoulas Pierre-Sassoulas added Enhancement ✨ Improvement to a component False Negative πŸ¦‹ No message is emitted but something is wrong with the code labels Jun 27, 2021
@coveralls
Copy link

coveralls commented Jun 27, 2021

Coverage Status

Coverage increased (+0.002%) to 92.041% when pulling f5356e6 on matusvalo:deprecated_methods into 3d6389b on PyCQA:master.

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

Thank you for this new feature, I have a small remark, before merging but this look great πŸ‘

tests/checkers/unittest_deprecated.py Show resolved Hide resolved
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.9.0 milestone Jun 28, 2021
@Pierre-Sassoulas Pierre-Sassoulas merged commit eeb6eea into pylint-dev:master Jun 29, 2021
@matusvalo matusvalo deleted the deprecated_methods branch June 29, 2021 19:42
@matusvalo
Copy link
Collaborator Author

Thank you @Pierre-Sassoulas ! I come here to implement your feedback, but it seems you were faster :-D.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ Improvement to a component False Negative πŸ¦‹ No message is emitted but something is wrong with the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecated checker is not able to detect deprecated aliases to existing functions/methods
3 participants