The Python C API has many functions to call a function or a method: https://docs.python.org/dev/c-api/call.html
The PyEval variants were deprecated in Python 3.9. I propose to now remove them:
There are replacement functions like PyObject_Call() and PyObject_CallFunction() which exist since Python 3.0 at least and so is backward compatible.
pythongh-105107: Remove PyEval_CallFunction() function
Replacing PyEval_CallObject(func, args) with PyObject_Call(args) does crash if args is NULL. Python 3.9 added PyObject_CallNoArgs() for this purpose: https://docs.python.org/dev/c-api/call.html#c.PyObject_CallNoArgs
The PyEval_Call*() functions are not documented and not tested.
gh-105107: Remove PyEval_CallFunction() function (#105108)
pythongh-105107: Remove PyCFunction_Call() function
I also removed the PyCFunction_Call() function.
gh-105107: Remove PyCFunction_Call() function (#105181)
Switch from `PyEval_CallObject` to `PyObject_Call`
Remove Python 3.9 deprecation
Add support for Python 3.13 (See zeroc-ice/ice#2906)
Fix for Python 3.13.0
AOSCOS: Fix for Python 3.13.0
Activity
pythongh-105107: Remove PyEval_CallFunction() function
pythongh-105107: Remove PyEval_CallFunction() function
vstinner commented on May 30, 2023
Replacing PyEval_CallObject(func, args) with PyObject_Call(args) does crash if args is NULL. Python 3.9 added PyObject_CallNoArgs() for this purpose: https://docs.python.org/dev/c-api/call.html#c.PyObject_CallNoArgs
vstinner commented on May 30, 2023
The PyEval_Call*() functions are not documented and not tested.
pythongh-105107: Remove PyEval_CallFunction() function
gh-105107: Remove PyEval_CallFunction() function (#105108)
pythongh-105107: Remove PyCFunction_Call() function
pythongh-105107: Remove PyCFunction_Call() function
pythongh-105107: Remove PyCFunction_Call() function
pythongh-105107: Remove PyCFunction_Call() function
vstinner commented on Jun 1, 2023
I also removed the PyCFunction_Call() function.
gh-105107: Remove PyCFunction_Call() function (#105181)
Switch from `PyEval_CallObject` to `PyObject_Call`
Remove Python 3.9 deprecation
Add support for Python 3.13 (See zeroc-ice/ice#2906)
Fix for Python 3.13.0
AOSCOS: Fix for Python 3.13.0
Add support for Python 3.13 (See zeroc-ice/ice#2906)
Add support for Python 3.13 (See zeroc-ice/ice#2906)
Add support for Python 3.13 (See zeroc-ice/ice#2906)