From 309943628bc6a449c41c938342ed9c1e090245f7 Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Sun, 29 Dec 2024 21:19:13 -0800 Subject: [PATCH 1/4] 5.2.0 --- CHANGELOG.md | 7 ++++++- src/reactpy_django/__init__.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9a6b332..4c72dd2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,10 @@ Don't forget to remove deprecated code on each major release! ## [Unreleased] +- Nothing (yet)! + +### [5.2.0] - 2024-12-29 + ### Added - User login/logout features! @@ -540,7 +544,8 @@ Don't forget to remove deprecated code on each major release! - Support for IDOM within the Django -[Unreleased]: https://github.com/reactive-python/reactpy-django/compare/5.1.1...HEAD +[Unreleased]: https://github.com/reactive-python/reactpy-django/compare/5.2.0...HEAD +[5.2.0]: https://github.com/reactive-python/reactpy-django/compare/5.1.1...5.2.0 [5.1.1]: https://github.com/reactive-python/reactpy-django/compare/5.1.0...5.1.1 [5.1.0]: https://github.com/reactive-python/reactpy-django/compare/5.0.0...5.1.0 [5.0.0]: https://github.com/reactive-python/reactpy-django/compare/4.0.0...5.0.0 diff --git a/src/reactpy_django/__init__.py b/src/reactpy_django/__init__.py index 67bf30cf..3c07cd87 100644 --- a/src/reactpy_django/__init__.py +++ b/src/reactpy_django/__init__.py @@ -13,7 +13,7 @@ ) from reactpy_django.websocket.paths import REACTPY_WEBSOCKET_ROUTE -__version__ = "5.1.1" +__version__ = "5.2.0" __all__ = [ "REACTPY_WEBSOCKET_ROUTE", "components", From 3282506859226c68335a512158641dffd376b2c0 Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Sun, 29 Dec 2024 21:20:44 -0800 Subject: [PATCH 2/4] Remove unneeded space --- src/reactpy_django/templatetags/reactpy.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/reactpy_django/templatetags/reactpy.py b/src/reactpy_django/templatetags/reactpy.py index 4b85e216..029e7d8c 100644 --- a/src/reactpy_django/templatetags/reactpy.py +++ b/src/reactpy_django/templatetags/reactpy.py @@ -144,7 +144,6 @@ def component( ) _logger.error(msg) return failure_context(dotted_path, ComponentCarrierError(msg)) - _prerender_html = prerender_component(user_component, args, kwargs, uuid, request) # Fetch the offline component's HTML, if requested From cc3e381c10d6a7fe686138ebab29f77a1c3296ac Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Sun, 29 Dec 2024 21:40:51 -0800 Subject: [PATCH 3/4] Add some sleepy time before clicking disconnect --- tests/test_app/tests/test_components.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_app/tests/test_components.py b/tests/test_app/tests/test_components.py index 94f81f86..f88c1baf 100644 --- a/tests/test_app/tests/test_components.py +++ b/tests/test_app/tests/test_components.py @@ -358,7 +358,7 @@ def test_component_use_auth_no_rerender(self): # Make sure #use-auth[data-username="user_5"] does not appear with pytest.raises(TimeoutError): - self.page.wait_for_selector("#use-auth-no-rerender[data-username='user_5']", timeout=1) + self.page.wait_for_selector("#use-auth-no-rerender[data-username='user_5']", timeout=2) # Press disconnect and see if #use-auth[data-username="user_5"] appears self.page.wait_for_selector("#use-auth-no-rerender .disconnect").click(delay=CLICK_DELAY) From a48af537c3a9e8f549f84933b5d389d11aeb8429 Mon Sep 17 00:00:00 2001 From: Archmonger <16909269+Archmonger@users.noreply.github.com> Date: Sun, 29 Dec 2024 23:11:26 -0800 Subject: [PATCH 4/4] Mark no_rerender test as flaky --- tests/test_app/tests/test_components.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_app/tests/test_components.py b/tests/test_app/tests/test_components.py index f88c1baf..46e64104 100644 --- a/tests/test_app/tests/test_components.py +++ b/tests/test_app/tests/test_components.py @@ -349,6 +349,9 @@ def test_component_use_auth(self): # Double check that the user stayed logged out self.page.wait_for_selector("#use-auth[data-username='AnonymousUser']") + # FIXME: This test is flaky on GitHub Actions for unknown reasons. + # Fails at: self.page.wait_for_selector("#use-auth-no-rerender[data-username='user_5']") + @pytest.mark.flaky(reruns=5) @navigate_to_page("/") def test_component_use_auth_no_rerender(self): uuid = self.page.wait_for_selector("#use-auth-no-rerender").get_attribute("data-uuid") @@ -358,7 +361,7 @@ def test_component_use_auth_no_rerender(self): # Make sure #use-auth[data-username="user_5"] does not appear with pytest.raises(TimeoutError): - self.page.wait_for_selector("#use-auth-no-rerender[data-username='user_5']", timeout=2) + self.page.wait_for_selector("#use-auth-no-rerender[data-username='user_5']", timeout=1) # Press disconnect and see if #use-auth[data-username="user_5"] appears self.page.wait_for_selector("#use-auth-no-rerender .disconnect").click(delay=CLICK_DELAY) @@ -912,7 +915,7 @@ def test_form_orm_model(self): finally: os.environ.pop("DJANGO_ALLOW_ASYNC_UNSAFE") - # TODO: Remove the `reruns` value once we fix flakiness of `test_sync_form_events` + # FIXME: Remove the `reruns` value once we fix flakiness of `test_sync_form_events` # https://github.com/reactive-python/reactpy-django/issues/272 @pytest.mark.flaky(reruns=5) @navigate_to_page("/form/sync_event/")