Skip to content

Releases: RaspberryPiFoundation/python-friendly-error-messages

v0.7.1

11 Jun 10:29
c27d543

Choose a tag to compare

  • chore: copy updates across the README, and some general formatting fixes
  • chore: highlight the auto "patch" functionality is experimental
  • fix: some example Python in an error explanation

Full Changelog: v0.7.0...v0.7.1

v0.7.0

10 Jun 20:33
22c26fe

Choose a tag to compare

  • fix: copy fixes / variant matching

Full Changelog: v0.6.0...v0.7.0

v0.6.0

10 Jun 16:45
f120ce6

Choose a tag to compare

  • feat: improves accessibility of result.html output with WCAG 2.1 AA in mind

Full Changelog: v0.5.0...v0.6.0

v0.5.0

10 Jun 15:16
b8984eb

Choose a tag to compare

  • feat: allows file and line to be passed to friendlyExplain()

eg.

// if the trace reports an unhelpful source location (eg. Pyodide runs code as "<exec>"), pass file explicitly to override what's parsed from the trace:
const result = friendlyExplain({
  error: rawTracebackString,
  code: editorCode,
  runtime: "pyodide",
  file: "main.py", // overrides the file from the trace
});

Full Changelog: v0.4.0...v0.5.0

v0.4.0

10 Jun 11:45
2fb1c45

Choose a tag to compare

  • feat: copydeck export script now includes links to demo/code, ID and "reviewed?" fields

  • feat: make the library Pyodide-first (for now)
    Refocus the demo and copydeck on what real Pyodide (pinned 0.26.2 /
    CPython 3.12) actually produces.

    Demo:

    • Run real Pyodide live in the browser instead of replaying hand-authored
      traces: each snippet is executed and its actual traceback is explained
    • Pin the Pyodide version in one place (docs/pyodide-config.js) and show
      it in the demo header
    • Add npm run regen:traces (scripts/regenerate-demo-traces.mjs) to cache
      real traces into docs/demo-examples.js, so the coverage test asserts
      against genuine Pyodide output

    Copydeck:

    • Match "assignment used instead of comparison" on the code pattern rather
      than a CPython message string, so it survives wording changes between
      versions
    • Drop the "incomplete input" SyntaxError variant: real Pyodide never emits
      that message (it's REPL / pre-3.10 only), so it isn't reachable here

    Behaviour:

    • friendlyExplain now returns null when there is no friendly mapping (or the
      error can't be parsed) instead of a generic "Python error" fallback, so
      callers fall back to the raw Python/Pyodide error. Removes the "Other"
      copydeck entry and the fallback UI strings.

    BREAKING CHANGE: friendlyExplain returns ExplainResult | null; callers must
    handle null rather than always receiving a result.

  • feat: add release script (for managing npm publishing and GH releases)

Full Changelog: v0.3.0...v0.4.0

v0.3.0

09 Jun 15:15
8bd360e

Choose a tag to compare

Version bump to 0.3.0

v0.2.0

09 Jun 15:14
8e0cc54

Choose a tag to compare

Version bump to 0.2.0

v0.1.6

09 Jun 15:14
57ece3e

Choose a tag to compare

Version bump to 0.1.6

v0.1.5

09 Jun 15:14
17328e6

Choose a tag to compare

Version bump to 0.1.5

v0.1.4

09 Jun 15:14
7c3d5c0

Choose a tag to compare

Version bump to 0.1.4