Skip to content
Myr

Use the _request_ctx_stack instead of the proxy for consistency with the others.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 87f50fd · Browse files · 1 file+2 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+2 added−2 removed

  • other:+2 added−2 removed

1 file+2 added−2 removed

modified:flask/app.py+2 added-2 removed
1395 unmodified lines
13961397 This also triggers the :meth:`url_value_processor` functions before1398 the actualy :meth:`before_request` functions are called.1399 """1400 bp = request.blueprint1400 bp = _request_ctx_stack.top.request.blueprint14011402 funcs = self.url_value_preprocessors.get(None, ())1403 if bp is not None and bp in self.url_value_preprocessors:1404 funcs = chain(funcs, self.url_value_preprocessors[bp])
41 unmodified lines
1446 triggered when the request context is popped. That way we have a1447 tighter control over certain resources under testing environments.1448 """1449 funcs = reversed(self.teardown_request_funcs.get(None, ()))1450 bp = request.blueprint1450 bp = _request_ctx_stack.top.request.blueprint1451 if bp is not None and bp in self.teardown_request_funcs:1452 funcs = chain(funcs, reversed(self.teardown_request_funcs[bp]))1453 exc = sys.exc_info()[1]1454 for func in funcs:
89 unmodified lines