Skip to content

v1.1.1 — critical fix: import crash on Python 3.10–3.13

Choose a tag to compare

@leonardosalasd leonardosalasd released this 31 Jul 21:47
· 43 commits to main since this release
9b232da

CRITICAL FIX!!!

If you installed 1.1.0, it did not run on any Python below 3.14 — every command
failed on import with TypeError: 'function' object is not subscriptable.
This release fixes that. If you are on 1.1.0, please upgrade.

Thanks to @johnblommers for reporting it in #5.

Root cause: mistune resolves tokens to renderer methods by name, so the
renderer defines one called list, which shadows the builtin inside the class
body. An annotation added in 1.1.0 (tokens: list[dict]) was evaluated against
that method at import time. Python 3.14 defers annotation evaluation, so the
bug never appeared during development.

Also fixed

  • Square brackets now escape correctly. A lone ] anywhere in your Markdown
    previously aborted the build with "unexpected closing bracket". Bibliography
    citations [@key] still resolve as before.
  • Front matter no longer eats content. A document opening with a ---
    horizontal rule silently lost everything up to the next ---.
  • Legacy Windows consoles. The CLI's and characters aren't
    representable in cp1252, the default codepage for cmd.exe and many
    non-English Windows installs, so every command crashed with
    UnicodeEncodeError before doing any work. Present since 1.0.0; caught by
    the new Windows CI.

Preventing a repeat

CI now runs the test suite on Python 3.10–3.14 across Linux, macOS and Windows,
plus a smoke job that installs the built package and runs the CLI from a clean
directory — the exact path that failed for users.

Upgrade

pipx upgrade doc-engine-cli

Full Changelog: v1.1.0...v1.1.1