Berker Peksag <berker.pek...@gmail.com> added the comment:
I think option 2 is what functools.update_wrapper() does and it may be better to make create_autospec() consistent with it. Perhaps we can replace _copy_func_details() with functools.update_wrapper(): assigments = ( '__name__', '__doc__', '__text_signature__', # And the rest of the attributes in _copy_func_details(). ) functools.update_wrapper(..., assigned=assignments, updated=()) ---------- nosy: +berker.peksag stage: -> needs patch type: -> behavior versions: +Python 3.8 -Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32153> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com