-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
First: wrapping builtins (e.g. setattr from object) raises exceptions
File "/services/shopkick_pylons/shopkick_pylons-current/py/lib/python2.6/site-packages/boltons/funcutils.py", line 488, in from_func
'module': func.__module__,
AttributeError: 'wrapper_descriptor' object has no attribute '__module__'Probably the way to fix is to add a filter for hasattr('module').
Second: wrapping @staticmethod breaks because the descriptor protocol that elides off the self parameter gets "erased" in the wrapped function
A bunch of different ways to fix
Finally, it would be convenient if the skip function could take the object itself as well as the name in order to work-around these issues and any other unanticipated ones. (Maybe parameters similar to descriptor protocol get / set for the skip argument to wrap_all?
Metadata
Metadata
Assignees
Labels
No labels