Skip to content

Releases

v0.0.215

Choose a tag to compare

@tamnd tamnd released this 28 Apr 15:16
v0.0.215
38aebd3

v0.0.215

Fixture 215: full html.entities coverage — name2codepoint (252 entries), codepoint2name, and the complete HTML5 entity table (2231 entries including no-semicolon legacy variants).

Changes

  • src/vm/html5_table.zig: new file — full CPython html.entities.html5 table (2231 entries), generated from CPython Lib/html/entities.py
  • src/vm/html_mod.zig: buildEntities now builds html5 dict from html5_table instead of the small HTML4 subset
  • tests/fixtures/fixtures.zig: added 215_html_entities
  • tests/fixtures/215_html_entities.*: fixture files

All 215 fixtures pass. All 5 cross-compilation targets clean.

Full Changelog: v0.0.214...v0.0.215

v0.0.214

Choose a tag to compare

@tamnd tamnd released this 28 Apr 12:22
v0.0.214
b85d961

v0.0.214

Fixture 214: extended html.parser.HTMLParser — processing instructions, CDATA/unknown_decl, entity/charref callbacks, convert_charrefs kwarg, getpos(), and incremental feed buffering.

Changes

  • src/vm/html_mod.zig:
    • ParserState gains line/col fields for position tracking
    • parserGetposFn: new getpos() method returning (line, col) tuple
    • emitText helper: when convert_charrefs=True (default), unescape entities in text data; when False, emit handle_entityref/handle_charref callbacks for &name; and &#NNN; patterns
    • parserFeed rewritten: uses state.buf for incremental buffering, handles <?...?> (PI), <![...]> (unknown_decl/CDATA), all existing token types; leaves incomplete tokens in buffer across feed() calls
    • New base class no-ops: handle_pi, unknown_decl, handle_entityref, handle_charref
    • buildParser: registers all new methods
  • tests/fixtures/fixtures.zig: added 214_html_parser
  • tests/fixtures/214_html_parser.*: fixture files

All 214 fixtures pass. All 5 cross-compilation targets clean.

Full Changelog: v0.0.213...v0.0.214

v0.0.213

Choose a tag to compare

@tamnd tamnd released this 28 Apr 11:41
v0.0.213
6a32f66

v0.0.213

Fixture 213: html module — html.escape, html.unescape, html.entities, html.parser.HTMLParser.

Changes

  • src/vm/html_mod.zig: full rewrite
    • HTML4 entity table (~253 entries) used for unescape named-entity lookup, html.entities.name2codepoint, html.entities.codepoint2name, and html.entities.html5
    • escape(s, quote=True): escapes &, <, >, and optionally ", '
    • unescape(s): handles named entities, &#NNN;, &#xHH;
    • buildEntities: builds html.entities module with name2codepoint (dict), codepoint2name (dict), html5 (dict, 253+ entries keyed as "name;")
    • buildParser: builds html.parser module with HTMLParser class; tokenizer handles text, comments (<!-- -->), declarations (<!), end tags, start tags, and self-closing tags; default handle_startendtag calls handle_starttag + handle_endtag
  • src/vm/interp.zig: added html_entities_module, html_parser_module, html_parser_class fields; added "html.entities" and "html.parser" dispatch blocks
  • tests/fixtures/fixtures.zig: added 213_html
  • tests/fixtures/213_html.*: fixture files copied from goipy testdata

All 213 fixtures pass. All 5 cross-compilation targets clean.

Full Changelog: v0.0.212.2...v0.0.213

v0.0.212.2

Choose a tag to compare

@tamnd tamnd released this 28 Apr 11:20
v0.0.212.2
4315255

v0.0.212.2

Patch: fix cross-compilation for all 5 targets (Linux musl, macOS, Windows).

Changes

  • src/vm/signal_mod.zig: use POSIX sigemptyset/sigaddset/sigismember for
    pthread_sigmask so sigset_t (an opaque array on Linux/musl) is never touched
    as an integer; guard Windows-incompatible calls (strsignal, alarm,
    pthread_sigmask) with early comptime returns.
  • src/vm/socket_mod.zig: change Fd = c.fd_t → c_int (c.fd_t is *anyopaque
    on Windows); add @ptrCast(@alignCast(...)) to five bind/connect/sendto
    calls (Linux sockaddr has alignment 2); wrap all POSIX-only socket syscalls and
    network helper externs (inet_pton, ntohs, etc.) in a posix_net conditional
    struct so Windows targets link cleanly.
  • src/vm/ssl_mod.zig: same Fd = c_int fix; wrap htons/inet_pton externs in
    posix_net; guard recvWithPending, sslSendall, sslSend, sslClose,
    sslShutdown, getServerCertificateFn with Windows stubs.
  • src/vm/select_mod.zig: change c.fd_t → c_int for FdEntry.fd and
    valueToFd; guard poll-using code path on Windows.
  • src/vm/selectors_mod.zig: same c_int fixes; guard selSelectKw on Windows.
  • src/vm/mmap_mod.zig: wrap POSIX-only externs (mmap, munmap, msync,
    madvise, getpagesize) in a posix_mmap conditional struct with Windows
    stubs; guard entry.file.handle (HANDLE on Windows) from being cast to c_int.
  • src/vm/subprocess_mod.zig: guard child.id (process HANDLE on Windows) from
    being cast to integer pid.

Full Changelog: v0.0.212.1...v0.0.212.2

v0.0.212.1

Choose a tag to compare

@tamnd tamnd released this 28 Apr 10:41
v0.0.212.1
6892192

Patch: fix CI on Linux (link_libc) and rename changelog files to zero-padded format.

Changes

  • build.zig: add link_libc = true to the zag module so Linux/glibc builds
    compile without "dependency on libc must be explicitly specified" errors.
  • changelog/: rename all files from 0.0.N.md to 0.0.NNN.md (zero-padded
    to three digits) so directory listings sort correctly by version number.
    Patch files follow the same pattern: 0.0.N.M.md → 0.0.NNN.MMM.md.

v0.0.212

Choose a tag to compare

@tamnd tamnd released this 28 Apr 10:41
v0.0.212
c4511f1

Implement quopri module to pass fixture 212.

Changes

  • src/vm/quopri_mod.zig: new module with encodestring (quotetabs, header
    kwargs) and decodestring (header kwarg); handles =XX encoding/decoding,
    soft line breaks (=\n), and header mode (space ↔ underscore).
  • src/vm/interp.zig: add quopri_module field; register "quopri" in
    getBuiltinModule.
  • tests/fixtures/212_*: fixture from goipy.

v0.0.211

Choose a tag to compare

@tamnd tamnd released this 28 Apr 10:41
v0.0.211
16a1b7c

Extend binascii module to pass fixture 211.

Changes

  • src/vm/binascii_mod.zig: add Error (ValueError subclass) and Incomplete
    (Exception subclass) exception classes; hexlify sep/bytes_per_sep kwargs;
    a2b_base64 strict_mode kwarg; crc_hqx (CRC-CCITT 0x1021); b2a_uu/a2b_uu
    (UU encoding, backtick kwarg); b2a_qp/a2b_qp (quoted-printable, header kwarg);
    rlecode_hqx/rledecode_hqx (BinHex RLE); b2a_hqx/a2b_hqx (BinHex 4.0 6-bit
    encoding; a2b_hqx returns (bytes, done) tuple).
  • tests/fixtures/211_*: fixture from goipy.

v0.0.210

Choose a tag to compare

@tamnd tamnd released this 28 Apr 10:41
v0.0.210
8fae609

Extend base64 module to pass fixture 210.

Changes

  • src/vm/base64_mod.zig: rewrite with kwarg support via BuiltinKwFnPtr; b64encode/b64decode
    altchars and validate kwargs; strict padding validation in b64decode (raise ValueError for
    non-multiple-of-4 input, matching CPython); urlsafe_b64decode auto-padding; b32decode/
    b32hexdecode/b16decode casefold kwarg; encodebytes/decodebytes 57-byte chunk + newline
    formatting; b32hexencode/b32hexdecode with B32HEX alphabet; b85encode/b85decode RFC 1924
    with correct partial-group padding ('~' value 84); a85encode/a85decode ASCII85 with adobe
    and foldspaces kwargs; standard_b64encode/standard_b64decode aliases.
  • tests/fixtures/210_*: fixture from goipy.

v0.0.209

Choose a tag to compare

@tamnd tamnd released this 28 Apr 10:41
v0.0.209
dfc88dc

Add mimetypes module (fixture 209).

Implements guess_type, guess_all_extensions, guess_extension,
add_type, init, read_mime_types, and the MimeTypes class.
Module-level suffix_map, encodings_map, and types_map are
populated at build time with 100+ common MIME entries.

v0.0.208

Choose a tag to compare

@tamnd tamnd released this 28 Apr 10:41
v0.0.208
3c5caa7

Add mailbox module (fixture 208).

Implements in-memory mbox and Maildir stores with add, remove,
discard, clear, keys, __contains__, get_string, get_bytes,
and __getitem__ returning an mboxMessage that parses headers on
demand. Also adds mailbox.Error, NoSuchMailboxError, and
FormatError exception classes.