GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — bpo-36974: inherit tp_vectorcall_offset unconditionally by jdemeyer · Pull Request #13858 · python/cpython Conversation
|
|
Does this change support the stable ABI? Is it still possible to use a C extension compiled with Python 3.6 on Python 3.9 with this change? The C extension compiled with Python 3.6 can use static types with Python 3.6 PyTypeObject which doesn't have tp_vectorcall field. My notes on these topics:
I decided to give up on my tp_fastcall slot experiment because of these problems. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Isn't the whole "stable ABI for static types" issue gone since #4944? Regardless of that, |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
See also https://www.python.org/dev/peps/pep-0580/#using-tp-print (this is in PEP 580 which was rejected but the same applies to PEP 590). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
At the moment, |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Honestly... I have no idea :-( All I know is that PyQt rely on the stable ABI.
For example, if Python 3.6 PyTypeObject is 100 bytes long, but tp_vectorcall offset is 108: setting tp_vectorcall field of a Python 3.6 static type would lead to a buffer overflow causing undefined behavior. I don't know if it's the case. I'm just raising the question. cc @pitrou |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The thing that matters is Your concerns might be valid when we implement vectorcall for the type object itself (i.e. for |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Can I please ask again for a review? This is the only open bugfix for PEP 590 (there are many other open tickets regarding PEP 590, but those are enhancements, not bugfixes). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
LGTM. @vstinner I'd like to merge this if you have no further objections. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I think the questions were answered. Victor, if you have any more, let me know. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks and don't forget to backport to 3.8 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
I only had questions about the ABI compatibility, but I think that it was discussed in length here and in https://bugs.python.org/issue37250 In short, we don't provide any backward compatibility warranty at the ABI level for static types. If you want a stable ABI, avoid static types and use PyType_FromSpec() instead. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'm having trouble backporting to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-14342 is a backport of this pull request to the 3.8 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
(cherry picked from commit a8b27e6) Co-authored-by: Jeroen Demeyer <[email protected]>
…H-14342) (cherry picked from commit a8b27e6) Co-authored-by: Jeroen Demeyer <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.