added deprecate_nonkeyword_arguments to function where
State: closed

- xref  #41486
- generic.where. tests added / passed
- Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them.  
- whatsnew entry. -- added. 

Labels:
name: Deprecate
description: Functionality to remove in pandas

Comments:
It has failed all Azure tests on py37_32bit. Not sure what I should do now? 


Thanks a lot for the comments :) I will work on them over the weekend. 

(P.S. I am really learning a lot by reading up your comments and documents and fixing error code.  Really appreciated your patience with me. I might respond a bit slower in the coming week but be assured that I am commited to get this issue done :) 
> Glad to hear you're learning a lot from this 😄
> 
> In a different PR ([#41580 (comment)](https://github.com/pandas-dev/pandas/pull/41580#issuecomment-847241393)), Jeff has asked for `other` to be positional, so let's change this to be `allowed_args=["self", "cond"]` - sorry for having midled you!

No problem at all. I haven't made much progress because I kept running into problems each time I do a git fetch upstream and git merge upstream/master. (My understanding is that I should do this each time before I start working, right?) 

I can't merge successfully because other people are also working on the same file (which is to be expected). However, what is really confusing for me is that the merge still fails sometimes, even after I removed all my changes. Error messages are to do with uncommitted changes. Trying git commit then I start failing on other pre-commit checks, either black, flake8 or absolufy-imports.   Am I doing something stupid here? 

I bypassed the above eventually by discarding all of my changes and aborted the merge and used git checkout --theirs .
 Is this the correct way of doing it? 
Hi, 
I think I have managed to complete all of your requests now. Do you mind having another look? I might miss or revert some of my previous work because of my git merge issues. 
Morning, it seems like I failed a lot of tests again. I had to change the future warning 'stack level' back to 2, otherwise, I was failing all 'black' pre-commit tests with an error code of 123. I will do a bit more research and try to work on it later today or tomorrow. 

> Morning, it seems like I failed a lot of tests again. I had to change the future warning 'stack level' back to 2, otherwise, I was failing all 'black' pre-commit tests with an error code of 123. I will do a bit more research and try to work on it later today or tomorrow.

Hey @Jiezheng2018 - no worries, I've added a commit to fix some things up (partially to make sure this gets done in time, and partially because I'd misled you in some previous reviews 😳 ) - do you want to have a look at the recent changes?

> I had to change the future warning 'stack level' back to 2, otherwise, I was failing all 'black' pre-commit tests with an error code of 123

I'm pretty sure that's not the kind of thing the `black` formatter would complain about - perhaps you also changed something else and caused a syntax error by accident?
> Glad to hear you're learning a lot from this 😄
> 
> In a different PR ([#41580 (comment)](https://github.com/pandas-dev/pandas/pull/41580#issuecomment-847241393)), Jeff has asked for `other` to be positional, so let's change this to be `allowed_args=["self", "cond"]` - sorry for having midled you!
> 
> EDIT: you'd already set it as positional, so my comment here was worse than useless 🤦 My bad for leaving a review when I hadn't slept that well...

No worries at all. :) Now I understand the positional keyword even better, was gonna read up on it more after work today. :)  thanks a lot 
> > Morning, it seems like I failed a lot of tests again. I had to change the future warning 'stack level' back to 2, otherwise, I was failing all 'black' pre-commit tests with an error code of 123. I will do a bit more research and try to work on it later today or tomorrow.
> 
> Hey @Jiezheng2018 - no worries, I've added a commit to fix some things up (partially to make sure this gets done in time, and partially because I'd misled you in some previous reviews 😳 ) - do you want to have a look at the recent changes?
> 
> > I had to change the future warning 'stack level' back to 2, otherwise, I was failing all 'black' pre-commit tests with an error code of 123
> 
> I'm pretty sure that's not the kind of thing the `black` formatter would complain about - perhaps you also changed something else and caused a syntax error by accident?

1) Thank you very much for the fixup. That's super helpful to see how you made the changes :) 
2) I am not very sure what I did that caused the 'black' to complain so much. I did notice sometimes exactly the same code on my VS code will fail the first time and pass the second time. I might need to re-install VS code at some point or just use the terminal instead. 
thanks @Jiezheng2018