--- a/selectors.py Mon Jul 05 19:05:56 2010 +0200
+++ b/selectors.py Mon Jul 05 19:06:17 2010 +0200
@@ -675,10 +675,12 @@
"""
def __init__(self, *expected_ifaces, **kwargs):
+ emit_warn = kwargs.pop('warn', True)
super(implements, self).__init__(**kwargs)
self.expected_ifaces = expected_ifaces
- warn('[3.9] implements selector is deprecated, use either is_instance '
- 'or adaptable', DeprecationWarning, stacklevel=2)
+ if emit_warn:
+ warn('[3.9] implements selector is deprecated, use either '
+ 'is_instance or adaptable', DeprecationWarning, stacklevel=2)
def __str__(self):
return '%s(%s)' % (self.__class__.__name__,