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 rhettinger
Recipients gregory.p.smith, rhettinger, serhiy.storchaka
Date 2021-05-02.00:17:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1619914667.39.0.0831494961978.issue44003@roundup.psfhosted.org>
In-reply-to
Content
I don't think this should be done.  We want the lru_cache to be a pass-through.  Applying defaults or keyword-only/positional-only restrictions is the responsibility of the inner function.  

FWIW, here are the fields that Nick selected to be included in update_wrapper():  ('__module__', '__name__', '__qualname__', '__doc__', '__annotations__').

Those are sufficient to get help() to work which is all we were aiming for:

>>> from functools import *
>>> @lru_cache
def cached_func(b=5):
    pass

>>> help(cached_func)
Help on _lru_cache_wrapper in module __main__:

cached_func(b=5)
History
Date User Action Args
2021-05-02 00:17:47rhettingersetrecipients: + rhettinger, gregory.p.smith, serhiy.storchaka
2021-05-02 00:17:47rhettingersetmessageid: <1619914667.39.0.0831494961978.issue44003@roundup.psfhosted.org>
2021-05-02 00:17:47rhettingerlinkissue44003 messages
2021-05-02 00:17:47rhettingercreate