rust-cpython
rust-cpython copied to clipboard
Don't use C type PyNoArgsFunction
It is not used in Python core, should not be used in user code, and will be removed in Python 3.9. METH_NOARGS functions should have type PyCFunction instead of PyNoArgsFunction and take NULL as the second argument.
@serhiy-storchaka Thanks for the heads-up, I see you've been the reviewer for that.
Some more resources:
- https://bugs.python.org/issue18091
- https://bugs.python.org/issue39372
- https://github.com/python/cpython/pull/18037
As far as I can see, it's not really used by rust-cpython, it's simply declared, like all other symbols, in python-*-sys.
Even if it's wrong from our users to use it in current Python versions, the simplest course of action seems hence to not declare it for Python >= 3.9