Releases: RaspberryPiFoundation/python-friendly-error-messages
Releases · RaspberryPiFoundation/python-friendly-error-messages
v0.7.1
v0.7.0
- fix: copy fixes / variant matching
Full Changelog: v0.6.0...v0.7.0
v0.6.0
- feat: improves accessibility of
result.htmloutput with WCAG 2.1 AA in mind
Full Changelog: v0.5.0...v0.6.0
v0.5.0
- feat: allows
fileandlineto be passed tofriendlyExplain()
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
-
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. - Run real Pyodide live in the browser instead of replaying hand-authored
-
feat: add release script (for managing npm publishing and GH releases)
Full Changelog: v0.3.0...v0.4.0