-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-37337: Add _PyObject_VectorcallMethod() #14228
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 @vstinner since this is increasing the size of the C API. |
4bd378a
to
1c9011d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR adds too many functions at once, it's hard to see how each function is used. Would it be possible to start by adding _PyObject_VectorcallMethod() and its _PyObject_VectorcallMethodId() variant.
Only once it's merged, propose a new PR to only add the private _PyObject_CallMethodNoArgs() and its _PyObject_CallMethodIdNoArgs() variant.
Adding a public PyObject_CallMethodNoArgs() should be the last PR. You should elaborate "efficiency" rationale: measure how many times it's called, the performance benefit (if any), effect on the stack usage, etc.
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sure. It's just that sometimes you actually need to use the function in more places to see which effect it has. If I would have made a PR adding But now that we see that these functions would certainly be used, we can indeed split this up. I assume that by asking this, you agree to add the functions |
I suggest to only add _PyObject_VectorcallMethod() and its _PyObject_VectorcallMethodId() variant, but also use them. My mean: remove the 3 other functions. |
So what should I do with all the changes of the form - loop = _PyObject_CallMethodId(policy, &PyId_get_event_loop, NULL);
+ loop = _PyObject_CallMethodIdNoArgs(policy, &PyId_get_event_loop); |
64576fe
to
2be40b5
Compare
Done. |
You set this to |
Bot changed the label, not l. @vstinner Would you check this again? |
|
https://bugs.python.org/issue37337