bpo-43908: Types with Py_TPFLAGS_IMMUTABLETYPE can now inherit the vectorcall protocol#27001
Conversation
Py_TPFLAGS_IMMUTABLETYPE to decide if vectorcall type flags can be inherited|
Re-opening to trigger CI. |
Sorry, something went wrong.
vstinner
left a comment
There was a problem hiding this comment.
LGTM. But to be able to merge this change, please move the news entry to Doc/whatsnew/3.10.rst. I suggest to backport this nice enhancement to Python 3.10.
Sorry, something went wrong.
Ok, moved to 3.10 in commit 6adc9e5. Thanks for reviewing, Pablo & Victor! 🙏🏻 |
Sorry, something went wrong.
Is this considered a bugfix? We are very close to RC 1 so I'm not sure we should risk regressions... |
Sorry, something went wrong.
I guess it depends on how you view it:
|
Sorry, something went wrong.
But this is something only happens in the stdlib, and those types are not going to change between beta 4 and RC 1. User types are not going to become magically heap types. I'm missing something? |
Sorry, something went wrong.
No, that's correct. If vectorcall support is not going to be added to any stdlib type in 3.10, there's no reason to backport this. |
Sorry, something went wrong.
|
Sounds like a backport is out of the question, then. |
Sorry, something went wrong.
Ah, I didn't notice that there are two months between the RC1 and the final versions. Ok, so this change should not be backported. |
Sorry, something went wrong.
Py_TPFLAGS_IMMUTABLETYPE can now implement the vectorcall protocolCo-authored-by: Victor Stinner <vstinner@python.org>
vstinner
left a comment
There was a problem hiding this comment.
LGTM. Thanks, the NEWS entry is now crystal clear.
Sorry, something went wrong.
Py_TPFLAGS_HAVE_VECTORCALLandPy_TPFLAGS_METHOD_DESCRIPTORinheritance is now ruled by the
Py_TPFLAGS_IMMUTABLETYPEflag insteadof the
Py_TPFLAGS_HEAPTYPEflag.https://bugs.python.org/issue43908