lifespan context is not stored in state, it actually replaces it #2515
-
Using the lifespan pattern with a context manager and am quite happy with its existence. There is still something that bothers me with with it though. The context that the context manager creates needs to be None, because anything else is regarded as the full Example:
This will fail today,
Which i find counter intuitive for a context manager. I would suggest changing in |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
You need to use |
Beta Was this translation helpful? Give feedback.
You need to use
request.state
in the endpoint, notapp.state
.