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:
|
Return 0 on success or -1 on failure. |
Some functions do not even declare that they can return NULL. Like:
|
.. 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.
Linked PRs
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:
cpython/Doc/c-api/module.rst
Line 685 in 690b935
Some functions do not even declare that they can return
NULL. Like:cpython/Doc/c-api/module.rst
Lines 457 to 470 in 690b935
I will send a PR with the fix.
Linked PRs
module.rstC-API docs with better error descriptions #121616module.rstC-API docs with better error descriptions (GH-121616) #121618module.rstC-API docs with better error descriptions (GH-121616) #121619