I have narrowed this down to inspect.isfunction() in serializers/default_object.py. It seems that the issue really lies within the inspect module; isfunction() does not correctly recognize Cython compiled methods.
I've tried a number of workarounds with my project, but have settled on replacing inspect.isfunction() with callable(), for the time being.
When dumping Cython compiled objects, methods are not handled, or identified correctly.
Output:
Expected:
I have narrowed this down to
inspect.isfunction()
in serializers/default_object.py. It seems that the issue really lies within theinspect
module;isfunction()
does not correctly recognize Cython compiled methods.I've tried a number of workarounds with my project, but have settled on replacing
inspect.isfunction()
withcallable()
, for the time being.Using
cythonize -X annotation_typing=False
jsons 1.3.0 Python 3.6, Python 3.8 Cython 0.28.1, 0.29.14