update removal version of deprecated features (#2224)
This commit is contained in:
parent
8fc254041b
commit
ed5b3818cb
reflex
@ -428,7 +428,7 @@ class App(Base):
|
||||
feature_name="Passing script tags to add_page",
|
||||
reason="Add script components as children to the page component instead",
|
||||
deprecation_version="0.2.9",
|
||||
removal_version="0.3.1",
|
||||
removal_version="0.4.0",
|
||||
)
|
||||
component.children.extend(script_tags)
|
||||
|
||||
|
@ -263,7 +263,7 @@ class Component(Base, ABC):
|
||||
feature_name="EventChain",
|
||||
reason="to avoid confusion, only use yield API",
|
||||
deprecation_version="0.2.8",
|
||||
removal_version="0.3.0",
|
||||
removal_version="0.4.0",
|
||||
)
|
||||
events: list[EventSpec] = []
|
||||
for v in value:
|
||||
|
@ -32,6 +32,7 @@ _REHYPE_KATEX = Var.create_safe("rehypeKatex", _var_is_local=False)
|
||||
_REHYPE_RAW = Var.create_safe("rehypeRaw", _var_is_local=False)
|
||||
_REHYPE_PLUGINS = Var.create_safe([_REHYPE_KATEX, _REHYPE_RAW])
|
||||
|
||||
|
||||
# Component Mapping
|
||||
def get_base_component_map() -> dict[str, Callable]:
|
||||
"""Get the base component map.
|
||||
@ -105,10 +106,10 @@ class Markdown(Component):
|
||||
# Custom styles are deprecated.
|
||||
if "custom_styles" in props:
|
||||
console.deprecate(
|
||||
"rx.markdown custom_styles",
|
||||
"Use the component_map prop instead.",
|
||||
"0.2.9",
|
||||
"0.3.1",
|
||||
feature_name="rx.markdown custom_styles",
|
||||
reason="Use the component_map prop instead.",
|
||||
deprecation_version="0.2.9",
|
||||
removal_version="0.4.0",
|
||||
)
|
||||
|
||||
# Update the base component map with the custom component map.
|
||||
|
@ -290,7 +290,7 @@ class Config(Base):
|
||||
feature_name="Passing event_namespace in the config",
|
||||
reason="",
|
||||
deprecation_version="0.3.5",
|
||||
removal_version="0.3.10",
|
||||
removal_version="0.4.0",
|
||||
)
|
||||
return f'/{self.event_namespace.strip("/")}'
|
||||
|
||||
|
@ -688,7 +688,7 @@ def call_event_handler(
|
||||
feature_name="EVENT_ARG API for triggers",
|
||||
reason="Replaced by new API using lambda allow arbitrary number of args",
|
||||
deprecation_version="0.2.8",
|
||||
removal_version="0.3.0",
|
||||
removal_version="0.4.0",
|
||||
)
|
||||
if len(args) == 1:
|
||||
return event_handler()
|
||||
|
@ -607,7 +607,7 @@ class State(Base, ABC, extra=pydantic.Extra.allow):
|
||||
feature_name="get_token",
|
||||
reason="replaced by `State.router.session.client_token`",
|
||||
deprecation_version="0.3.0",
|
||||
removal_version="0.3.1",
|
||||
removal_version="0.4.0",
|
||||
)
|
||||
return self.router_data.get(constants.RouteVar.CLIENT_TOKEN, "")
|
||||
|
||||
@ -621,7 +621,7 @@ class State(Base, ABC, extra=pydantic.Extra.allow):
|
||||
feature_name="get_sid",
|
||||
reason="replaced by `State.router.session.session_id`",
|
||||
deprecation_version="0.3.0",
|
||||
removal_version="0.3.1",
|
||||
removal_version="0.4.0",
|
||||
)
|
||||
return self.router_data.get(constants.RouteVar.SESSION_ID, "")
|
||||
|
||||
@ -635,7 +635,7 @@ class State(Base, ABC, extra=pydantic.Extra.allow):
|
||||
feature_name="get_headers",
|
||||
reason="replaced by `State.router.headers`",
|
||||
deprecation_version="0.3.0",
|
||||
removal_version="0.3.1",
|
||||
removal_version="0.4.0",
|
||||
)
|
||||
return self.router_data.get(constants.RouteVar.HEADERS, {})
|
||||
|
||||
@ -649,7 +649,7 @@ class State(Base, ABC, extra=pydantic.Extra.allow):
|
||||
feature_name="get_client_ip",
|
||||
reason="replaced by `State.router.session.client_ip`",
|
||||
deprecation_version="0.3.0",
|
||||
removal_version="0.3.1",
|
||||
removal_version="0.4.0",
|
||||
)
|
||||
return self.router_data.get(constants.RouteVar.CLIENT_IP, "")
|
||||
|
||||
@ -666,7 +666,7 @@ class State(Base, ABC, extra=pydantic.Extra.allow):
|
||||
feature_name="get_current_page",
|
||||
reason="replaced by State.router.page / self.router.page",
|
||||
deprecation_version="0.3.0",
|
||||
removal_version="0.3.1",
|
||||
removal_version="0.4.0",
|
||||
)
|
||||
|
||||
return self.router.page.raw_path if origin else self.router.page.path
|
||||
@ -683,7 +683,7 @@ class State(Base, ABC, extra=pydantic.Extra.allow):
|
||||
feature_name="get_query_params",
|
||||
reason="replaced by `State.router.page.params`",
|
||||
deprecation_version="0.3.0",
|
||||
removal_version="0.3.1",
|
||||
removal_version="0.4.0",
|
||||
)
|
||||
return self.router_data.get(constants.RouteVar.QUERY, {})
|
||||
|
||||
@ -697,7 +697,7 @@ class State(Base, ABC, extra=pydantic.Extra.allow):
|
||||
feature_name=f"rx.get_cookies",
|
||||
reason="and has been replaced by rx.Cookie, which can be used as a state var",
|
||||
deprecation_version="0.3.0",
|
||||
removal_version="0.3.1",
|
||||
removal_version="0.4.0",
|
||||
)
|
||||
cookie_dict = {}
|
||||
cookies = self.get_headers().get(constants.RouteVar.COOKIE, "").split(";")
|
||||
|
Loading…
Reference in New Issue
Block a user