pyodide
pyodide copied to clipboard
Implement interpreter shutdown
This is on top of #2795. It adds an option exitMode which can be set to:
- "no-exit": current behavior.
- "throw": Shut down interpreter then throw an error
- "quit-process": in browser, is the same as "throw". In node,
sys.exit(returncode)will exit the node process with the given return code.
"quit-process" will be useful when running pytest.
TODO: close out pyodide API after shutdown.
Checklists
- [ ] Add a CHANGELOG entry
- [ ] Add / update tests
- [ ] Add new / update outdated documentation