summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2018-10-26 11:19:14 (GMT)
committerGitHub <noreply@github.com>2018-10-26 11:19:14 (GMT)
commit7cd25434164882c2093ea41ccfc7b95a05cd5cbd (patch)
tree76c33543b495e78b0e520dd4914da68dcf616dae /Misc
parente483f02423917dc4dfd25f46e5b9e6fce304777d (diff)
downloadcpython-7cd25434164882c2093ea41ccfc7b95a05cd5cbd.zip
cpython-7cd25434164882c2093ea41ccfc7b95a05cd5cbd.tar.gz
cpython-7cd25434164882c2093ea41ccfc7b95a05cd5cbd.tar.bz2
bpo-34890: Make iscoroutinefunction, isgeneratorfunction and isasyncgenfunction work with functools.partial (GH-9903)
inspect.isfunction() processes both inspect.isfunction(func) and inspect.isfunction(partial(func, arg)) correctly but some other functions in the inspect module (iscoroutinefunction, isgeneratorfunction and isasyncgenfunction) lack this functionality. This commits adds a new check in the mentioned functions in the inspect module so they can work correctly with arbitrarily nested partial functions.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2018-10-15-23-10-41.bpo-34890.77E770.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-10-15-23-10-41.bpo-34890.77E770.rst b/Misc/NEWS.d/next/Library/2018-10-15-23-10-41.bpo-34890.77E770.rst
new file mode 100644
index 0000000..58745b2
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2018-10-15-23-10-41.bpo-34890.77E770.rst
@@ -0,0 +1,3 @@
+Make :func:`inspect.iscoroutinefunction`,
+:func:`inspect.isgeneratorfunction` and :func:`inspect.isasyncgenfunction`
+work with :func:`functools.partial`. Patch by Pablo Galindo.