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 berker.peksag
Recipients anthony-flury, berker.peksag, cbelu, xtreak
Date 2018-09-16.02:22:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1537064563.71.0.956365154283.issue32153@psf.upfronthosting.co.za>
In-reply-to
Content
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=())
History
Date User Action Args
2018-09-16 02:22:43berker.peksagsetrecipients: + berker.peksag, anthony-flury, cbelu, xtreak
2018-09-16 02:22:43berker.peksagsetmessageid: <1537064563.71.0.956365154283.issue32153@psf.upfronthosting.co.za>
2018-09-16 02:22:43berker.peksaglinkissue32153 messages
2018-09-16 02:22:43berker.peksagcreate