Changelog
This changelog is generated automatically from GitHub Releases.
v0.2.0
2026-06-11 · GitHub
[0.2.0] - 2026-06-10
Added
- Google-style docstrings, complete type annotations, and runnable usage examples for the public API (register_extensions, render_partial, extend_model, PartialsException) and the internal
HTMLwrapper. - PEP 561
py.typedmarker, so type checkers consume the package’s inline type annotations; the package checks clean undertyandpyrefly, which join the dev requirements. - Documentation site rendered from those docstrings with Great Docs, published at https://mkennedy.codes/docs/chameleon-partials/. Includes
scripts/build_docs.pyandscripts/serve_docs.py; the built site is committed indocs/, andgreat-docsjoins thedevextra (skipped automatically on Python < 3.11). - Project URLs in the package metadata for the PyPI sidebar — Issues, Changelog, and Funding (GitHub Sponsors) — alongside the existing Homepage, Repository, and Documentation links.
- Pyramid
BeforeRendermiddleware pattern, documented in the README and wired into the example app, so views do not have to add render_partial to every model by hand. - Test suite (
tests/test_rendering.py) covering bare renders, partials with data, layouts, nested (recursive) partials, and error conditions. - Pytest configuration (
[tool.pytest.ini_options],testpaths = ["tests"]) so a barepytestfrom the repo root runs only the package’s tests instead of erroring while collecting the standaloneexample/app’s suite (which needs Pyramid and WebTest). - This changelog.
Changed
- Packaging migrated from
setup.pyto a PEP 621pyproject.toml. The version stays single-sourced inchameleon_partials/__init__.pyand dependencies inrequirements*.txt(read dynamically), so the built wheel is unchanged aside from added project URLs. - Raised the minimum supported Python from 3.6 to 3.9 (3.6-3.8 are end-of-life and match no supported Chameleon release). Trove classifiers now cover Python 3.9-3.14, and the development status is Production/Stable.
Fixed
- register_extensions no longer marks the extension as registered when registration fails. The flag used to be set before the template folder was validated, so a failed call left the library flagged as registered and a later retry with the default
cache_init=Truesilently did nothing. Failed registrations can now simply be retried. (Behavior change.) - extend_model’s type annotation now accepts
None(Optional[Dict[str, Any]]), matching its documented and actual behavior. - Ruff’s
target-versionis nowpy39to matchrequires-python(waspy313), so Ruff won’t rewrite code into newer-only idioms that would break on Python 3.9. - README accuracy: the Pyramid startup snippet now imports
Configurator, the listing snippet matches the example app’s template (span, notdiv), and several typos were corrected: “incredible easy”, “subtitle of author”, “them middleware”, and “veiws” (#2, thanks @hodgesd).