Commits

Benjamin Peterson committed 2fe247d

accept assigned and updated parameters for wraps() (fixes #85)

Comments (0)

Files changed (3)

 Development version
 -------------------
 
+- Issue #85: Always accept *updated* and *assigned* arguments for wraps().
+
 - Issue #86: In reraise(), instantiate the exception if the second argument is
   None.
 

documentation/index.rst

    aliased to :class:`py3:object`.)
 
 
-.. function:: wraps(wrapped)
+.. function:: 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`
 _add_doc(reraise, """Reraise an exception.""")
 
 if sys.version_info[0:2] < (3, 4):
-    def wraps(wrapped):
+    def wraps(wrapped, assigned=functools.WRAPPER_ASSIGNMENTS,
+              updated=functools.WRAPPER_UPDATES):
         def wrapper(f):
             f = functools.wraps(wrapped)(f)
             f.__wrapped__ = wrapped