I've been using python-aspectlib to weave an aspect to certain methods - unfortunately this changes the methods signature to Argspec(args=[], varargs='args', keywords='kwargs', default=None)
, which creates problems when working with libraries that depend on inspect
returning the proper signature(s).
Is there a way to use python-aspectlib without changing a method's signature? If not, are there other python aspect libraries that can do this?
I've looked at the decorator module, which explicitly mentions the problem of changing a method signature: http://micheles.googlecode.com/hg/decorator/documentation.html#statement-of-the-problem , but I was hoping to find a solution where I don't need to modify the methods I want to weave (since they are part of a third party library).
I'm using python 2.7.6