-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-37191: Move PEP 590 vectorcall tests #13892
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cc @jdemeyer Again, this change prepares the CPython code base to move the new vectorcall declaration to the internal C API. I also took the opportunity to move TestPEP590 from test_capi to test_call. I really hate test_capi, it's a pile of unrelated stuff. IMHO test_call is a way better place for these vector call tests. |
There is no plan to do that: the whole point of vectorcall is to define a public, non-internal protocol. |
Sorry, I mean private declarations. See https://bugs.python.org/issue37194 for the details and the rationale. Public declarations are fine and stay. |
Can we please not do that right now? I have several open PRs regarding PEP 590 and this is going to cause merge conflicts.
Could you say more precisely which functions you have in mind? |
You have to fix Python 3.8: it introduced many regressions.
Content of pycore_abstract.h in my local branch:
I'm trying to prevent to add new things to the public C API. Currently, the "private" functions added in 3.8 are technically part of the public C API and they make compilation of some C extensions fail. There is no reason for these C extensions to use these private functions. More context: http://pythoncapi.readthedocs.io/ |
Oh my local branch is outdated: _PyObject_CallNoArg() is removed by PR #13890 :-) |
At least |
And |
Can you explain the rationale for that? I do understand your explanations about bad C API that should be removed, but what's wrong with adding "good C API"? My impression is that https://pythoncapi.readthedocs.io is mostly about the stable ABI (PEP 384) but we're not aiming for that with PEP 590: the plan is keep vectorcall in the "CPython C API", that is the intermediate level between |
Private functions should not land into the public C API.
According to https://bugs.python.org/issue37191 I would prefer to not add public functions declared as static inline functions, but "regular functions" instead. I'm fine with keeping static inline function variants, but in the internal C API. |
Is that only for C89 compatibility or for other reasons? If the problem is C89, then a macro would also work. |
me:
Jeroen:
Oh. Ignore my previous. I looked again and I already converted many macros to static inline functions in the public C API and I made this on purpose :-D I have a bad memory. Now I'm confused by https://bugs.python.org/issue37191 But as Petr wrote, we can ignore this issue, since Python 3.6 requires C99: https://www.python.org/dev/peps/pep-0007/#c-dialect |
I reverted the controversial part of this PR to only move the test case from test_capi to test_call. @jdemeyer: Would you mind to review the updated PR? |
I agree in principle but I don't like that it conflicts with #13858. So I prefer to wait until that is merged. |
macOS job of the Azure Pipelined failed:
These failures look to be unrelated. |
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
I'm having trouble backporting to |
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
(cherry picked from commit 740a84d) Co-authored-by: Victor Stinner <[email protected]>
GH-13897 is a backport of this pull request to the 3.8 branch. |
(cherry picked from commit 740a84d) Co-authored-by: Victor Stinner <[email protected]>
_testinternalcapi.
https://bugs.python.org/issue37191