https://github.com/python/cpython
Revision edb59d57188e5535729c3948d673d0de1b729c05 authored by Martijn Pieters on 15 February 2024, 11:08:45 UTC, committed by GitHub on 15 February 2024, 11:08:45 UTC
* bpo-38364: unwrap partialmethods just like we unwrap partials

The inspect.isgeneratorfunction, inspect.iscoroutinefunction and inspect.isasyncgenfunction already unwrap functools.partial objects, this patch adds support for partialmethod objects as well.

Also: Rename _partialmethod to __partialmethod__.
Since we're checking this attribute on arbitrary function-like objects,
we should use the namespace reserved for core Python.

---------

Co-authored-by: Petr Viktorin <encukou@gmail.com>
1 parent 9e3729b
History
Tip revision: edb59d57188e5535729c3948d673d0de1b729c05 authored by Martijn Pieters on 15 February 2024, 11:08:45 UTC
bpo-38364: unwrap partialmethods just like we unwrap partials (#16600)
Tip revision: edb59d5
File Mode Size
.azure-pipelines
.devcontainer
.github
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Programs
Python
Tools
.coveragerc -rw-r--r-- 526 bytes
.editorconfig -rw-r--r-- 214 bytes
.gitattributes -rw-r--r-- 3.7 KB
.gitignore -rw-r--r-- 2.7 KB
.mailmap -rw-r--r-- 175 bytes
.pre-commit-config.yaml -rw-r--r-- 1018 bytes
.readthedocs.yml -rw-r--r-- 1014 bytes
LICENSE -rw-r--r-- 13.5 KB
Makefile.pre.in -rw-r--r-- 110.8 KB
README.rst -rw-r--r-- 8.6 KB
aclocal.m4 -rw-r--r-- 21.5 KB
config.guess -rwxr-xr-x 48.2 KB
config.sub -rwxr-xr-x 36.0 KB
configure -rwxr-xr-x 839.7 KB
configure.ac -rw-r--r-- 230.5 KB
install-sh -rwxr-xr-x 15.0 KB
pyconfig.h.in -rw-r--r-- 53.1 KB

README.rst

back to top