Skip to content

Commit e85723d

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into fix-corrupted-hook-state
2 parents d490009 + d906dc8 commit e85723d

Some content is hidden

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

91 files changed

+2380
-3391
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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# --- Build Artifacts ---
2-
src/reactpy/static/**/index.js*
2+
src/reactpy/static/*
33

44
# --- Jupyter ---
55
*.ipynb_checkpoints
@@ -15,8 +15,8 @@ src/reactpy/static/**/index.js*
1515

1616
# --- Python ---
1717
.hatch
18-
.venv
19-
venv
18+
.venv*
19+
venv*
2020
MANIFEST
2121
build
2222
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/_exts/autogen_api_docs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def generate_api_docs():
4343
if file.name == "__init__.py":
4444
if file.parent != PYTHON_PACKAGE:
4545
content.append(make_package_section(file))
46-
else:
46+
elif not file.name.startswith("_"):
4747
content.append(make_module_section(file))
4848

4949
API_FILE.write_text("\n".join(content))

docs/source/about/changelog.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,44 @@ Changelog
1515
Unreleased
1616
----------
1717

18+
**Added**
19+
- :pull:`1113` - Added ``reactpy.ReactPy`` that can be used to run ReactPy in standalone mode.
20+
- :pull:`1113` - Added ``reactpy.ReactPyMiddleware`` that can be used to run ReactPy with any ASGI compatible framework.
21+
- :pull:`1113` - Added ``reactpy.jinja.Component`` that can be used alongside ``ReactPyMiddleware`` to embed several ReactPy components into your existing application.
22+
- :pull:`1113` - Added ``standard``, ``uvicorn``, ``jinja`` installation extras (for example ``pip install reactpy[standard]``).
23+
- :pull:`1113` - Added support for Python 3.12 and 3.13.
24+
1825
**Changed**
1926

2027
- :pull:`1251` - Substitute client-side usage of ``react`` with ``preact``.
2128
- :pull:`1239` - Script elements no longer support behaving like effects. They now strictly behave like plain HTML script elements.
29+
- :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()``.
30+
- :pull:`1256` - Change ``set_state`` comparison method to check equality with ``==`` more consistently.
31+
- :pull:`1257` - Add support for rendering ``@component`` children within ``vdom_to_html``.
32+
- :pull:`1113` - Renamed the ``use_location`` hook's ``search`` attribute to ``query_string``.
33+
- :pull:`1113` - Renamed the ``use_location`` hook's ``pathname`` attribute to ``path``.
34+
- :pull:`1113` - Renamed ``reactpy.config.REACTPY_DEBUG_MODE`` to ``reactpy.config.REACTPY_DEBUG``.
35+
36+
**Removed**
37+
38+
- :pull:`1255` - Removed the ability to import ``reactpy.html.*`` elements directly. You must now call ``html.*`` to access the elements.
39+
- :pull:`1255` - Removed ``reactpy.sample`` module.
40+
- :pull:`1255` - Removed ``reactpy.svg`` module. Contents previously within ``reactpy.svg.*`` can now be accessed via ``html.svg.*``.
41+
- :pull:`1255` - Removed ``reactpy.html._`` function. Use ``html.fragment`` instead.
42+
- :pull:`1113` - Removed ``reactpy.run``. See the documentation for the new method to run ReactPy applications.
43+
- :pull:`1113` - Removed ``reactpy.backend.*``. See the documentation for the new method to run ReactPy applications.
44+
- :pull:`1113` - Removed ``reactpy.core.types`` module. Use ``reactpy.types`` instead.
45+
- :pull:`1113` - All backend related installation extras (such as ``pip install reactpy[starlette]``) have been removed.
46+
- :pull:`1113` - Removed deprecated function ``module_from_template``.
47+
- :pull:`1113` - Removed support for Python 3.9.
2248

2349
**Fixed**
2450

2551
- :pull:`1239` - Fixed a bug where script elements would not render to the DOM as plain text.
2652

2753
v1.1.0
2854
------
55+
:octicon:`milestone` *released on 2024-11-24*
2956

3057
**Fixed**
3158

@@ -61,6 +88,7 @@ v1.1.0
6188

6289
v1.0.2
6390
------
91+
:octicon:`milestone` *released on 2023-07-03*
6492

6593
**Fixed**
6694

@@ -69,6 +97,7 @@ v1.0.2
6997

7098
v1.0.1
7199
------
100+
:octicon:`milestone` *released on 2023-06-16*
72101

73102
**Changed**
74103

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/_examples/run_starlette.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# :lines: 11-
1+
# :lines: 10-
22

33
from reactpy import run
44
from reactpy.backend import starlette as starlette_server

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::

0 commit comments

Comments
 (0)