I would like to share one of the more interesting features I've implemented for Wool recently: a distributed context system with (near) complete parity to Python's native contextvars library. I undertook this endeavor thinking it'd be a neat little feature enabling Wool's users to get more creative with how they design their distributed applications. Well, it took me two attempts to get it right (I hope), and it was enough of an ordeal that I decided to put the experience to paper. Enjoy.
When I first approached the challenge of extending Python's contextvars library to Wool, I'll admit I didn't have an adequate understanding of how it interfaced with asyncio—specifically, I was under the impression that newly constructed asyncio tasks always got a shallow copy of their parent context. This is evident in the fact that I chose to store worker proxies in a context var. While in th