Skip to content

Commit 8285d56

Browse files
authored
Merge branch 'develop' into patch-1
2 parents e1ff1ce + fa48bbc commit 8285d56

32 files changed

+2031
-752
lines changed

docs/source/about/changelog.rst

+15-1
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ Unreleased
2020
- :pull:`1113` - Added ``reactpy.executors.asgi.ReactPy`` that can be used to run ReactPy in standalone mode via ASGI.
2121
- :pull:`1269` - Added ``reactpy.executors.asgi.ReactPyPyodide`` that can be used to run ReactPy in standalone mode via ASGI, but rendered entirely client-sided.
2222
- :pull:`1113` - Added ``reactpy.executors.asgi.ReactPyMiddleware`` that can be used to utilize ReactPy within any ASGI compatible framework.
23-
- :pull:`1113` :pull:`1269` - Added ``reactpy.templatetags.Jinja`` that can be used alongside ``ReactPyMiddleware`` to embed several ReactPy components into your existing application. This includes the following template tags: ``{% component %}``, ``{% pyscript_component %}``, and ``{% pyscript_setup %}``.
23+
- :pull:`1269` - Added ``reactpy.templatetags.Jinja`` that can be used alongside ``ReactPyMiddleware`` to embed several ReactPy components into your existing application. This includes the following template tags: ``{% component %}``, ``{% pyscript_component %}``, and ``{% pyscript_setup %}``.
2424
- :pull:`1269` - Added ``reactpy.pyscript_component`` that can be used to embed ReactPy components into your existing application.
2525
- :pull:`1113` - Added ``uvicorn`` and ``jinja`` installation extras (for example ``pip install reactpy[jinja]``).
2626
- :pull:`1113` - Added support for Python 3.12 and 3.13.
2727
- :pull:`1264` - Added ``reactpy.use_async_effect`` hook.
2828
- :pull:`1267` - Added ``shutdown_timeout`` parameter to the ``reactpy.use_async_effect`` hook.
29+
- :pull:`1281` - ``reactpy.html`` will now automatically flatten lists recursively (ex. ``reactpy.html(["child1", ["child2"]])``)
30+
- :pull:`1281` - Added ``reactpy.Vdom`` primitive interface for creating VDOM dictionaries.
31+
- :pull:`1281` - Added type hints to ``reactpy.html`` attributes.
2932

3033
**Changed**
3134

@@ -39,6 +42,11 @@ Unreleased
3942
- :pull:`1113` - Renamed ``reactpy.config.REACTPY_DEBUG_MODE`` to ``reactpy.config.REACTPY_DEBUG``.
4043
- :pull:`1113` - ``@reactpy/client`` now exports ``React`` and ``ReactDOM``.
4144
- :pull:`1263` - ReactPy no longer auto-converts ``snake_case`` props to ``camelCase``. It is now the responsibility of the user to ensure that props are in the correct format.
45+
- :pull:`1278` - ``reactpy.utils.reactpy_to_string`` will now retain the user's original casing for ``data-*`` and ``aria-*`` attributes.
46+
- :pull:`1278` - ``reactpy.utils.string_to_reactpy`` has been upgraded to handle more complex scenarios without causing ReactJS rendering errors.
47+
- :pull:`1281` - ``reactpy.core.vdom._CustomVdomDictConstructor`` has been moved to ``reactpy.types.CustomVdomConstructor``.
48+
- :pull:`1281` - ``reactpy.core.vdom._EllipsisRepr`` has been moved to ``reactpy.types.EllipsisRepr``.
49+
- :pull:`1281` - ``reactpy.types.VdomDictConstructor`` has been renamed to ``reactpy.types.VdomConstructor``.
4250

4351
**Removed**
4452

@@ -49,15 +57,21 @@ Unreleased
4957
- :pull:`1113` - Removed ``reactpy.run``. See the documentation for the new method to run ReactPy applications.
5058
- :pull:`1113` - Removed ``reactpy.backend.*``. See the documentation for the new method to run ReactPy applications.
5159
- :pull:`1113` - Removed ``reactpy.core.types`` module. Use ``reactpy.types`` instead.
60+
- :pull:`1278` - Removed ``reactpy.utils.html_to_vdom``. Use ``reactpy.utils.string_to_reactpy`` instead.
61+
- :pull:`1278` - Removed ``reactpy.utils.vdom_to_html``. Use ``reactpy.utils.reactpy_to_string`` instead.
5262
- :pull:`1113` - All backend related installation extras (such as ``pip install reactpy[starlette]``) have been removed.
5363
- :pull:`1113` - Removed deprecated function ``module_from_template``.
5464
- :pull:`1113` - Removed support for Python 3.9.
5565
- :pull:`1264` - Removed support for async functions within ``reactpy.use_effect`` hook. Use ``reactpy.use_async_effect`` instead.
66+
- :pull:`1281` - Removed ``reactpy.vdom``. Use ``reactpy.Vdom`` instead.
67+
- :pull:`1281` - Removed ``reactpy.core.make_vdom_constructor``. Use ``reactpy.Vdom`` instead.
68+
- :pull:`1281` - Removed ``reactpy.core.custom_vdom_constructor``. Use ``reactpy.Vdom`` instead.
5669

5770
**Fixed**
5871

5972
- :pull:`1239` - Fixed a bug where script elements would not render to the DOM as plain text.
6073
- :pull:`1271` - Fixed bug where JavaScript components were unable to obtain the ``key`` attribute provided within ReactPy.
74+
- :pull:`1254` - Fixed a bug where ``RuntimeError("Hook stack is in an invalid state")`` errors would be provided when using a webserver that reuses threads.
6175

6276
v1.1.0
6377
------

pyproject.toml

+2-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ commands = [
8080
]
8181
artifacts = []
8282

83-
8483
#############################
8584
# >>> Hatch Test Runner <<< #
8685
#############################
@@ -108,6 +107,8 @@ filterwarnings = """
108107
ignore::DeprecationWarning:uvicorn.*
109108
ignore::DeprecationWarning:websockets.*
110109
ignore::UserWarning:tests.test_core.test_vdom
110+
ignore::UserWarning:tests.test_pyscript.test_components
111+
ignore::UserWarning:tests.test_utils
111112
"""
112113
testpaths = "tests"
113114
xfail_strict = true

src/reactpy/__init__.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,27 @@
1919
use_state,
2020
)
2121
from reactpy.core.layout import Layout
22-
from reactpy.core.vdom import vdom
22+
from reactpy.core.vdom import Vdom
2323
from reactpy.pyscript.components import pyscript_component
24-
from reactpy.utils import Ref, html_to_vdom, vdom_to_html
24+
from reactpy.utils import Ref, reactpy_to_string, string_to_reactpy
2525

2626
__author__ = "The Reactive Python Team"
2727
__version__ = "2.0.0a1"
2828

2929
__all__ = [
3030
"Layout",
3131
"Ref",
32+
"Vdom",
3233
"component",
3334
"config",
3435
"create_context",
3536
"event",
3637
"hooks",
3738
"html",
38-
"html_to_vdom",
3939
"logging",
4040
"pyscript_component",
41+
"reactpy_to_string",
42+
"string_to_reactpy",
4143
"types",
4244
"use_async_effect",
4345
"use_callback",
@@ -51,8 +53,6 @@
5153
"use_ref",
5254
"use_scope",
5355
"use_state",
54-
"vdom",
55-
"vdom_to_html",
5656
"web",
5757
"widgets",
5858
]

0 commit comments

Comments
 (0)