Repository navigation
v0.7.1
Immutable
release. Only release title and notes can be modified.
Fixed
- A name nested past the interpreter's stack is a
LimitExceededon PyPy too. On
PyPy theRecursionErrorcan overflow the stack a second time while it unwinds, and
PyPy then raisesTypeError("couldn't record exception context ...")in its place.
demangle_strict(),parse()anddemangle_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 underRELAXED_LIMITS, could abort
the PyPy process outright ("Fatal Python error: Aborted"), which noexceptcan catch.
On PyPy it now asks the interpreter at each new depth whether its stack is nearly
full, and stops there with the sameLimitExceeded("recursion depth"). CPython makes
no extra call. style()andLimitsrefuse values no parser can use.style("llvm", msvc=False)
andLimits(max_depth="64")were accepted, and every name then failed inside the
parser, whichdemangle()reports by handing the name back: the whole table came back
unread with no error. Both are aValueErrornow, as is an options object for a scheme
that takes none. A misspelt option,msvc={"caling_convention": False}, was a
TypeErrorfromdataclasses.replace; it is theValueErrorstyle()documents, and
names the scheme's options. Code that caughtTypeErrorthere has to catch
ValueErrornow.
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_pluginsand
demangle_streamhad no annotations, soparse(name).spell()orerror.position
reached a caller's type checker asUnknown.walk(),find()andchildren()
yieldAny: which fields a node has depends on itskind. - 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.mdandplayground/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.pyruns 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.mdand
benchmarks/performance.md, with the paired before-and-after scripts and result files
they cited (benchmarks/audit_*.py,benchmarks/bench_playground_bridge.pyand
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.pyandbench_playground_browser.pystay, 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 loadedplayground/assets/demangle.zipsince 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 ranpip 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 newestbuild,twineandhatchlingwith 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 intools/uv-requirements.txt,
everything else is installed fromuv.lockwith--require-hashes
(tools/ci-install.sh), hatchling is locked there too as abuilddependency group,
and distributions are built without isolation and without a network. The release job
no longer installs twine; CI runstwine checkon every commit instead. Dependabot
now updatesuv.lockand the files undertools/, and waits a week before proposing a
release.SECURITY.mdsays 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.pyfetches 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.