From 5147747a00d7b680e0972a2e80098c4273a88289 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Tue, 22 May 2012 20:00:35 +0000 Subject: Drop explicit DeprecationWarnings for "class advice" APIS These APIs are still deprecated under Python 2.x, and still raise an exception under Python 3.x, but no longer cause a warning to be emitted under Python 2.x. --- src/zope/interface/declarations.py | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/zope/interface/declarations.py') diff --git a/src/zope/interface/declarations.py b/src/zope/interface/declarations.py index 8ed43b3..0992adc 100644 --- a/src/zope/interface/declarations.py +++ b/src/zope/interface/declarations.py @@ -402,9 +402,6 @@ def implements(*interfaces): # the coverage for this block there. :( if PYTHON3: #pragma NO COVER raise TypeError(_ADVICE_ERROR % 'implementer') - else: - warnings.warn(_ADVICE_WARNING % ('implements', 'implementer'), - DeprecationWarning, 2) _implements("implements", interfaces, classImplements) def implementsOnly(*interfaces): @@ -433,9 +430,6 @@ def implementsOnly(*interfaces): # the coverage for this block there. :( if PYTHON3: #pragma NO COVER raise TypeError(_ADVICE_ERROR % 'implementer_only') - else: - warnings.warn(_ADVICE_WARNING % ('implementsOnly', 'implementer_only'), - DeprecationWarning, 2) _implements("implementsOnly", interfaces, classImplementsOnly) ############################################################################## @@ -642,9 +636,6 @@ def classProvides(*interfaces): if PYTHON3: #pragma NO COVER raise TypeError(_ADVICE_ERROR % 'provider') - else: - warnings.warn(_ADVICE_WARNING % ('classProvides', 'provider'), - DeprecationWarning, 2) frame = sys._getframe(1) locals = frame.f_locals -- cgit v1.2.1