Open
Description
Right now we have two separate contexts managed separately, the app and request contexts. This makes the implementation pretty complicated, as we need to maintain two context var stacks, and do a bunch of checks in the request context to make sure we're managing the correct app context. It makes an already confusing topic more complicated to explain: app context is active for requests and cli commands, don't push an app context before making a request, etc.
I think merging the two contexts could be possible. The single context (ExecutionContext
?) would have the g
, request
, and session
attributes, but accessing request
or session
when not in a request would raise an error.
Metadata
Assignees
Labels
No labels