Skip to content

Changelog

redef is unreleased; this page tracks the pre-release state so the first tagged version has an honest history.

Unreleased (2026-08-12)

The library as evaluated in "What a Function Rewriter Gets Wrong":

  • Core pipeline: rewrite, recover, gensym, rewrite.expansion, with the seven correctness details on by default (dedent, decorator stripping, line offsets, name verification, closure refusal at recompile, default-object preservation, __future__ flag inheritance).
  • Verify-by-recompile on by default, with the graded match / structural verdict. 330-cell reliability battery, zero false positives.
  • Typed error catalogue with reasons and remedies (SourceUnavailable, SourceMismatch, SourceUnparseable, NotAFunction, ClosureUnsupported, InnermostViolation).
  • Field-hardened by the klorpy port: three defects found by the trial's first run are fixed and regression-covered (module-level future flags, cross-build same-magic caches, closure refusal moved from acquisition to recompilation).

Known limits, carried into any release

  • Lambdas and frozen (sourceless) deployments are out of scope by design.
  • Closure recompilation is refused; acquisition of closures works. Cell-preserving rebuild is a possible future feature.
  • A wrapper below the decorator that does not set __wrapped__ is undetectable.
  • A stale edit changing only instruction structure, with every name and constant preserved, passes the structural verification grade.

Before the first release

  • Rename (the working name collides on PyPI), packaging, versioning, CI across 3.10–3.14 including a free-threaded build.
  • Port the research batteries (availability matrix, E6) into the package's own test suite.
  • Switch the first client (klorpy) from a vendored copy to a dependency.