From 849df98e55dd35389cc2fd55935d1592bd2692f6 Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Tue, 18 Apr 2023 18:05:27 -0700 Subject: [PATCH 01/37] Update pull_request_template.md --- .github/pull_request_template.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index a119e699c..a423818ca 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,7 +1,12 @@ -## Checklist +## Issues + + + +## Summary -Please update this checklist as you complete each item: + + +## Checklist - [ ] Tests have been included for all bug fixes or added functionality. - [ ] The `changelog.rst` has been updated with any significant changes. -- [ ] GitHub Issues which may be closed by this Pull Request have been linked. From 46bdf8c33ce19275ae8c7be729e2fb13a6754beb Mon Sep 17 00:00:00 2001 From: Ryan Morshead Date: Sun, 23 Apr 2023 00:18:32 -0600 Subject: [PATCH 02/37] WSGIContainer.environ changed (#971) Specifically it changed from a staticmethod to an instance one. This happened in Tornado 6.3. See: https://github.com/tornadoweb/tornado/pull/3231#issuecomment-1518957578 --- src/reactpy/backend/tornado.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/reactpy/backend/tornado.py b/src/reactpy/backend/tornado.py index c2a034ab2..b79f5fa0e 100644 --- a/src/reactpy/backend/tornado.py +++ b/src/reactpy/backend/tornado.py @@ -196,7 +196,7 @@ async def recv() -> Any: ConnectionContext( self._component_constructor(), value=Connection( - scope=WSGIContainer.environ(self.request), + scope=_FAKE_WSGI_CONTAINER.environ(self.request), location=Location( pathname=f"/{path[len(self._url_prefix):]}", search=( @@ -222,3 +222,10 @@ async def on_message(self, message: str | bytes) -> None: def on_close(self) -> None: if not self._dispatch_future.done(): self._dispatch_future.cancel() + + +# The interface for WSGIContainer.environ changed in Tornado version 6.3 from +# a staticmethod to an instance method. Since we're not that concerned with +# the details of the WSGI app itself, we can just use a fake one. +# see: https://github.com/tornadoweb/tornado/pull/3231#issuecomment-1518957578 +_FAKE_WSGI_CONTAINER = WSGIContainer(lambda *a, **kw: iter([])) From 0f34eb8904abb6ebfd6a098308f794ab3340cf6b Mon Sep 17 00:00:00 2001 From: Gautam Sharma <64241254+ZEUS-03@users.noreply.github.com> Date: Mon, 24 Apr 2023 01:34:30 +0530 Subject: [PATCH 03/37] added warning for html.script (#970) * added warning for html.script * updated Disclaimer to warning * warning added under scripting section * improve warning description * improve warning placement --------- Co-authored-by: Ryan Morshead --- src/reactpy/html.py | 50 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/src/reactpy/html.py b/src/reactpy/html.py index fa4953cda..5c1d8b6ad 100644 --- a/src/reactpy/html.py +++ b/src/reactpy/html.py @@ -1,4 +1,5 @@ """ + **Fragment** - :func:`_` @@ -409,7 +410,12 @@ def _script( key: Key | None, event_handlers: EventHandlerDict, ) -> VdomDict: - """Create a new `<{script}> `__ element. + """Create a new `