Previously they were defined as macros and getters were defined for use in javascript, since javascript cannot access macros. Now both are replaced by global constants.
* Don't automatically copy python objects into javascript, add new PyProxy.shallowCopyToJavascript and deepCopyToJavascript apis
* Lint
* Adjust conftest to automatically deep_copy results of run / run_async
* Update conftest again
* Fix deep/shallowCopyToJavascript
* Fix shallowCopyToJavascript and deepCopyToJavascript to return js object not hiwire id
* Fix the remaining tests (hopefully)
* Lint
* Fix more tests
* Fix some numpy tests
* Lint
* Fix more tests
* Lint
* Temporarily dummy out setLineDash since it breaks test
* Fix test_console
* Update changelog
* Don't automatically copy python objects into javascript, add new PyProxy.shallowCopyToJavascript and deepCopyToJavascript apis
* Lint
* Adjust conftest to automatically deep_copy results of run / run_async
* Update conftest again
* Fix deep/shallowCopyToJavascript
* Fix shallowCopyToJavascript and deepCopyToJavascript to return js object not hiwire id
* Fix the remaining tests (hopefully)
* Lint
* Fix more tests
* Fix some numpy tests
* Lint
* Fix more tests
* Lint
* Temporarily dummy out setLineDash since it breaks test
* Patch ceval to add interrupt handler callback
* Don't use SharedArrayBuffer in test, Firefox doesn't expose it
* Fix test
* Retest
Co-authored-by: Jan Max Meyer <jmm@phorward.de>
* Added python2js_with_depth which only does lossy conversions down to a certain depth
* Added tests
* Fix reference error in test
* Fix typo in tests
* Use more sensible name _fresh_result for macro hygene as recommended by phorward
* Lint
* Minor cleanup of pyproxy
* Fix `isPyProxy` to handle undefined or null argument correctly
* Remove _pyproxy_enumerate
* Remove stray semicolon
* Forgot to _getPtr in apply
* Forgot to "return Reflect.get"
* Cleanup a bit
* Update test to reflect changes to behavior of pyproxy_dir
* Try again to get test dir right
Co-authored-by: Jan Max Meyer <jmm@phorward.de>
The goal of this PR is to ensure that JsProxy is no longer callable, now only JsMethod will be callable. Many bugs were caused by differences in behavior between the JsProxy_Call and JsBoundMethod_Call. If we build a proxy of a callable javascript object, we will use the subclass JsMethod. This way, there is only one Call method and no bugs caused by divergent behaviors.
`npm i` does not update timestamps if it ends up not installing or updating the packages. Before this commit, if emsdk is recompiled after installing these packages, then `npm i` will be triggered every build, because lessc and uglifyjs are older than emsdk.