This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author grahamd
Recipients AlexWaygood, andrei.avk, berker.peksag, corona10, grahamd, randolf.scholz, rhettinger, serhiy.storchaka, terry.reedy, wim.glenn
Date 2021-10-28.00:42:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635381769.02.0.958933471614.issue45356@roundup.psfhosted.org>
In-reply-to
Content
Too much to grok right now.

There is already a convention for what a decorator wraps. It is __wrapped__.

https://github.com/python/cpython/blob/3405792b024e9c6b70c0d2355c55a23ac84e1e67/Lib/functools.py#L70

Don't use __func__ as that has other defined meaning in Python related to bound methods and possibly other things as well and overloading on that will break other stuff.

In part I suspect a lot of the problems here are because things like classmethod and functools style decorators are not proper transparent object proxies, which is the point of what the wrapt package was trying to solve so that accessing stuff on the wrapper behaves as much as possible as if it was done on what was wrapped, including things like isinstance checks.
History
Date User Action Args
2021-10-28 00:42:49grahamdsetrecipients: + grahamd, rhettinger, terry.reedy, berker.peksag, serhiy.storchaka, wim.glenn, corona10, andrei.avk, randolf.scholz, AlexWaygood
2021-10-28 00:42:49grahamdsetmessageid: <1635381769.02.0.958933471614.issue45356@roundup.psfhosted.org>
2021-10-28 00:42:49grahamdlinkissue45356 messages
2021-10-28 00:42:48grahamdcreate