Fixed an issue that caused custom delimiters to not work in the Python
binding. #506
2.0.0
This is a major update to MiniJinja that changes a lot of core internals and
cleans up some APIs. In particular it resolves somes limitations in the engine
in relation to working with dynamic objects, unlocks potentials for future
performance improvments and enhancements.
It's very likely that you will need to do changes to your code when upgrading,
particular when implementing dynamic objects. In short:
StructObject and SeqObject are gone. They have been replaced by improved
APIs directly on Object. Please refer to the updated documentation to see
how these objects behave now. For the most part code should become quite a bit
clearer during the upgrade.
ObjectKind has been replaced by ObjectRepr. Rather than holding a reference
to a StructObject or SeqObject this now is a simple enum that just indicates
how that object serializes, renders and behaves.
Object no longer uses fmt::Display for rendering. Instead the new
Object::render method is used which has a default implementation.
The Object trait has been completely transformed and the new type-erased type
DynObject has been added to work with unknown objects. This trait has an
improved user experience and more flexibility. It's now possible to implement
any non-primitive value type including maps with non string keys which was previously
not possible.
ValueKind is now non exhaustive and got a log of new value types. This resolves
various issues in particular in relationship with iterators. As a result of this
functions will no longer accidentally serialize into empty objects for example.
Value::from_iterator has been replaced by the new Value::make_iterable,
Value::make_object_iterable and Value::make_one_shot_iterator. The direct
replacement is Value::make_one_shot_iterator but for most uses it's strongly
recommended to use one of the other APIs instead. This results in a much improved
user experience as it's possible to iterate over such values more than once.
The Syntax type has been replaced by the SyntaxConfig type. It uses a builder
pattern to reconfigure the delimiters.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Updates the requirements on minijinja-autoreload to permit the latest version.
Release notes
Sourced from minijinja-autoreload's releases.
Changelog
Sourced from minijinja-autoreload's changelog.
... (truncated)
Commits
c89b5da
2.0.19b04ce9
Fix custom delimiters in Python (#506)a2fdc81
Fix build wheels (#505)f0fce3f
2.0.0e53fde2
Add update noticea8d40e9
Allow the CLI to override the syntax config (#504)b2301a6
Link an example and resort them in alphabetical orderb3516d3
Added line and comments statements (#503)a208ca4
Re-apply do not apply lstrip_blocks to expressions (#502)0df27e6
Merge branch 'minijinja-1.x'Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show