From 1988faf3f7a7f77c0eccbbc5192f365400d44deb Mon Sep 17 00:00:00 2001 From: immerrr again Date: Tue, 7 Jan 2020 03:55:42 +0100 Subject: Fix wraps handing of missing attrs. (#251) This is pretty-much a straight backport of Py3 implementations of update_wrapper and (privately) wraps. Fixes #250 Fixes #165 Co-authored-by: Benjamin Peterson --- documentation/index.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'documentation') diff --git a/documentation/index.rst b/documentation/index.rst index b7ec275..f4c90c9 100644 --- a/documentation/index.rst +++ b/documentation/index.rst @@ -257,9 +257,10 @@ functions and methods is the stdlib :mod:`py3:inspect` module. .. decorator:: wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS, updated=functools.WRAPPER_UPDATES) - This is exactly the :func:`py3:functools.wraps` decorator, but it sets the - ``__wrapped__`` attribute on what it decorates as :func:`py3:functools.wraps` - does on Python versions after 3.2. + This is Python 3.2's :func:`py3:functools.wraps` decorator. It sets the + ``__wrapped__`` attribute on what it decorates. It doesn't raise an error if + any of the attributes mentioned in ``assigned`` and ``updated`` are missing + on ``wrapped`` object. Syntax compatibility -- cgit v1.2.1