MCPcopy
hub / github.com/pallets/flask / push

Method push

src/flask/ctx.py:251–254  ·  view source on GitHub ↗

Binds the app context to the current context.

(self)

Source from the content-addressed store, hash-verified

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."""

Callers 6

__enter__Method · 0.95
pushMethod · 0.45
wsgi_appMethod · 0.45
test_teardown_on_popFunction · 0.45
test_context_testFunction · 0.45

Calls

no outgoing calls

Tested by 3

test_teardown_on_popFunction · 0.36
test_context_testFunction · 0.36