-
Notifications
You must be signed in to change notification settings - Fork 126
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
Deprecate __multicall__ support #23
Comments
it exists solely for backward compatibility at the pytest sprint we discussed that instead of just removing it, at the pytest sprint we discussed that instead of just removing it, |
@RonnyPfannschmidt ok so if I implement this where do you want the check for |
i dont care where it is ^^ it has to work reliable :) |
I guess it makes sense to check if multicall is used during registering a plugin and mark the hook caller accordingly. On instantiation of PluginManager one should be able to optionally specify a callback which receives information about plugin and hook which uses multicall so a warning can be added. Then at hook calling time we can switch between the two implementations. The current one would be used for when multicall is used. |
Also it makes sense to get rid of the last |
we should probably put the deprecation-warning into pluggy using python warnings themselfes |
Oh really? I swear I have removed those. 😬 |
Gonna try and hack on this over the weekend. |
@hpk42 I actually started this but it turns out the way that tracing is accomplished kind of makes it a bit tricky with So I wanted to propose:
Let me know what you think. |
As per the comment in
pluggy._MultiCall
we should be able to drop the line here. Grepping thepytest
sources reveals that only a few spots still reference it.This change also allows us to remove the recursion induced by
_wrapped_call()
getting passed_MultiCall.execute
. This means we can remove_wrapped_call
and simply loop through hookwrapper pre and postyield
calls at the beginning and end ofexecute()
. I'd actually be interested to see ifcontextlib.contextmanager
wrapping could be used directly for this.The text was updated successfully, but these errors were encountered: