utils.deprecated: Fix compatibility with Python 3.5

This commit is contained in:
Kai Huuhko 2016-01-03 09:31:16 +02:00
parent 6c16e2f746
commit 8f2baa86b5
1 changed files with 3 additions and 3 deletions

View File

@ -76,12 +76,12 @@ class WRAPPER(object):
def __call__(self, *args, **kwargs):
cdef:
object stack
list stack
tuple caller
str msg
stack = traceback.extract_stack()
caller = stack[-1]
stack = list(traceback.extract_stack())
caller = tuple(stack[-1])
caller_module, caller_line, caller_name, caller_code = caller
if caller_code is not None:
if hasattr(self.f, "__objclass__"):