remove ContextVar compat
This commit is contained in:
parent
e609dddd60
commit
1b552d0b01
6 changed files with 22 additions and 13 deletions
|
|
@ -16,7 +16,6 @@ from werkzeug.exceptions import BadRequest
|
|||
from werkzeug.exceptions import BadRequestKeyError
|
||||
from werkzeug.exceptions import HTTPException
|
||||
from werkzeug.exceptions import InternalServerError
|
||||
from werkzeug.local import ContextVar
|
||||
from werkzeug.routing import BuildError
|
||||
from werkzeug.routing import Map
|
||||
from werkzeug.routing import MapAdapter
|
||||
|
|
@ -1621,13 +1620,6 @@ class Flask(Scaffold):
|
|||
"Install Flask with the 'async' extra in order to use async views."
|
||||
) from None
|
||||
|
||||
# Check that Werkzeug isn't using its fallback ContextVar class.
|
||||
if ContextVar.__module__ == "werkzeug.local":
|
||||
raise RuntimeError(
|
||||
"Async cannot be used with this combination of Python "
|
||||
"and Greenlet versions."
|
||||
)
|
||||
|
||||
return asgiref_async_to_sync(func)
|
||||
|
||||
def make_response(self, rv: ResponseReturnValue) -> Response:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue