summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2013-07-28 10:00:01 (GMT)
committerNick Coghlan <ncoghlan@gmail.com>2013-07-28 10:00:01 (GMT)
commite8c45d6d0eda74a8f13dcac9d0c593bbcb21e38b (patch)
tree0f84fdc0cf870e81fd8f1c4efa3bfdca555b55cc /Doc/whatsnew
parent77578204d6aeb89a9ee8365f8fb28ce18aa2eb7c (diff)
downloadcpython-e8c45d6d0eda74a8f13dcac9d0c593bbcb21e38b.zip
cpython-e8c45d6d0eda74a8f13dcac9d0c593bbcb21e38b.tar.gz
cpython-e8c45d6d0eda74a8f13dcac9d0c593bbcb21e38b.tar.bz2
Close #13266: Add inspect.unwrap
Initial patch by Daniel Urban and Aaron Iles
Diffstat (limited to 'Doc/whatsnew')
-rw-r--r--Doc/whatsnew/3.4.rst14
1 files changed, 11 insertions, 3 deletions
diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst
index 40b8243..b5be568 100644
--- a/Doc/whatsnew/3.4.rst
+++ b/Doc/whatsnew/3.4.rst
@@ -185,6 +185,15 @@ functools
New :func:`functools.singledispatch` decorator: see the :pep:`443`.
+
+inspect
+-------
+
+:func:`~inspect.unwrap` makes it easy to unravel wrapper function chains
+created by :func:`functools.wraps` (and any other API that sets the
+``__wrapped__`` attribute on a wrapper function).
+
+
smtplib
-------
@@ -327,6 +336,5 @@ that may require changes to your code.
wrapped attribute set. This means ``__wrapped__`` attributes now correctly
link a stack of decorated functions rather than every ``__wrapped__``
attribute in the chain referring to the innermost function. Introspection
- libraries that assumed the previous behaviour was intentional will need to
- be updated to walk the chain of ``__wrapped__`` attributes to find the
- innermost function.
+ libraries that assumed the previous behaviour was intentional can use
+ :func:`inspect.unwrap` to gain equivalent behaviour.