You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These TODO comments were left around. Are we now able to act on them?
require.py:
A better implementation in Python that doesn't leak global symbols should be possible once some PythonMonkey bugs are fixed.
global-init.js:
due to current bugs in PythonMonkey, we can't access the cache property of require because it is a JS function wrapped in a Python function wrapper exposed to script as a native function.
pmjs.py:
The global require is to the JS function using a trick instead of a JS-wrapped-Python-wrapped function
Standalone code to reproduce the issue
No response
Relevant log output or backtrace
No response
Additional info if applicable
No response
What branch of PythonMonkey were you developing on? (If applicable)
I fixed the require.py ones in my branch yesterday, wes/DCP-4054/make-dcp-client-grok-pythonmonkey
I also noticed that we are leaking a util symbol as a side effect of console import, I think, as well as some XMLHttpRequest* symbols that I don't think should be global. Always a good idea to have a look at Object.keys(globalThis) after writing new code.
Activity
wesgarland commentedon Mar 9, 2024
I fixed the require.py ones in my branch yesterday,
wes/DCP-4054/make-dcp-client-grok-pythonmonkeyI also noticed that we are leaking a
utilsymbol as a side effect of console import, I think, as well as some XMLHttpRequest* symbols that I don't think should be global. Always a good idea to have a look atObject.keys(globalThis)after writing new code.wesgarland commentedon Mar 10, 2024
The XMLHttpRequest* symbols are okay - they are present in the browser
philippedistributive commentedon Jul 16, 2024
only the one in global-init.js remains