Skip to content

Commit 88c3ce6

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into pr/1271
2 parents 22a1de8 + d5a897e commit 88c3ce6

File tree

118 files changed

+3628
-3155
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+3628
-3155
lines changed

.github/workflows/.hatch-run.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
with:
4444
python-version: ${{ matrix.python-version }}
4545
- name: Install Python Dependencies
46-
run: pip install --upgrade pip hatch uv
46+
run: pip install --upgrade hatch uv
4747
- name: Run Scripts
4848
env:
4949
NPM_CONFIG_TOKEN: ${{ secrets.node-auth-token }}

.github/workflows/check.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- main
77
pull_request:
88
branches:
9-
- main
9+
- "*"
1010
schedule:
1111
- cron: "0 0 * * 0"
1212

@@ -27,8 +27,10 @@ jobs:
2727
job-name: "python-{0} {1}"
2828
run-cmd: "hatch test"
2929
runs-on: '["ubuntu-latest", "macos-latest", "windows-latest"]'
30-
python-version: '["3.9", "3.10", "3.11"]'
30+
python-version: '["3.10", "3.11", "3.12", "3.13"]'
3131
test-documentation:
32+
# Temporarily disabled
33+
if: 0
3234
uses: ./.github/workflows/.hatch-run.yml
3335
with:
3436
job-name: "python-{0}"

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# --- Build Artifacts ---
2-
src/reactpy/static/**/index.js*
2+
src/reactpy/static/index.js*
3+
src/reactpy/static/morphdom/
4+
src/reactpy/static/pyscript/
35

46
# --- Jupyter ---
57
*.ipynb_checkpoints
@@ -15,8 +17,8 @@ src/reactpy/static/**/index.js*
1517

1618
# --- Python ---
1719
.hatch
18-
.venv
19-
venv
20+
.venv*
21+
venv*
2022
MANIFEST
2123
build
2224
dist

docs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ RUN sphinx-build -v -W -b html source build
3333
# Define Entrypoint
3434
# -----------------
3535
ENV PORT=5000
36-
ENV REACTPY_DEBUG_MODE=1
36+
ENV REACTPY_DEBUG=1
3737
ENV REACTPY_CHECK_VDOM_SPEC=0
3838
CMD ["python", "main.py"]

docs/docs_app/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from docs_app.examples import get_normalized_example_name, load_examples
77
from reactpy import component
88
from reactpy.backend.sanic import Options, configure, use_request
9-
from reactpy.core.types import ComponentConstructor
9+
from reactpy.types import ComponentConstructor
1010

1111
THIS_DIR = Path(__file__).parent
1212
DOCS_DIR = THIS_DIR.parent

docs/source/about/changelog.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,43 @@ Changelog
1515
Unreleased
1616
----------
1717

18+
**Added**
19+
- :pull:`1113` - Added ``reactpy.executors.asgi.ReactPy`` that can be used to run ReactPy in standalone mode via ASGI.
20+
- :pull:`1269` - Added ``reactpy.executors.asgi.ReactPyPyodide`` that can be used to run ReactPy in standalone mode via ASGI, but rendered entirely client-sided.
21+
- :pull:`1113` - Added ``reactpy.executors.asgi.ReactPyMiddleware`` that can be used to utilize ReactPy within any ASGI compatible framework.
22+
- :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.pyscript_component`` that can be used to embed ReactPy components into your existing application.
24+
- :pull:`1113` - Added ``uvicorn`` and ``jinja`` installation extras (for example ``pip install reactpy[jinja]``).
25+
- :pull:`1113` - Added support for Python 3.12 and 3.13.
26+
- :pull:`1264` - Added ``reactpy.use_async_effect`` hook.
27+
- :pull:`1267` - Added ``shutdown_timeout`` parameter to the ``reactpy.use_async_effect`` hook.
28+
1829
**Changed**
1930

2031
- :pull:`1251` - Substitute client-side usage of ``react`` with ``preact``.
2132
- :pull:`1239` - Script elements no longer support behaving like effects. They now strictly behave like plain HTML script elements.
2233
- :pull:`1255` - The ``reactpy.html`` module has been modified to allow for auto-creation of any HTML nodes. For example, you can create a ``<data-table>`` element by calling ``html.data_table()``.
2334
- :pull:`1256` - Change ``set_state`` comparison method to check equality with ``==`` more consistently.
2435
- :pull:`1257` - Add support for rendering ``@component`` children within ``vdom_to_html``.
36+
- :pull:`1113` - Renamed the ``use_location`` hook's ``search`` attribute to ``query_string``.
37+
- :pull:`1113` - Renamed the ``use_location`` hook's ``pathname`` attribute to ``path``.
38+
- :pull:`1113` - Renamed ``reactpy.config.REACTPY_DEBUG_MODE`` to ``reactpy.config.REACTPY_DEBUG``.
39+
- :pull:`1113` - ``@reactpy/client`` now exports ``React`` and ``ReactDOM``.
40+
- :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.
2541

2642
**Removed**
2743

2844
- :pull:`1255` - Removed the ability to import ``reactpy.html.*`` elements directly. You must now call ``html.*`` to access the elements.
2945
- :pull:`1255` - Removed ``reactpy.sample`` module.
3046
- :pull:`1255` - Removed ``reactpy.svg`` module. Contents previously within ``reactpy.svg.*`` can now be accessed via ``html.svg.*``.
3147
- :pull:`1255` - Removed ``reactpy.html._`` function. Use ``html.fragment`` instead.
48+
- :pull:`1113` - Removed ``reactpy.run``. See the documentation for the new method to run ReactPy applications.
49+
- :pull:`1113` - Removed ``reactpy.backend.*``. See the documentation for the new method to run ReactPy applications.
50+
- :pull:`1113` - Removed ``reactpy.core.types`` module. Use ``reactpy.types`` instead.
51+
- :pull:`1113` - All backend related installation extras (such as ``pip install reactpy[starlette]``) have been removed.
52+
- :pull:`1113` - Removed deprecated function ``module_from_template``.
53+
- :pull:`1113` - Removed support for Python 3.9.
54+
- :pull:`1264` - Removed support for async functions within ``reactpy.use_effect`` hook. Use ``reactpy.use_async_effect`` instead.
3255

3356
**Fixed**
3457

docs/source/guides/escape-hatches/distributing-javascript.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ loaded with :func:`~reactpy.web.module.export`.
188188
189189
.. note::
190190

191-
When :data:`reactpy.config.REACTPY_DEBUG_MODE` is active, named exports will be validated.
191+
When :data:`reactpy.config.REACTPY_DEBUG` is active, named exports will be validated.
192192

193193
The remaining files that we need to create are concerned with creating a Python package.
194194
We won't cover all the details here, so refer to the Setuptools_ documentation for

docs/source/guides/getting-started/running-reactpy.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,29 +103,29 @@ Running ReactPy in Debug Mode
103103
-----------------------------
104104

105105
ReactPy provides a debug mode that is turned off by default. This can be enabled when you
106-
run your application by setting the ``REACTPY_DEBUG_MODE`` environment variable.
106+
run your application by setting the ``REACTPY_DEBUG`` environment variable.
107107

108108
.. tab-set::
109109

110110
.. tab-item:: Unix Shell
111111

112112
.. code-block::
113113
114-
export REACTPY_DEBUG_MODE=1
114+
export REACTPY_DEBUG=1
115115
python my_reactpy_app.py
116116
117117
.. tab-item:: Command Prompt
118118

119119
.. code-block:: text
120120
121-
set REACTPY_DEBUG_MODE=1
121+
set REACTPY_DEBUG=1
122122
python my_reactpy_app.py
123123
124124
.. tab-item:: PowerShell
125125

126126
.. code-block:: powershell
127127
128-
$env:REACTPY_DEBUG_MODE = "1"
128+
$env:REACTPY_DEBUG = "1"
129129
python my_reactpy_app.py
130130
131131
.. danger::

docs/source/reference/_examples/simple_dashboard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def RandomWalkGraph(mu, sigma):
4949
interval = use_interval(0.5)
5050
data, set_data = reactpy.hooks.use_state([{"x": 0, "y": 0}] * 50)
5151

52-
@reactpy.hooks.use_effect
52+
@reactpy.hooks.use_async_effect
5353
async def animate():
5454
await interval
5555
last_data_point = data[-1]

docs/source/reference/_examples/snake_game.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def on_direction_change(event):
9090

9191
interval = use_interval(0.5)
9292

93-
@reactpy.hooks.use_effect
93+
@reactpy.hooks.use_async_effect
9494
async def animate():
9595
if new_game_state is not None:
9696
await asyncio.sleep(1)

0 commit comments

Comments
 (0)