Skip to content

Better experimental_create_proxy #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Conversation

WebReflection
Copy link
Contributor

This MR would like to improve the story around experimental_create_proxy flag:

  • both callbacks and dictionaries or any other Pythonic reference are converted into JS
  • the FinalizationRegistry is already integrated in Pyodide, no need to duplicate that effort
  • smaller code and more reliable, also tested with a real-world use case (see test folder)
  • removed the patch for main only, once the flag is enabled, it patches workers too regardless

This should simplify by far code sharing between MicroPython and Pyodide avoiding redundant, unexpected, sometimes wrongly handled explicit to_js and create_proxy calls ... it's all automatically handled by the JS GC

@WebReflection WebReflection requested a review from ntoll May 9, 2025 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant