selectors.py
changeset 5895 6a3f776292a5
parent 5892 214633a80961
child 5901 782b27eaf97a
--- 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__,