Skip to content
This repository was archived by the owner on Sep 24, 2026. It is now read-only.

Releases

0.2.0 — Mojo 1.0

Choose a tag to compare

@conorbronsdon conorbronsdon released this 12 Aug 00:28
b84fb60
  • Builds on released Mojo 1.0. The pixi channel moved from
    max-nightly to max and the dependency pin from >=1.0.0b3.dev… to
    >=1.0,<2; CI installs mojo==1.0.0 from PyPI instead of the nightly
    index with --prerelease allow. The weekly drift check still runs
    against the latest nightly, so the repo still reports when the language
    moves under it.
  • 1.0 source fix (benchmark only). _report's elapsed_ns
    parameter is now Int: perf_counter_ns() no longer returns UInt,
    so bench/bench_resp.mojo failed to compile.
  • README test counts corrected: 34 → 36 protocol tests, and the two
    transport regressions CI also runs are now named. The 21 live-Redis
    integration tests were re-run against a real server and pass.

Fixed

  • Transport: suppress SIGPIPE on a dead connection. Writing to a
    socket whose peer has closed delivered SIGPIPE, terminating the whole
    process (exit 141) before send() could return EPIPE — so the
    existing error path never ran. CPython avoids this by installing
    SIG_IGN for SIGPIPE; a Mojo process does not. Fixed at the syscall
    boundary, platform-gated: MSG_NOSIGNAL on the send() flags on Linux,
    SO_NOSIGPIPE via setsockopt(2) after socket() on macOS/BSD. A dead
    peer now raises a catchable Error. Regression covered by
    test/test_connection.mojo (self-contained, no server; runs in CI).
  • Transport: close a poisoned connection instead of reusing it. After a
    raised protocol/parse or transport error, is_open() still returned
    True, so the byte stream stayed out of sync and every later command
    misframed its reply. read_reply (and a failed _send_all) now close the
    connection before propagating, so a subsequent command fails fast —
    matching redis-py, which disconnects on InvalidResponse. Regression
    covered by test_poisoned_connection_is_closed.
  • Parser: bound reply size against memory-exhaustion DoS. A hostile
    bulk-string length (e.g. $999999999999999999) or array element count
    had no ceiling, so the transport would recv/allocate unbounded. Added
    caps — 512 MiB per bulk string (matching Redis proto-max-bulk-len),
    1,048,576 elements per array, and a 528 MiB total unparsed-buffer
    ceiling — each raising on exceed. Regression covered by
    test_bulk_length_exceeds_cap_raises / test_array_count_exceeds_cap_raises.
  • Build: pixi install failed to resolve. The mojo = ">=1.0.0b3"
    pin sorts after the dev nightlies (1.0.0b3.dev…), so the solver
    found no candidates. Pinned to >=1.0.0b3.dev0,<2.