lol
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import typing as t
|
||||
|
||||
from . import json as json
|
||||
from .app import Flask as Flask
|
||||
from .app import Request as Request
|
||||
from .app import Response as Response
|
||||
from .blueprints import Blueprint as Blueprint
|
||||
from .config import Config as Config
|
||||
from .ctx import after_this_request as after_this_request
|
||||
@@ -37,66 +39,22 @@ from .templating import render_template as render_template
|
||||
from .templating import render_template_string as render_template_string
|
||||
from .templating import stream_template as stream_template
|
||||
from .templating import stream_template_string as stream_template_string
|
||||
|
||||
__version__ = "2.3.3"
|
||||
from .wrappers import Request as Request
|
||||
from .wrappers import Response as Response
|
||||
|
||||
|
||||
def __getattr__(name):
|
||||
if name == "_app_ctx_stack":
|
||||
import warnings
|
||||
from .globals import __app_ctx_stack
|
||||
|
||||
warnings.warn(
|
||||
"'_app_ctx_stack' is deprecated and will be removed in Flask 2.4.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
return __app_ctx_stack
|
||||
|
||||
if name == "_request_ctx_stack":
|
||||
import warnings
|
||||
from .globals import __request_ctx_stack
|
||||
|
||||
warnings.warn(
|
||||
"'_request_ctx_stack' is deprecated and will be removed in Flask 2.4.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
return __request_ctx_stack
|
||||
|
||||
if name == "escape":
|
||||
import warnings
|
||||
from markupsafe import escape
|
||||
|
||||
warnings.warn(
|
||||
"'flask.escape' is deprecated and will be removed in Flask 2.4. Import"
|
||||
" 'markupsafe.escape' instead.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
return escape
|
||||
|
||||
if name == "Markup":
|
||||
import warnings
|
||||
from markupsafe import Markup
|
||||
|
||||
warnings.warn(
|
||||
"'flask.Markup' is deprecated and will be removed in Flask 2.4. Import"
|
||||
" 'markupsafe.Markup' instead.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
return Markup
|
||||
|
||||
if name == "signals_available":
|
||||
def __getattr__(name: str) -> t.Any:
|
||||
if name == "__version__":
|
||||
import importlib.metadata
|
||||
import warnings
|
||||
|
||||
warnings.warn(
|
||||
"'signals_available' is deprecated and will be removed in Flask 2.4."
|
||||
" Signals are always available",
|
||||
"The '__version__' attribute is deprecated and will be removed in"
|
||||
" Flask 3.1. Use feature detection or"
|
||||
" 'importlib.metadata.version(\"flask\")' instead.",
|
||||
DeprecationWarning,
|
||||
stacklevel=2,
|
||||
)
|
||||
return True
|
||||
return importlib.metadata.version("flask")
|
||||
|
||||
raise AttributeError(name)
|
||||
|
||||
Reference in New Issue
Block a user