You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Google-style docstrings, complete type annotations, and runnable usage examples for
the public API (register_extensions, render_partial, extend_model, PartialsException) and the internal HTML wrapper.
PEP 561 py.typed marker, so type checkers consume the package's inline type
annotations; the package checks clean under ty and pyrefly, 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.py
and scripts/serve_docs.py; the built site is committed in docs/, and great-docs joins the dev extra (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 BeforeRender middleware 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 bare pytest from the repo root runs only the package's tests instead of erroring while
collecting the standalone example/ app's suite (which needs Pyramid and WebTest).
This changelog.
Changed
Packaging migrated from setup.py to a PEP 621 pyproject.toml. The version stays
single-sourced in chameleon_partials/__init__.py and dependencies in requirements*.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=True silently 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-version is now py39 to match requires-python (was py313), 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, not div), and several
typos were corrected: "incredible easy", "subtitle of author", "them middleware",
and "veiws" (#2,
thanks @hodgesd).