github skuznetsov/depyo.js v1.0.3
v1.0.3 — Py2.x boolean short-circuit reconstruction + fixture refresh

6 hours ago

Highlights

Fixes the long-standing task #68: Python 2.x boolean short-circuit expressions (and / or) now reconstruct as expressions instead of being rendered as cascaded if/elif trees.

Correctness fixes

  • Py2.x JUMP_IF_FALSE_A / JUMP_IF_TRUE_A + POP_TOP chains — peek-and-branch semantics now folded into ASTBinary AND/OR via a frame-based chain detector, matching Py3's _OR_POP path.
  • Py2.4 merged-exit shape — outer JUMP_IF_FALSE whose target points past an inner JUMP_IF_* to a shared POP_TOP is re-aimed at the inner jump so (b and c) or d no longer collapses to b and (c or d) (semantically different for falsy b).
  • AST precedenceLogicalAnd binds tighter than LogicalOr in ASTBinary.codeFragment so (b or c) and d keeps its parentheses.
  • Detector is restricted to the Py2.x peek-and-branch opcodes; the existing 3.x _OR_POP handler is untouched (no double-wrap).

Earlier fixes rolled into this release

  • Py2.x STORE_MAP no-op dropped dict entries (2b6400e).
  • Pure 2.7 listcomp with UNPACK_SEQUENCE_A in body (2b6400e).
  • Py2.x inline listcomp sentinel leak into COMPARE_OP / CALL (8ce0b8e).
  • Py2.x nested genexpr/comprehension dropped by phantom POP_BLOCK (1ac19b8).
  • Py3.5 BUILD_MAP_UNPACK_WITH_CALL oparg encoding + CALL_FUNCTION_EX always pops args (65fd52f).
  • Async comprehension reconstruction across 3.6–3.9 (afe57bd).
  • CALL_FUNCTION_EX with non-identifier keys now routed through **{k: v} (8f606bd).
  • Intrinsic IDs + PEP 696 TypeVar defaults, auto-handler regex, decorator rendering, positional-only defaults in marshal 3.9, silent exception swallow → non-zero exit.

Fixture suite

  • 1192 / 1216 passing. Remaining 24 are expected-file gaps, not failures.
  • 0 sentinel leaks (###FIXME###, ##ERROR##, ##SPECIAL##, ##ERROR_DECORATOR##, #TODO) across the whole snapshot tree.

Install

npm install -g depyo@1.0.3

Don't miss a new depyo.js release

NewReleases is sending notifications on new releases.