forked from orbit-oss/flask
Change _cv_req -> _cv_request
This is a clearer name for the variable.
This commit is contained in:
parent
979e0adbac
commit
91044c4d76
7 changed files with 25 additions and 25 deletions
|
|
@ -12,7 +12,7 @@ import werkzeug.utils
|
|||
from werkzeug.exceptions import abort as _wz_abort
|
||||
from werkzeug.utils import redirect as _wz_redirect
|
||||
|
||||
from .globals import _cv_req
|
||||
from .globals import _cv_request
|
||||
from .globals import current_app
|
||||
from .globals import request
|
||||
from .globals import request_ctx
|
||||
|
|
@ -111,7 +111,7 @@ def stream_with_context(
|
|||
return update_wrapper(decorator, generator_or_function) # type: ignore
|
||||
|
||||
def generator() -> t.Generator:
|
||||
ctx = _cv_req.get(None)
|
||||
ctx = _cv_request.get(None)
|
||||
if ctx is None:
|
||||
raise RuntimeError(
|
||||
"'stream_with_context' can only be used when a request"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue