Repository navigation
3.1.0
Important
In Swift, the .object that namespace() returns now holds an internal marker instead of its attributes. This affects custom filters, custom functions, and direct calls to Globals.namespace. Encoding a namespace, or a value that contains one, with JSONEncoder now throws, and namespaces compare and hash by identity.
This release brings more templates in line with Jinja2, so some output changes:
- Namespace attributes named like dict methods now read back as stored values, so
namespace(items=[])works and the LFM3-Omni chat template renders. Thanks to @JuanColilla for reporting this and for the first fix (#106). - Namespaces now raise errors for iteration,
length, andtojson, as they do in Jinja2 (#106). attribute=filters now look up items first (#106)..title(),.lower(), and.upper()now follow Python's Unicode casing. For example,they'rebecomesThey'Re, and a final sigma lowercases toς(#104).|liston a dict now returns its keys,|intconverts booleans, and dicts and undefined values passis sequence(#105).inand==now compare integers and floats exactly, including integers above 2^53 (#105).
What's Changed
- Match Python's Unicode casing in string methods by @mattt in #104
- Match Jinja2's numeric, sequence, and filter behavior by @mattt in #105
- Distinguish namespace attributes from dict methods by @mattt in #106
Full Changelog: 3.0.0...3.1.0