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
Don't automatically copy python objects into javascript #1152
Conversation
…oxy.shallowCopyToJavascript and deepCopyToJavascript apis
…ect not hiwire id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @hoodmane, thanks for the Pull Request. From the code base this looks fine to me. Can you please shortly explain the changes in the test suite?
Since selenium.run uses runPython under the hood, wouldn't the semicolon itself suffice?
|
Yeah it would work, I opted for |
@hoodmane: It seems that we now have a regression with test_console.py and your change, can you please take a look at it? I don't know how to fix it quickly.
Next time it would be better to first merge master into this branch, and re-test it first. |
@hoodmane can you please investigate? I think the problem is in the conversion of Tuples, which is the case here. pyodide.runPython("from pyodide import console; shell = console.InteractiveConsole(); shell.complete('a')") returns |
@hoodmane I'm sorry I reverted your Pull Request because after a 3 hour examination of the problem I wasn't able to get into a solution. Maybe you should take a look on it. Can you then please re-open the Pull Request again, as I don't have a possibility to do it here. |
This PR currently is a bit bad for usability, it needs some supporting changes to pyproxy to make it a bit easier to use. I was thinking the right approach would be to merge this as-is and then preferably fix the ergonomics problems before the next release, but I could see adding more to this PR. shell.complete('a = 0 ; print.__g') into [completions, start] = shell.complete('a = 0 ; print.__g')
[tuple(completions), start] |
Oh also the docs on type conversions and the changelog should be updated. |
Presumably implementing |
This implements (the most important change suggested in) #900. This should also make the custom globals / locals feature of
eval_code
implemented in #1106 work significantly better.