[issue5420] Queue deprecation warning patch
Tennessee Leeuwenburg
report at bugs.python.org
Fri Mar 6 01:25:35 CET 2009
Tennessee Leeuwenburg <tleeuwenburg at gmail.com> added the comment:
Hi JP,
I experimented with stacklevel but to be honest nothing I saw appeared
greatly more useful than the default for the tests in question.
What form would the unit tests take? Trying to assert that empty() and
full() raised a deprecation warning? I'm not sure how I would go about that,
but I'll see what I can do.
Thanks,
-Tennessee
On Thu, Mar 5, 2009 at 3:00 PM, Jean-Paul Calderone
<report at bugs.python.org>wrote:
>
> Jean-Paul Calderone <exarkun at divmod.com> added the comment:
>
> Unit tests are a great thing as well. Also, the deprecation warnings
> you've added are the really annoying kind. They refer to users to the
> source of the deprecated methods themselves! A vastly preferable use of
> the warnings system is to refer users to the *callers* of the deprecated
> methods. Try passing different values for the stacklevel parameter of
> the warnings.warn function until you get a warning that is more helpful.
>
> ----------
> nosy: +exarkun
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue5420>
> _______________________________________
>
Added file: http://bugs.python.org/file13252/unnamed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5420>
_______________________________________
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: unnamed
URL: <http://mail.python.org/pipermail/python-bugs-list/attachments/20090306/0ecb3d28/attachment.txt>
More information about the Python-bugs-list
mailing list