Author Thor Whalen
Recipients Thor Whalen, Thor Whalen2, ncoghlan, terry.reedy
Date 2020-08-04.14:59:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CANryRXChWkS1+uXSf5z1X9pk+_AK-EZSjq5ugKJws4_fNvBc6g@mail.gmail.com>
In-reply-to <1594432702.71.0.688067369701.issue41232@roundup.psfhosted.org>
Content
Hi Terry, sorry for the later reply.

Is this a bugfix? Well, I'm not sure what you would call a bug. Can't one
always redefine a bug to be a feature, and visa versa?

I would definitely say that the behavior (seeing one default in the
signature, but a different one actually taking effect) is probably not a
good one -- as this could lead to very hard to find... bugs. It seems in
fact that third party "fix your decorators" packages such as `wrapt` and
`boltons.funcutils` agree, since their implementation of `wraps` doesn't
have this... "misaligned-by-default feature" that `functools.wraps` does.

Unless I'm missing something, my guess of why `functools.wraps` doesn't
include what I put in my pull request is that it breaks some tests. But I
had a look at the failing test and it seems that it is the test that is
"wrong" (i.e. tests for a behavior that really shouldn't be the default).

See comment:
https://github.com/python/cpython/pull/21379#issuecomment-655661983

The question is: Is there a lot of code out there that depends on this
misaligned behavior. My guess is not.

On Fri, Jul 10, 2020 at 9:58 PM Terry J. Reedy <report@bugs.python.org>
wrote:

>
> Terry J. Reedy <tjreedy@udel.edu> added the comment:
>
> Is this actually a bugfix?
>
> ----------
> nosy: +terry.reedy
> versions: +Python 3.10 -Python 3.8
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https://bugs.python.org/issue41232>
> _______________________________________
>
History
Date User Action Args
2020-08-04 14:59:30Thor Whalensetrecipients: + Thor Whalen, terry.reedy, ncoghlan
2020-08-04 14:59:30Thor Whalenlinkissue41232 messages
2020-08-04 14:59:30Thor Whalencreate