New submission from Petr Viktorin: Currently, Argument Clinic generates "PyModuleDef * module" for the first argument of module-level functions. But, the functions are passed the actual module object, not the ModuleDef.
The correct type to use is PyObject*, which is used for modules in the PyModule_* API. (It turns out nothing in core Python currently uses the argument except passing it to other _impl functions, but this could change as PEP 489 is improved upon.) The attached patch contains manual changes only. Please run `make clinic` after applying it to regenerate allll the code. ---------- components: Argument Clinic files: 0001-clinic-Switch-the-module-argument-to-PyObject.patch keywords: patch messages: 268676 nosy: encukou, larry, ncoghlan priority: normal severity: normal status: open title: Clinic: first parameter for module-level functions should be PyObject*, not PyModuleDef* versions: Python 3.6 Added file: http://bugs.python.org/file43418/0001-clinic-Switch-the-module-argument-to-PyObject.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27332> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com