Binds the app context to the current context.
(self)
| 249 | self._cv_tokens: list[contextvars.Token[AppContext]] = [] |
| 250 | |
| 251 | def push(self) -> None: |
| 252 | """Binds the app context to the current context.""" |
| 253 | self._cv_tokens.append(_cv_app.set(self)) |
| 254 | appcontext_pushed.send(self.app, _async_wrapper=self.app.ensure_sync) |
| 255 | |
| 256 | def pop(self, exc: BaseException | None = _sentinel) -> None: # type: ignore |
| 257 | """Pops the app context.""" |
no outgoing calls