Refactoring related to ReactPy v2.0.0#294
Open
shawncrawley wants to merge 2 commits intoreactive-python:mainfrom
Open
Refactoring related to ReactPy v2.0.0#294shawncrawley wants to merge 2 commits intoreactive-python:mainfrom
shawncrawley wants to merge 2 commits intoreactive-python:mainfrom
Conversation
Archmonger
reviewed
Feb 13, 2026
Archmonger
reviewed
Feb 13, 2026
Author
|
So I actually realized that most of the pyscript code here in Unhandled exception in event loop
Traceback (most recent call last):
File "/lib/python3.13/site-packages/reactpy/executors/pyscript/layout_handler.py", line 157, in run
update = await root_layout.render()
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lib/python3.13/site-packages/reactpy/core/layout.py", line 122, in render
return await self._parallel_render()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/lib/python3.13/site-packages/reactpy/core/layout.py", line 158, in _parallel_render
return update_task.result()
~~~~~~~~~~~~~~~~~~^^
File "/lib/python3.13/site-packages/reactpy/core/layout.py", line 174, in _create_layout_update
new_state = await self._render_component(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...<6 lines>...
)
^
File "/lib/python3.13/site-packages/reactpy/core/layout.py", line 279, in _render_component
await life_cycle_hook.affect_component_did_render()
File "/lib/python3.13/site-packages/reactpy/core/_life_cycle_hook.py", line 232, in affect_component_did_render
self.unset_current()
~~~~~~~~~~~~~~~~~~^^
File "/lib/python3.13/site-packages/reactpy/core/_life_cycle_hook.py", line 271, in unset_current
if HOOK_STACK.get().pop() is not self:
~~~~~~~~~~~~~~~~~~~~^^
IndexError: pop from empty listI haven't pushed these code updates since I haven't solved this bug and wanted some feedback on it. Also, I wanted to make sure that purging most of the pyscript code from reactpy-django and instead referencing it in reactpy core is desired. Let me know your thoughts on this. I'm happy to push my code updates if desired. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
My attempt at refactoring to align with ReactPy v2.0.0. This depends upon the refactors that were also made to reactpy-router to align with ReactPy v2.0.0 (see PR for that here).
There are a few remaining fixes/updates that I haven't been able to figure out yet. These are the related tests that fail when I run them locally:
The first two are related to open discussion here. As for the rest, I still have no idea what the problem is after digging for hours.
Checklist
Please update this checklist as you complete each item:
By submitting this pull request I agree that all contributions comply with this project's open source license(s).