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

Deprecate is_typing_guard and is_sys_guard #1202

Merged
merged 2 commits into from
Oct 6, 2021

Conversation

Pierre-Sassoulas
Copy link
Member

Description

See pylint-dev/pylint#5107 (comment) for context.

Type of Changes

Type
βœ“ πŸ”¨ Refactoring
βœ“ πŸ“œ Docs

Related Issue

References #1199

@Pierre-Sassoulas Pierre-Sassoulas added Maintenance Discussion or action around maintaining astroid or the dev workflow deprecation labels Oct 6, 2021
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.8.1 milestone Oct 6, 2021
@@ -2870,6 +2871,10 @@ def is_sys_guard(self) -> bool:
>>> node.is_sys_guard()
True
"""
warnings.warn(
"The 'is_sys_guard' function is deprecated and will be removed in astroid 3.0.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would re-add these to pylint first and tell people about that in the warning. Give them a possibility to keep using the function, although from another place!

Copy link
Member Author

Choose a reason for hiding this comment

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

Makes sense, good call.

ChangeLog Outdated Show resolved Hide resolved
ChangeLog Outdated Show resolved Hide resolved
@DanielNoord
Copy link
Collaborator

I think referring to the changelog/pylint in the actual warning would be user-friendly!

@Pierre-Sassoulas Pierre-Sassoulas merged commit 395bfbd into main Oct 6, 2021
@Pierre-Sassoulas Pierre-Sassoulas deleted the deprecate-is-sys-guard branch October 6, 2021 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deprecation Maintenance Discussion or action around maintaining astroid or the dev workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants