-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Closed
Labels
Description
There are multiple places in https://github.com/python/cpython/blob/main/Doc/c-api/module.rst where exception are not mentioned in the docs.
Like:
Line 685 in 690b935
Return 0 on success or -1 on failure. |
Some functions do not even declare that they can return NULL
. Like:
Lines 457 to 470 in 690b935
.. c:function:: PyObject * PyModule_FromDefAndSpec2(PyModuleDef *def, PyObject *spec, int module_api_version) | |
Create a new module object, given the definition in *def* and the | |
ModuleSpec *spec*, assuming the API version *module_api_version*. | |
If that version does not match the version of the running interpreter, | |
a :exc:`RuntimeWarning` is emitted. | |
.. note:: | |
Most uses of this function should be using :c:func:`PyModule_FromDefAndSpec` | |
instead; only use this if you are sure you need it. | |
.. versionadded:: 3.5 | |
I will send a PR with the fix.