+1 on being explicit by passing around the request (or something similar).
there are way too many edge cases when you try to compute the current
request/transaction, and it's incredibly hard (a nightmare) to write tests
that work correctly when you rely on the derived/computed methods.
--
You
On Sun, Sep 2, 2018 at 7:31 AM wrote:
> If requests during their life cycle would derive from threading.local and
> initialize such a storage area upon construction (e.g. after tween ingress)
> and tear it down (e.g. after tween egress) then deeply nested function could
> still access a