[issue46722] Different behavior for functiools.partial between inspect.isfunction() and other inspect.is*function()

2022-02-12 Thread Iliya Zinoviev
Iliya Zinoviev added the comment: I suppose isgeneratorfunction, iscoroutinefunction, isasyncgenfunction were modified to treat partial obj like regular function. But then without modifying isfunction as well, this approach won't work in full measure. --

[issue46722] Different behavior for functiools.partial between inspect.isfunction() and other inspect.is*function()

2022-02-12 Thread Iliya Zinoviev
Iliya Zinoviev added the comment: Kevin, thanks for answer! In that case, I may conclude isgeneratorfunction, iscoroutinefunction, isasyncgenfunction from python3.7 are more determinated, in my view, cause partial obj has `func` attr for interaction with these funcs anyway, so it isn't need

[issue46722] Different behavior for functiools.partial between inspect.isfunction() and other inspect.is*function()

2022-02-11 Thread Kevin Shweh
Kevin Shweh added the comment: Frankly, it doesn't make sense that isgeneratorfunction or iscoroutinefunction unwrap partials at all. The original justification for making them do that back in https://bugs.python.org/issue34890 was invalid - the original argument was that isfunction unwraps

[issue46722] Different behavior for functiools.partial between inspect.isfunction() and other inspect.is*function()

2022-02-11 Thread Iliya Zinoviev
Change by Iliya Zinoviev : Removed file: https://bugs.python.org/file50622/isfuncs_behavior.py ___ Python tracker ___ ___ Python-bugs-list

[issue46722] Different behavior for functiools.partial between inspect.isfunction() and other inspect.is*function()

2022-02-11 Thread Iliya Zinoviev
Change by Iliya Zinoviev : Added file: https://bugs.python.org/file50622/isfuncs_behavior.py ___ Python tracker ___ ___ Python-bugs-list

[issue46722] Different behavior for functiools.partial between inspect.isfunction() and other inspect.is*function()

2022-02-11 Thread Iliya Zinoviev
New submission from Iliya Zinoviev : 1) isfunction() returns `True` for partial object only when one passes `func` attribute of it. 2) For instance, `isgeneratorfunction()` and `iscoroutinefunction()` for partial obj work with passing partial obj as well as with passing `func` attr of this