Repository navigation
v0.6.2 — PyYAML is now a core dependency
Packaging follow-up. No API changes.
Fixed
PyYAML was optional, but v0.6.1 made it mandatory
Once the bundled templates became the default fallback path, every default install parses YAML frontmatter on server startup — but PyYAML was never in [project.dependencies].
$ pip install py-idp==0.6.1 # clean venv
>>> TemplateRegistry.load_with_fallback('/nonexistent')
ImportError: idp.templates requires PyYAML. Install it with:
pip install PyYAML (or pip install py-idp[templates]).Found by installing the published wheel into a clean virtualenv and exercising the user-facing path. Local tests, wheel-content assertions, and all five CI Python-version jobs had passed — none of them ran in an environment without PyYAML already present.
PyYAML is now a core dependency. The import stays lazy so import idp remains fast and never hard-fails.
The error message pointed at a nonexistent extra
It recommended pip install py-idp[templates], but no templates = [...] entry was ever declared in pyproject.toml — the suggested command could not work. Declared it as a thin alias onto PyYAML so the message and any install docs keep working.
load_with_fallback degrades instead of crashing
If PyYAML is genuinely unavailable (stripped-down or vendored install), the bundled-parse attempt now warns and returns an empty registry rather than propagating ImportError and taking down server startup.
Added
Four tests in tests/test_template_packaging.py:
- PyYAML is in core dependencies
- the
[templates]extra is actually declared - the fallback degrades to empty when the yaml import raises
- the guard does not break the normal path
Why the test suite missed this
The v0.6.1 template-packaging fix passed everything checked at the time: local tests (PyYAML was already installed), wheel-content assertions, and all five CI Python-version jobs. None of those exercised a clean environment. Installing the published artifact into a fresh virtualenv was the only thing that surfaced it — a check now worth repeating for future packaging changes.
0.6.x series so far
| version | what |
|---|---|
| 0.6.0 | UnlimitedOcrBackend (baidu/Unlimited-OCR, MIT) — 32K context, constant-KV-cache R-SWA, native infer_multi() |
| 0.6.1 | Templates finally ship inside the wheel + sdist (they had shipped in zero releases since v0.3.1) |
| 0.6.2 | PyYAML is a core dependency, since bundled templates now load by default |
Also in 0.6.x: version consistency across pyproject.toml / idp.__version__ / CITATION.cff, now guarded by tests so they can't drift again (v0.5.0 reported 0.4.0 at runtime).
Install
pip install --upgrade py-idp