Selaa lähdekoodia

update removal version of deprecated features (#2224)

Thomas Brandého 1 vuosi sitten
vanhempi
säilyke
ed5b3818cb

+ 1 - 1
reflex/app.py

@@ -428,7 +428,7 @@ class App(Base):
                 feature_name="Passing script tags to add_page",
                 feature_name="Passing script tags to add_page",
                 reason="Add script components as children to the page component instead",
                 reason="Add script components as children to the page component instead",
                 deprecation_version="0.2.9",
                 deprecation_version="0.2.9",
-                removal_version="0.3.1",
+                removal_version="0.4.0",
             )
             )
             component.children.extend(script_tags)
             component.children.extend(script_tags)
 
 

+ 1 - 1
reflex/components/component.py

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

+ 5 - 4
reflex/components/typography/markdown.py

@@ -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_RAW = Var.create_safe("rehypeRaw", _var_is_local=False)
 _REHYPE_PLUGINS = Var.create_safe([_REHYPE_KATEX, _REHYPE_RAW])
 _REHYPE_PLUGINS = Var.create_safe([_REHYPE_KATEX, _REHYPE_RAW])
 
 
+
 # Component Mapping
 # Component Mapping
 def get_base_component_map() -> dict[str, Callable]:
 def get_base_component_map() -> dict[str, Callable]:
     """Get the base component map.
     """Get the base component map.
@@ -105,10 +106,10 @@ class Markdown(Component):
         # Custom styles are deprecated.
         # Custom styles are deprecated.
         if "custom_styles" in props:
         if "custom_styles" in props:
             console.deprecate(
             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.
         # Update the base component map with the custom component map.

+ 1 - 1
reflex/config.py

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

+ 1 - 1
reflex/event.py

@@ -688,7 +688,7 @@ def call_event_handler(
             feature_name="EVENT_ARG API for triggers",
             feature_name="EVENT_ARG API for triggers",
             reason="Replaced by new API using lambda allow arbitrary number of args",
             reason="Replaced by new API using lambda allow arbitrary number of args",
             deprecation_version="0.2.8",
             deprecation_version="0.2.8",
-            removal_version="0.3.0",
+            removal_version="0.4.0",
         )
         )
         if len(args) == 1:
         if len(args) == 1:
             return event_handler()
             return event_handler()

+ 7 - 7
reflex/state.py

@@ -607,7 +607,7 @@ class State(Base, ABC, extra=pydantic.Extra.allow):
             feature_name="get_token",
             feature_name="get_token",
             reason="replaced by `State.router.session.client_token`",
             reason="replaced by `State.router.session.client_token`",
             deprecation_version="0.3.0",
             deprecation_version="0.3.0",
-            removal_version="0.3.1",
+            removal_version="0.4.0",
         )
         )
         return self.router_data.get(constants.RouteVar.CLIENT_TOKEN, "")
         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",
             feature_name="get_sid",
             reason="replaced by `State.router.session.session_id`",
             reason="replaced by `State.router.session.session_id`",
             deprecation_version="0.3.0",
             deprecation_version="0.3.0",
-            removal_version="0.3.1",
+            removal_version="0.4.0",
         )
         )
         return self.router_data.get(constants.RouteVar.SESSION_ID, "")
         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",
             feature_name="get_headers",
             reason="replaced by `State.router.headers`",
             reason="replaced by `State.router.headers`",
             deprecation_version="0.3.0",
             deprecation_version="0.3.0",
-            removal_version="0.3.1",
+            removal_version="0.4.0",
         )
         )
         return self.router_data.get(constants.RouteVar.HEADERS, {})
         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",
             feature_name="get_client_ip",
             reason="replaced by `State.router.session.client_ip`",
             reason="replaced by `State.router.session.client_ip`",
             deprecation_version="0.3.0",
             deprecation_version="0.3.0",
-            removal_version="0.3.1",
+            removal_version="0.4.0",
         )
         )
         return self.router_data.get(constants.RouteVar.CLIENT_IP, "")
         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",
             feature_name="get_current_page",
             reason="replaced by State.router.page / self.router.page",
             reason="replaced by State.router.page / self.router.page",
             deprecation_version="0.3.0",
             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
         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",
             feature_name="get_query_params",
             reason="replaced by `State.router.page.params`",
             reason="replaced by `State.router.page.params`",
             deprecation_version="0.3.0",
             deprecation_version="0.3.0",
-            removal_version="0.3.1",
+            removal_version="0.4.0",
         )
         )
         return self.router_data.get(constants.RouteVar.QUERY, {})
         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",
             feature_name=f"rx.get_cookies",
             reason="and has been replaced by rx.Cookie, which can be used as a state var",
             reason="and has been replaced by rx.Cookie, which can be used as a state var",
             deprecation_version="0.3.0",
             deprecation_version="0.3.0",
-            removal_version="0.3.1",
+            removal_version="0.4.0",
         )
         )
         cookie_dict = {}
         cookie_dict = {}
         cookies = self.get_headers().get(constants.RouteVar.COOKIE, "").split(";")
         cookies = self.get_headers().get(constants.RouteVar.COOKIE, "").split(";")