File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ def pyscript_component_html(
8787 )
8888
8989
90+ @functools .cache
9091def pyscript_setup_html (
9192 extra_py : Sequence [str ],
9293 extra_js : dict [str , Any ] | str ,
@@ -105,13 +106,12 @@ def pyscript_setup_html(
105106 )
106107
107108
109+ @functools .cache
108110def extend_pyscript_config (
109111 extra_py : Sequence [str ],
110112 extra_js : dict [str , str ] | str ,
111113 config : dict [str , Any ] | str ,
112114) -> str :
113- import orjson
114-
115115 # Extends ReactPy's default PyScript config with user provided values.
116116 pyscript_config : dict [str , Any ] = {
117117 "packages" : [reactpy_version_string (), "jsonpointer==3.*" , "ssl" ],
@@ -135,7 +135,7 @@ def extend_pyscript_config(
135135 pyscript_config .update (json .loads (config ))
136136 elif config and isinstance (config , dict ):
137137 pyscript_config .update (config )
138- return orjson .dumps (pyscript_config ). decode ( "utf-8" )
138+ return json .dumps (pyscript_config )
139139
140140
141141def reactpy_version_string () -> str : # nocov
You can’t perform that action at this time.
0 commit comments