You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Move new vector private declarations to the internal C API #81375
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2019-06-17.13:09:16.423>created_at=<Date2019-06-07.11:54:00.354>labels= ['interpreter-core', '3.8', '3.9']
title='Move new vector private declarations to the internal C API'updated_at=<Date2020-12-16.21:41:55.141>user='https://github.com/vstinner'
bpo-37191: the new vector APIs declare "static inline" functions which are no C89 compatible and so cause compilation issues on pygobject3, python-dbus, xen (for example).
I propose to move the new *private* declarations to the internal C API.
I started to work on an application. The blocker issue is _PyObject_CallNoArg() which is now commonly used in CPython code base for best performances. It is used the _testcapi which must *not* be compiled with the internal C API.
So I suggest to first add a new public PyObject_CallNoArg() function. It would be different than _PyObject_CallNoArg() static inline function: PyObject_CallNoArg() would be a regular function and so fit better with ABI issues.
I propose to move the new *private* declarations to the internal C API.
Some of those functions (in particular _PyObject_Vectorcall) are expected to become public in 3.9. They are only private for now since the API is provisional.
I used testcapi_call_no_args.patch and stack_overflow-4.py to measure the stack consumption of PyObject_CallNoArgs() and PyObject_CallFunctionObjArgs() for PR 13890.
bpo-37191: the new vector APIs declare "static inline" functions which are no C89 compatible and so cause compilation issues on pygobject3, python-dbus, xen (for example).
bpo-37191 have been fixed, so this issue can now be closed.
Activity
vstinner commentedon Jun 7, 2019
bpo-37191: the new vector APIs declare "static inline" functions which are no C89 compatible and so cause compilation issues on pygobject3, python-dbus, xen (for example).
I propose to move the new *private* declarations to the internal C API.
I started to work on an application. The blocker issue is _PyObject_CallNoArg() which is now commonly used in CPython code base for best performances. It is used the _testcapi which must *not* be compiled with the internal C API.
So I suggest to first add a new public PyObject_CallNoArg() function. It would be different than _PyObject_CallNoArg() static inline function: PyObject_CallNoArg() would be a regular function and so fit better with ABI issues.
[-]Move new vector headers to the internal C API[/-][+]Move new vector private declarations to the internal C API[/+]jdemeyer commentedon Jun 7, 2019
Some of those functions (in particular _PyObject_Vectorcall) are expected to become public in 3.9. They are only private for now since the API is provisional.
vstinner commentedon Jun 7, 2019
I used testcapi_call_no_args.patch and stack_overflow-4.py to measure the stack consumption of PyObject_CallNoArgs() and PyObject_CallFunctionObjArgs() for PR 13890.
vstinner commentedon Jun 7, 2019
Oh, I used the wrong bpo number for this change:
New changeset 740a84d by Victor Stinner in branch 'master':
bpo-37191: Move TestPEP590 from test_capi to test_call (GH-13892)
740a84d
New changeset 5effd10 by Miss Islington (bot) in branch '3.8':
bpo-37191: Move TestPEP590 from test_capi to test_call (GH-13892)
5effd10
vstinner commentedon Jun 17, 2019
New changeset 2ff58a2 by Victor Stinner in branch 'master':
bpo-37194: Add a new public PyObject_CallNoArgs() function (GH-13890)
2ff58a2
vstinner commentedon Jun 17, 2019
New changeset 1ce2656 by Victor Stinner in branch 'master':
bpo-37194: Complete PyObject_CallXXX() docs (GH-14156)
1ce2656
vstinner commentedon Jun 17, 2019
bpo-37191 have been fixed, so this issue can now be closed.
vstinner commentedon Jun 17, 2019
New changeset ac4202e by Victor Stinner in branch '3.7':
bpo-37194: Complete PyObject_CallXXX() docs (GH-14156) (GH-14158)
ac4202e
vstinner commentedon Jun 17, 2019
New changeset 71031cf by Victor Stinner in branch '3.8':
bpo-37194: Complete PyObject_CallXXX() docs (GH-14156) (GH-14157)
71031cf
vstinner commentedon Jun 17, 2019
New changeset 5352cc4 by Victor Stinner in branch 'master':
bpo-37194: Add PyObject_CallNoArgs() rationale (GH-14159)
5352cc4
vstinner commentedon Dec 16, 2020
New changeset fcc6935 by Victor Stinner in branch 'master':
Add symbols of the stable ABI to python3dll.c (GH-23598)
fcc6935
vstinner commentedon Dec 16, 2020
New changeset 1662868 by Victor Stinner in branch '3.9':
Add symbols of the stable ABI to python3dll.c (GH-23598) (GH-23801)
1662868