-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
MAINT: Added stacklevel argument to warnings.warn #6424
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
Conversation
stacklevel
argument to warnings.warn
. Fixes #5945 @@ -1004,7 +1004,7 @@ def select(condlist, choicelist, default=0): | |||
# 2014-02-24, 1.9 | |||
warnings.warn("select with an empty condition list is not possible" | |||
"and will be deprecated", | |||
DeprecationWarning) | |||
DeprecationWarning, stacklevel = 2) |
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.
No spaces around the =
in keyword assignments.
Some style nitpicks... |
Umm, we don't allow tabs, use spaces please. |
a1cf3a4
to
de9a045
Compare
Fixed indentation to comply with PEP8 Used ```spacecs``` in place of ```tabs```
de9a045
to
84ae950
Compare
@charris @jaimefrio |
Does the changes meet the requirements? Kindly let me know if any additional changes are required. |
Hi @charris and @jaimefrio, Is there any issue with the patch? Kindly let me know and would try to submit the patch for the same asap. |
The changes in the PR look good to me now. Question 1: the PR summary says that this fixes #5945, but the main question in #5945 is about why a call to Question 2: any chance you could add some tests for this? I guess adding tests for all the little deprecation warning tweaks would be tiresome and of limited value, because the code will just get removed again in a few versions anyway. But for the Sorry for the slow response, and thanks for being persistent in pinging us! |
Thanks @njsmith for the inputs. I will look into the details during weekend and update the thread. |
☔ The latest upstream changes (presumably #7181) made this pull request unmergeable. Please resolve the merge conflicts. |
Can you elaborate on what needs to be done, @homu? |
@homu is a bot and will not reply. You will need to manually merge in |
This has been taken care of in #7148 along with a number of other cases, so closing this. Thanks @sumitbinnani, I apologize that we didn't get this in earlier. |
Updated
numpy/lib/function_base.py
.Fixes #5945