This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Remove PyNoArgsFunction
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.4
Status: closed Resolution: duplicate
Dependencies: Superseder: The header files in Include/ have many declarations with no definition
View: 39372
Assigned To: Nosy List: Arfrever, benjamin.peterson, larry, pitrou, serhiy.storchaka
Priority: low Keywords:

Created on 2013-05-29 02:00 by larry, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (5)
msg190264 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2013-05-29 02:00
There's a typedef in methodobject.h called PyNoArgsFunction.  You might think it's used for METH_NOARGS functions--you'd be wrong, those use PyCFunction and pass in NULL for args.

No, PyNoArgsFunction is never used.  Nor is it documented.  It's found in exactly one place in the CPython tree, and that's when it's declared.  We should consider removing it.

Note that I'm pretty sure this will break external code; a quick Google found that Blender's extension interface uses it.  And AFAICT they still use it, and they *have* moved to Python 3.  So I could believe the right call is "we better leave it in".

I suspect that PyNoArgsFunction *was* used once upon a time.  I further suspect that year started with a 1.
msg190287 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2013-05-29 11:00
Either of you gentlemen care to offer an opinion?
msg190317 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2013-05-29 16:35
If you want to convince Blender to stop using it, you can kill it. It's seems fairly harmless, though.
msg360241 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-01-18 09:27
Removed in issue39372 together with other unused declarations.

PyNoArgsFunction was the only one that breaks a user code. But using PyNoArgsFunction is likely a sign of error.
msg360242 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-01-18 09:29
I cannot report a bug in Blender, because get an exception on link .
Date User Action Args
2022-04-11 14:57:46adminsetgithub: 62291
2020-01-18 09:29:35serhiy.storchakasetmessages: + msg360242
2020-01-18 09:27:00serhiy.storchakasetstatus: open -> closed

superseder: The header files in Include/ have many declarations with no definition

nosy: + serhiy.storchaka
messages: + msg360241
resolution: duplicate
stage: needs patch -> resolved
2013-05-30 15:46:48Arfreversetnosy: + Arfrever
2013-05-29 16:35:09benjamin.petersonsetmessages: + msg190317
2013-05-29 11:00:10larrysetnosy: + pitrou, benjamin.peterson
messages: + msg190287
2013-05-29 02:00:44larrycreate