I have python code that I convert to Cython. I get a runtime exception on the following scenario:
class A:
def foo(self, some_arg: int):
pass
a = A()
some_arg = 5
a.foo(some_arg=some_arg)
The error is:
TypeError: foo() takes no keyword arguments
I found some relevant data here. However:
- The error is in runtime, not compile time as I would expect.
- When adding to the setup.py file a compliler directive
always_allow_keywords=Trueas suggested, I get corrupted .so files upon cythonizing the code. When I try to load them I get this error:file xxx.so is too short.
My Python version is: 3.7.2, cython version: 0.29.19.
The code is compiled with gcc-linaro-aarch64 toolchain and run on a Linux based OS.