diff options
author | Matthias Bussonnier <bussonniermatthias@gmail.com> | 2018-09-25 10:09:57 -0700 |
---|---|---|
committer | Matthias Bussonnier <bussonniermatthias@gmail.com> | 2018-09-25 14:02:33 -0700 |
commit | 2523097cab9fea3da5072ee2fd84a6a5fac42bbc (patch) | |
tree | bc4436d5491de7e15874de255d9ef11801681f24 /numpy/testing/utils.py | |
parent | 5f2a5ae02dee34469d27896249f71deaa0c6de24 (diff) | |
download | numpy-2523097cab9fea3da5072ee2fd84a6a5fac42bbc.tar.gz |
MAINT: add version since deprecation in the deprecation message.
Otherwise the deprecation message is not that helpful as I have to dig
through the source to find out since when and whether conditional import
is necessary in my code. I may not have numpy on my dev machine (this
message was on CI). So it's one extra step for the consumer.
That's also for you, you have more chance of having consumer update
their code when they have more informations in the deprecation message,
so you can drop old code faster !
At least kudo to Charles Harris for including a comments just above,
that prevented me from having to git blame and go spelunking for knowing
which versions were or not affected.
Diffstat (limited to 'numpy/testing/utils.py')
-rw-r--r-- | numpy/testing/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py index 184adcc74..98f19e348 100644 --- a/numpy/testing/utils.py +++ b/numpy/testing/utils.py @@ -8,8 +8,8 @@ from __future__ import division, absolute_import, print_function import warnings # 2018-04-04, numpy 1.15.0 -warnings.warn("Importing from numpy.testing.utils is deprecated, " - "import from numpy.testing instead.", +warnings.warn("Importing from numpy.testing.utils is deprecated " + "since 1.15.0, import from numpy.testing instead.", ImportWarning, stacklevel=2) from ._private.utils import * |