Skip to content

v0.7.1

Choose a tag to compare

@github-actions github-actions released this 12 Nov 19:53
Immutable release. Only release title and notes can be modified.
0400572

Fixed

  • A name nested past the interpreter's stack is a LimitExceeded on PyPy too. On
    PyPy the RecursionError can overflow the stack a second time while it unwinds, and
    PyPy then raises TypeError("couldn't record exception context ...") in its place.
    demangle_strict(), parse() and demangle_type() reported that as
    ParseError: ... parser failed; they now report the recursion bound it stands for, as
    they do on CPython, which is unaffected.
  • The MSVC parser no longer runs PyPy's stack out. A name nested thousands of levels
    deep through nested symbols or local scopes, read under RELAXED_LIMITS, could abort
    the PyPy process outright ("Fatal Python error: Aborted"), which no except can catch.
    On PyPy it now asks the interpreter at each new depth whether its stack is nearly
    full, and stops there with the same LimitExceeded("recursion depth"). CPython makes
    no extra call.
  • style() and Limits refuse values no parser can use. style("llvm", msvc=False)
    and Limits(max_depth="64") were accepted, and every name then failed inside the
    parser, which demangle() reports by handing the name back: the whole table came back
    unread with no error. Both are a ValueError now, as is an options object for a scheme
    that takes none. A misspelt option, msvc={"caling_convention": False}, was a
    TypeError from dataclasses.replace; it is the ValueError style() documents, and
    names the scheme's options. Code that caught TypeError there has to catch
    ValueError now.

Changed

  • The API reference shows types. Signatures on the site carry their annotations and
    return types, the Public API page's contents list the functions rather than the
    modules they live in, and the navigation is grouped into guide, reference,
    conformance and development.
  • The rest of the public surface is annotated. Node's methods, the exceptions'
    constructors, register_language, register_style, load_plugins and
    demangle_stream had no annotations, so parse(name).spell() or error.position
    reached a caller's type checker as Unknown. walk(), find() and children()
    yield Any: which fields a node has depends on its kind.
  • The README is a page, not the manual. What the library does, how to install it, a
    quick start and where to read on; the tour of every entry point and the command line
    moved, nearly word for word, to a new Using the library
    page. The two playground descriptions, docs/playground.md and playground/README.md,
    said the same thing twice; the page keeps what the playground does and the folder's
    README what its files are and how to run it.
  • Every >>> example on every page is run. tests/test_docs.py runs them with
    doctest, page by page, where before only a hand-kept list of the README's outputs was
    checked and the other pages' examples were only compiled.

Removed

  • The October audit and performance-pass reports, AUDIT.md and
    benchmarks/performance.md, with the paired before-and-after scripts and result files
    they cited (benchmarks/audit_*.py, benchmarks/bench_playground_bridge.py and
    benchmarks/results/). Each compared against one fixed older revision, so none
    measures anything today; what they found is in the 0.5.2 and later entries below.
    bench.py, compare.py, end_to_end.py and bench_playground_browser.py stay, and
    CONTRIBUTING.md now says what the last two are for.
  • The second copy of the playground archive under docs/assets/, and the worker's
    fallback to it. The playground has loaded playground/assets/demangle.zip since it
    became a page of its own.

Security

  • CI and the release build install every tool by hash, from files in the repository.
    The workflows ran pip install --upgrade pip uv, resolved the test, lint and docs
    dependencies afresh on each run and, in the job that builds what is published, installed
    the newest build, twine and hatchling with everything those depend on: a hijacked
    release of any of them would have run there within the hour, and could have changed the
    wheel before it was signed. uv is now pinned by hash in tools/uv-requirements.txt,
    everything else is installed from uv.lock with --require-hashes
    (tools/ci-install.sh), hatchling is locked there too as a build dependency group,
    and distributions are built without isolation and without a network. The release job
    no longer installs twine; CI runs twine check on every commit instead. Dependabot
    now updates uv.lock and the files under tools/, and waits a week before proposing a
    release. SECURITY.md says how a release is built and how to check one.
  • The documentation site and the playground load nothing from a third party. The
    playground took its Pyodide runtime from jsDelivr, in a worker where a script cannot
    carry an integrity hash, every page took a stylesheet from Google Fonts, and the home
    page took badge images from shields.io. The site now serves Pyodide itself:
    docs/hooks.py fetches the five runtime files when the site is built and refuses any
    whose SHA-256 is not the pinned one. The theme uses the system's fonts and the home
    page leaves the badges out. A browser test starts the real runtime and fails if any
    request leaves the site, and another reads every built page for a script, stylesheet,
    image or frame from another host.

Install with python -m pip install --upgrade demangle.

See the changelog for details.