
On Wed, Jan 27, 2016 at 11:02 PM, sebastian <sebastian@sipsolutions.net> wrote:
On 2016-01-27 21:01, Ralf Gommers wrote:
One issue will be how to keep this consistent. `stacklevel` is used so rarely that new PRs will always omit it for new warnings. Will we just rely on code review, or would a private wrapper around `warn` to use inside numpy plus a test that checks that the wrapper is used everywhere be helpful here?
Yeah, I mean you could add tests for the individual functions in principle. I am not sure if adding an alias helps much, how are we going to test that warnings.warn is not being used? Seems like quite a bit of voodoo necessary for that.
I was thinking something along these lines, but with a regexp checking for warnings.warn: https://github.com/scipy/scipy/blob/master/scipy/fftpack/tests/test_import.p... Probably more trouble than it's worth though. Ralf