You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace complex _multicall wrapper logic with streamlined completion hook pattern
The _multicall function had intricate generator-based wrapper teardown logic
that was difficult to understand and maintain. This refactoring introduces
a completion hook pattern that simplifies the wrapper invocation process.
Key changes:
- Add CompletionHook type alias with (result, exception) -> (result, exception) signature
- Implement setup_and_get_completion_hook() method in WrapperImpl class
- Unify old-style and new-style wrapper handling using run_old_style_hookwrapper adapter
- Replace complex teardown loop with simple completion hook calls
- Adjust warning stacklevel from 6 to 7 for correct source attribution
The completion hook pattern makes wrapper teardown explicit and easier to debug
while maintaining full backward compatibility with both hookwrapper and wrapper
implementations.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
0 commit comments