github mitsuhiko/minijinja 3.0.0-alpha.3

pre-release3 hours ago

Release Notes

  • Moved the trim_blocks, lstrip_blocks and keep_trailing_newline settings from Environment into SyntaxConfig. SyntaxConfig::builder, Environment::set_syntax and Environment::syntax are now available without the custom_syntax feature, and SyntaxConfig::to_builder was added to modify an existing configuration. Template introspection via Template::undeclared_variables now honors the whitespace settings. #470
  • Changed AutoEscape::Custom to hold a Cow<'static, str> so custom auto escape formats can be determined at runtime. AutoEscape is no longer Copy and State::auto_escape now returns a reference. The Python bindings no longer leak custom auto escape names.
  • Fixed deadlocks in the Python bindings when an environment is modified while another thread renders from it, or when it is used from within a callback during a render. Renders now work on a snapshot of the environment and no longer serialize on a shared lock. #955
  • Fixed Python iterators that raise during iteration looping forever. The error is now raised from the render instead. #956
  • Iteration now consistently fails on invalid values that iterators yield to report errors. Previously only loops did this while filters such as list, join or sort, the in operator and serialization processed them like other items. The new ValueIter::checked helper provides the same behavior for custom code.
  • Added automatic reloading of individual templates. Loaders can now return a TemplateSource with an up-to-date check in addition to a plain String, and the environment re-invokes the loader when a template is looked up that is no longer up to date. path_loader attaches a check based on the file's modification time and size. Auto reloading is enabled by default and can be disabled with Environment::set_auto_reload. Templates are reloaded through a shared reference so the environment no longer needs to be recreated or guarded by a lock. The memo-map dependency was removed. #819
  • Discontinued the minijinja-autoreload crate. Templates loaded via path_loader are now reloaded automatically and environments no longer need to be guarded by a lock to reload. See UPDATING.md for migration instructions.
  • Removed the deserialization feature. Deserialization support is now part of the serde feature.
  • The json feature no longer depends on serde and serde_json. The tojson filter and JSON auto escaping now use a built-in JSON serializer. Invalid values now fail the serialization rather than being emitted as null. Floats are formatted like recent versions of serde_json do (for instance 1e+16 instead of 1e16). The speedups feature now uses zmij and itoa to format numbers in JSON; the output is the same without it.
  • Updated PyO3 to 0.29 in the Python bindings.

Install minijinja-cli 3.0.0-alpha.3

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/mitsuhiko/minijinja/releases/download/3.0.0-alpha.3/minijinja-cli-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy Bypass -c "irm https://github.com/mitsuhiko/minijinja/releases/download/3.0.0-alpha.3/minijinja-cli-installer.ps1 | iex"

Download minijinja-cli 3.0.0-alpha.3

File Platform Checksum
minijinja-cli-aarch64-apple-darwin.tar.xz Apple Silicon macOS checksum
minijinja-cli-x86_64-apple-darwin.tar.xz Intel macOS checksum
minijinja-cli-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
minijinja-cli-i686-pc-windows-msvc.zip x86 Windows checksum
minijinja-cli-x86_64-pc-windows-msvc.zip x64 Windows checksum
minijinja-cli-aarch64-unknown-linux-gnu.tar.xz ARM64 Linux checksum
minijinja-cli-i686-unknown-linux-gnu.tar.xz x86 Linux checksum
minijinja-cli-x86_64-unknown-linux-gnu.tar.xz x64 Linux checksum
minijinja-cli-armv7-unknown-linux-gnueabihf.tar.xz ARMv7 Linux checksum
minijinja-cli-aarch64-unknown-linux-musl.tar.xz ARM64 MUSL Linux checksum
minijinja-cli-i686-unknown-linux-musl.tar.xz x86 MUSL Linux checksum
minijinja-cli-x86_64-unknown-linux-musl.tar.xz x64 MUSL Linux checksum

Don't miss a new minijinja release

NewReleases is sending notifications on new releases.