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 pre-commit hook to verify that we don't introduce DeprecationWarning #11251

Closed
vyasr opened this issue Jul 12, 2022 · 1 comment · Fixed by #11255
Closed

Add a pre-commit hook to verify that we don't introduce DeprecationWarning #11251

vyasr opened this issue Jul 12, 2022 · 1 comment · Fixed by #11255
Labels
0 - Backlog In queue waiting for assignment non-breaking Non-breaking change Python Affects Python cuDF API.

Comments

@vyasr
Copy link
Contributor

vyasr commented Jul 12, 2022

We want to always use FutureWarning to broadcast deprecations, not DeprecationWarning. @mroeschke suggested a pre-commit hook for this purpose. It should be a straightforward bash command like

if [[ `grep DeprecationWarning $FILE | wc -l` -gt 0 ]]; then
    exit 1
fi
exit 0

(not checked for syntactic correctness).

@vyasr vyasr added 0 - Backlog In queue waiting for assignment code quality Python Affects Python cuDF API. non-breaking Non-breaking change labels Jul 12, 2022
wence- added a commit to wence-/cudf that referenced this issue Jul 13, 2022
Deprecated APIs should be announced with FutureWarning, check that
changes don't accidentally introduce DeprecationWarning using a regular
expression that is hopefully specific enough. Closes rapidsai#11251.
@wence-
Copy link
Contributor

wence- commented Jul 13, 2022

pre-commit has a pygrep hook builtin, so perhaps even simpler.

rapids-bot bot pushed a commit that referenced this issue Jul 13, 2022
Deprecated APIs should be announced with FutureWarning, check that
changes don't accidentally introduce DeprecationWarning using a regular
expression that is hopefully specific enough. Closes #11251.

Authors:
  - Lawrence Mitchell (https://github.com/wence-)

Approvers:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

URL: #11255
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - Backlog In queue waiting for assignment non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants