23 Python stdlib modules, raw stdout streaming, and v0.0.38-0.0.39
Real-world HTML and DOM workloads from issues #99-#108 drove two back-to-back releases: Node import.meta.resolve and process.exitCode, 23 Apache-2.0 Python stdlib modules running unmodified html2text/markdownify/bs4/PyYAML byte-for-byte vs CPython, raw stdout past 64 KiB, and a ~151x html.parser speedup.
Right after v0.0.37 landed five languages on one VM, @codeandsolder opened issues #99 through #108 testing unmodified real-world JavaScript and Python HTML-extraction pipelines (linkedom, defuddle, webforai, html2text, markdownify + BeautifulSoup4, and pure-Python PyYAML). Every report came with a tight reproducer and exact expected output, turning two days of work into v0.0.38 (22 November, 8cb8399f) and v0.0.39 (23 November, ba4b6641).
What v0.0.38 landed
- Node ESM
import.meta.resolve(specifier, parent?)sharing the real ESM resolver (node:builtins,package.jsonexports/imports, relative/file URLs) andprocess.exitCodepropagation across scripts, modules, and TypeScript (#99). - 23 original Apache-2.0 Python stdlib modules (
_markupbase,html,html.entities,html.parser,urllib.*,warnings,codecs,logging,copyreg,threading,binascii,base64,tempfile,datetime,shlex,tomllib,importlib.util,unittest,unittest.mock), plus zero-dependency RFC 1950/1951zlib/ZIP_DEFLATED,shutil, and universal newline translation (#100, #103, #104, #105). - Linear O(N) prefix-table astral offsets in Python
re(#107), nativepy_re_findallandpathlibspeedups (#102, cutting a 353-file / 31,770-match Markdown scan from0.304 sto0.084 s), non-identifier entry directories ininitPythonProject(#106), and JS JIT DOM/HTML speedups (#101: WebforAI216.6 -> 123.3 ms, Defuddle232.0 -> 174.8 ms).
What v0.0.39 fixed the next day
Testing v0.0.38 on full-page HTML immediately exposed two sharp edges: native zipp py routed output through inspect_line (truncating silently at 64 KiB with "..." and appending newlines), and Python string slicing/searching called codepoints(s) inside every loop iteration, turning a 75 KiB html.parser run into a 10.1-second quadratic cliff.
v0.0.39 added a dedicated raw output sink (ScriptState::set_raw_output_sink + __zipp_py_write + sys.stdout.buffer / sys.stderr.buffer) so zipp py streams arbitrary UTF-8 and binary output byte-for-byte while metered sandboxes still enforce output_limit loudly. Replacing quadratic string slicing with native ASCII step-1 slicing and a shared O(log K) surrogate cache cut that 75 KiB html.parser run from 10.1 s to 66.9 ms (~151× faster), completed textwrap keyword arguments so unmodified html2text matches CPython byte-for-byte with default body_width=78, fixed a missed @@split fast-slot registration on %RegExp.prototype%, and added slab-backed Heap::alloc_planned_object pooling. See docs/releases/0.0.38.md and docs/releases/0.0.39.md.