Extend the functools.WRAPPER_ASSIGNMENTS tuple?

Since update_wrapper was added, various new attributes have popped up. Would it be a good idea to add __override__ and __is_abstractmethod__?

For background, another related topic proposes adding the cache members: Add `cache_info` and `cache_clear` to `functools.WRAPPER_ASSIGNMENTS` @AckslD

So as to future-proof, is there a good reason it shouldn’t default to copying any assignable/copyable dunder attribute?

It’s unclear to me why an allowlist is used vs denylist for all attributes. For other thread it’s copy cache_info/cache_clear. For a class callable that has more attributes (dunder/non-dunder) unsure what issue is with copy as much as is possible and skip a few known fields that should be left as is.

Is that what you would want when the callable is an instance of some arbitrary callable class?

Can’t say that’s come up for me any time recently. Generally if I’m decorating a class, it’s with something specifically designed to decorate classes, and which will return the original class after doing its work as a side effect. So I wouldn’t want to use @wraps et. al. with it anyway.

Sorry, maybe I wasn’t clear. Sometimes you’ll decorate a callable class. For example, you may decorate something like an object of type custom_jvp.