← Back to team overview

beeseek-devs team mailing list archive

[Branch ~beeseek-devs/beeseek/trunk] Rev 196: Expand the stacklevel of the warnings.

 

------------------------------------------------------------
revno: 196
committer: Andrea Corbellini <andrea.corbellini@xxxxxxxxxxx>
branch nick: interfaces
timestamp: Wed 2009-01-14 15:16:44 +0100
message:
  Expand the stacklevel of the warnings.
modified:
  beeseek/interfaces.py

=== modified file 'beeseek/interfaces.py'
--- a/beeseek/interfaces.py	2009-01-14 14:09:24 +0000
+++ b/beeseek/interfaces.py	2009-01-14 14:16:44 +0000
@@ -108,7 +108,7 @@
                     if not isbaseclass:
                         warnings.warn('%s is required by %r, but is not '
                             'declared' % (name, interface),
-                            ImplementationWarning)
+                            ImplementationWarning, 2)
                     continue
 
                 value = getattr(interface, name)
@@ -121,7 +121,7 @@
                        or (needargs[0] > usedargs[0]
                        or needargs[2] != needargs[2])):
                         warnings.warn('Wrong number of arguments for %s' %
-                            name, ImplementationWarning)
+                            name, ImplementationWarning, 2)
                         continue
                 else:
                     # The attribute is a variable
@@ -142,7 +142,7 @@
                     if not any(isinstance(attrs[name], cls or NoneType)
                                for cls in value):
                         warnings.warn('%s should be of type %r' %
-                            (name, value), ImplementationWarning)
+                            (name, value), ImplementationWarning, 2)
                         continue
         # Return the class
         return cls



--
BeeSeek mainline
https://code.launchpad.net/~beeseek-devs/beeseek/trunk

You are receiving this branch notification because you are subscribed to it.