[Zope-dev] Re: [Checkins] SVN: zope.deprecation/trunk/ Fix
zope.deprecation.tests.warn() to have an identical signature to
Benji York
benji at zope.com
Fri Jun 27 10:32:24 EDT 2008
On Fri, Jun 27, 2008 at 10:02 AM, Jan-Wijbrand Kolman
<janwijbrand at gmail.com> wrote:
> Log message for revision 87829:
> Fix zope.deprecation.tests.warn() to have an identical signature to
> warnings.warn() [snip]
> Modified: zope.deprecation/trunk/src/zope/deprecation/tests.py
> ===================================================================
> --- zope.deprecation/trunk/src/zope/deprecation/tests.py 2008-06-27 13:38:04 UTC (rev 87828)
> +++ zope.deprecation/trunk/src/zope/deprecation/tests.py 2008-06-27 14:02:49 UTC (rev 87829)
> @@ -43,12 +43,15 @@
> """Demonstrate that deprecate() also works in a local scope."""
> deprecated('demo4', 'demo4 is no more.')
>
> -def warn(message, type_, stacklevel):
> +def warn(message, category=None, stacklevel=1):
Of course, if anyone is using keyword arguments to specify type_, then
their code will break. I don't think this is worth worrying about, but
wanted to point out that it is ever-so-slightly backward incompatible.
--
Benji York
Senior Software Engineer
Zope Corporation
More information about the Zope-Dev
mailing list