Nothing fails without saying why
Nothing fails without saying why.
Every release before this one fixed failures as they were met: seven messages
in v0.7.0, eight stale flag names in v0.8.0, a port 8765 traceback in v0.8.2.
Each was found by someone tripping over it or reading the code. CLAUDE.md has
always required that no expected failure produces a traceback, and that was
enforced by noticing. This release went looking instead.
Seven things it found
An unexpected error is a message, not a traceback. Anything unanticipated
printed a Python traceback at the user, which is not actionable and reads as
the tool breaking rather than as a case it does not handle. It now says what
went wrong, that it is a bug rather than something you did, and where to
report it. TANGO_DEBUG=1 gives the traceback back.
A corrupt or unwritable database is a typed error. Reproduced rather than
imagined: a truncated file gives "file is not a database", an unwritable path
gives "unable to open database file". Each now names its own fix, whether
that is deleting the file, checking permissions, or closing another run.
The .apkg write is guarded. The last step was the one place a bare
OSError could reach you, and the worst: transcript fetched, every definition
looked up and paid for, audio downloaded, then a full disk takes the run with
it. The message now says how many cards were built and lost.
TangoError. Twenty typed exceptions across nine modules had nothing in
common, so the entry point could not tell a failure someone wrote a message
for from a genuine bug. Without it the first fix would have made the second
worse: a corrupt database would have been reported to you as a bug in Tango.
tango doctor names settings in .env that nothing reads. A setting that
does nothing is a failure with no message. Found in a real .env:
SPACY_MODEL=en_core_web_sm, which looks exactly like it chooses the model
and is read by nothing, and API_DELAY, a leftover. The model comes from the
language code; the knob that exists is SPACY_MODEL_SIZE_OVERRIDE.
Two implementations of WSL detection, both reading /proc/version.
A dead exception class, defined and documented and never raised.
Also
src/ now holds only the importable package. It also held nine icons for a
UI that does not exist, never imported and never packaged. Checked against
the PyPA guidance and six well-known projects before moving anything: src/
is "the code that is intended to be importable", psf/requests has exactly
src/requests/, and none of the six keeps a loose image at its repository
root.
The Dockerfile now ships in the sdist, so you can build the image without
cloning. SECURITY.md stopped naming a version: it said v0.4.x was the
latest supported while the project was on v0.8.2.
Upgrading
pip install --upgrade tango-ankiNothing to do to your collection. The notetype is unchanged.
Full detail in CHANGELOG.md.