Thor Whalen <thorwha...@gmail.com> added the comment:
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 <rep...@bugs.python.org> wrote: > > Terry J. Reedy <tjre...@udel.edu> added the comment: > > Is this actually a bugfix? > > ---------- > nosy: +terry.reedy > versions: +Python 3.10 -Python 3.8 > > _______________________________________ > Python tracker <rep...@bugs.python.org> > <https://bugs.python.org/issue41232> > _______________________________________ > ---------- nosy: +Thor Whalen _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41232> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com