Update deprecation version to 0.5.0 (#2642)

This commit is contained in:
Nikhil Rao 2024-02-17 02:23:15 +07:00 committed by GitHub
parent 1683444d00
commit 4ad238c42c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 15 additions and 15 deletions

View File

@ -174,7 +174,7 @@ class App(Base):
feature_name="`state` argument for App()",
reason="due to all `rx.State` subclasses being inferred.",
deprecation_version="0.3.5",
removal_version="0.4.0",
removal_version="0.5.0",
)
if len(State.class_subclasses) > 0:
self.state = State
@ -451,7 +451,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.4.0",
removal_version="0.5.0",
)
component.children.extend(script_tags)
@ -649,7 +649,7 @@ class App(Base):
reason="Explicit calls to app.compile() are not needed."
" Method will be removed in 0.4.0",
deprecation_version="0.3.8",
removal_version="0.4.0",
removal_version="0.5.0",
)
return

View File

@ -387,7 +387,7 @@ class Component(BaseComponent, ABC):
feature_name="EventChain",
reason="to avoid confusion, only use yield API",
deprecation_version="0.2.8",
removal_version="0.4.0",
removal_version="0.5.0",
)
events: list[EventSpec] = []
for v in value:

View File

@ -123,7 +123,7 @@ class Markdown(Component):
feature_name="rx.markdown custom_styles",
reason="Use the component_map prop instead.",
deprecation_version="0.2.9",
removal_version="0.4.0",
removal_version="0.5.0",
)
# Update the base component map with the custom component map.

View File

@ -291,7 +291,7 @@ class Config(Base):
feature_name="Passing event_namespace in the config",
reason="",
deprecation_version="0.3.5",
removal_version="0.4.0",
removal_version="0.5.0",
)
return f'/{self.event_namespace.strip("/")}'

View File

@ -737,7 +737,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.4.0",
removal_version="0.5.0",
)
if len(args) == 1:
return event_handler()

View File

@ -747,7 +747,7 @@ class BaseState(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.4.0",
removal_version="0.5.0",
)
return self.router_data.get(constants.RouteVar.CLIENT_TOKEN, "")
@ -761,7 +761,7 @@ class BaseState(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.4.0",
removal_version="0.5.0",
)
return self.router_data.get(constants.RouteVar.SESSION_ID, "")
@ -775,7 +775,7 @@ class BaseState(Base, ABC, extra=pydantic.Extra.allow):
feature_name="get_headers",
reason="replaced by `State.router.headers`",
deprecation_version="0.3.0",
removal_version="0.4.0",
removal_version="0.5.0",
)
return self.router_data.get(constants.RouteVar.HEADERS, {})
@ -789,7 +789,7 @@ class BaseState(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.4.0",
removal_version="0.5.0",
)
return self.router_data.get(constants.RouteVar.CLIENT_IP, "")
@ -806,7 +806,7 @@ class BaseState(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.4.0",
removal_version="0.5.0",
)
return self.router.page.raw_path if origin else self.router.page.path
@ -823,7 +823,7 @@ class BaseState(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.4.0",
removal_version="0.5.0",
)
return self.router_data.get(constants.RouteVar.QUERY, {})
@ -837,7 +837,7 @@ class BaseState(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.4.0",
removal_version="0.5.0",
)
cookie_dict = {}
cookies = self.get_headers().get(constants.RouteVar.COOKIE, "").split(";")

View File

@ -203,7 +203,7 @@ def get_redis() -> Redis | None:
feature_name="host[:port] style redis urls",
reason="redis-py url syntax is now being used",
deprecation_version="0.3.6",
removal_version="0.4.0",
removal_version="0.5.0",
)
redis_url, has_port, redis_port = config.redis_url.partition(":")
if not has_port: