PythonMonkey
PythonMonkey copied to clipboard
Re-assess bug-related TODOs in scripts
Issue type
Other
How did you install PythonMonkey?
None
OS platform and distribution
No response
Python version (python --version
)
No response
PythonMonkey version (pip show pythonmonkey
)
No response
Bug Description
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)
No response
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.
The XMLHttpRequest* symbols are okay - they are present in the browser
only the one in global-init.js remains