-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Labels
python compatMypyc doesn't match CPython or documented semantics.Mypyc doesn't match CPython or documented semantics.
Description
signature.py
import inspect
import compiled
inspect.signature(compiled.fun)
compiled.py
def fun(test: str = "test") -> int:
return 1
$ mypyc compiled.py
$ python signature.py
Traceback (most recent call last):
File "/pool01/home/twoertwe/git/python-tools/signature.py", line 5, in <module>
inspect.signature(compiled.fun)
File "/home/twoertwe/local/lib/python3.9/inspect.py", line 3130, in signature
return Signature.from_callable(obj, follow_wrapped=follow_wrapped)
File "/home/twoertwe/local/lib/python3.9/inspect.py", line 2879, in from_callable
return _signature_from_callable(obj, sigcls=cls,
File "/home/twoertwe/local/lib/python3.9/inspect.py", line 2334, in _signature_from_callable
return _signature_from_builtin(sigcls, obj,
File "/home/twoertwe/local/lib/python3.9/inspect.py", line 2145, in _signature_from_builtin
raise ValueError("no signature found for builtin {!r}".format(func))
ValueError: no signature found for builtin <built-in function fun>
I encountered this issue when using a compiled function with client.register_worker_callbacks
in dask https://docs.dask.org/en/latest/futures.html?highlight=register_worker_callbacks#distributed.Client.register_worker_callbacks
guywilsonjr and graipher
Metadata
Metadata
Assignees
Labels
python compatMypyc doesn't match CPython or documented semantics.Mypyc doesn't match CPython or documented semantics.