Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
gh-119109: functool.partial vectorcall supports pto->kw & fallback to tp_call removed#120783
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Is the PR a draft or is it ready for review? |
This one is a draft. Just an example of concept that works for current Reason being that#119827 will need a different implementation, which I have, but still waiting for reply how to go about it (#119827 (comment)): Here is implementation that works for It can be reviewed - sooner or later it will become PR. It is contained within one function - no documentation updates or anything additional is needed. Let me know if there is a good way to issue a separate PR on top of the one which is not yet merged - I am not aware of such. |
Will issue a new PR for |
Uh oh!
There was an error while loading.Please reload this page.
Although comment stated that "merging keyword arguments for vector call is messy" (not exact quote), but I have found that it is fairly straight forward.
This achieves 2 goals:
partial
being stuck intp_call
after keywords are deleted even if function supportsvectorcall
.len(pto-kw) != 0
and function supportsvectorcall
.Number 1. is solved better than it was in#119125 as there are no more switching between methods and faster
vectorcall
is used whenever appropriate. Also, this does not require additional variable in class struct.Comparison of performance:
This is only initial attempt and I think the code can be made simpler. (much simpler if decide to use
_PyObject_VectorcallDictTstate
).This will need to be adjusted to#119827 so do not merge.