Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upbpo-39245: Make Vectorcall public #17893
Conversation
Change made automatically with: for name in \ PyObject_Vectorcall \ Py_TPFLAGS_HAVE_VECTORCALL \ PyObject_VectorcallMethod \ PyObject_FastCallDict \ PyVectorcall_Function \ PyObject_CallOneArg \ PyObject_CallMethodNoArgs \ PyObject_CallMethodOneArg \ ; do echo $name git grep -lwz _$name | xargs -0 sed -i "s/\b_$name\b/$name/g" done
Mark all newly public functions as added in 3.9. Add a note about the 3.8 provisional names. Add notes on public API.
This comment has been minimized.
This comment has been minimized.
The problem is that
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hmm, I see I misunderstood the bpo-37194 conversation. I see now that you were talking about the limited API (stable ABI) when you said "public". |
This comment has been minimized.
This comment has been minimized.
The main reasons for excluding things from the stable API/ABI is if we think they might be difficult for other implementations to provide, or if they're intrinsically exposed to ABI compatibility issues.
|
This comment has been minimized.
This comment has been minimized.
Yes, I consider that it is safe to add it to the stable ABI, since it should be trivial to implement. |
Before making the API public, I would like to see a public discussion if we should pass tstate to functions or not (change the calling convention). For subinterpreters, we will need more and more to access tstate. There are ways to get the tstate, but they may be "inefficient" when calling very frequently. @ericsnowcurrently: What do you think? |
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
Jan 8, 2020
When you're done making the requested changes, leave the comment: |
encukou commentedJan 7, 2020
•
edited by bedevere-bot
As per PEP-590, in Python 3.9 the Vectorcall API will be public, i.e. without leading underscores.
This PR also includes some other new call API that got added together with vectorcall.
@vstinner, note that this partially reverts commit 2ff58a2 : IMO
PyObject_CallNoArgs
should always stay behind#ifndef Py_LIMITED_API
(i.e. be inInclude/cpython/
).https://bugs.python.org/issue39245