Python-liquid

Latest version: v1.13.0

Safety actively analyzes 707299 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 14 of 23

1.1.3

- Refactored expression lexers. New, subtly different, tag expression tokenizers are now in `liquid.expressions`. Built-in tags use these lexers indirectly via new specialized expression parsers. Older expression lexers and parsers will be maintained until at least Python Liquid version 2.0 for those that use them in custom tags. See 42.
- Specialized expression parsers. Each of the three built-in expression types now have a dedicated parser defined in `liquid.expressions`, whereas before all expression parsing went through `liquid.parse.ExpressionParser.parse_expression()`. Built-in tags now use these new parsers. The more general parser will be maintained until at least Python Liquid Version 2.0. See 42.
- `liquid.parse.Parser.parse_block()` now accepts any container as its `end` argument. Benchmarks show that using a `frozenset` for `end` instead of a tuple gives a small performance improvement.
- Fixed an incompatibility with the reference implementation where Python Liquid would not recognize identifiers with a trailing question mark. This seems to be a common idiom in Ruby to indicate something returns a Boolean value.
- Added `get_source_with_context()` and `get_source_with_context_async()` to `liquid.loaders.BaseLoader`. Custom loaders can now use the active render context to dynamically modify their search space when used from `include` or `render`, or any custom tag using `Context.get_template_with_context()`.
`Context.get_template_with_context()` also accepts arbitrary keyword arguments that are passed along to `get_source_with_context()`. The build-in `include` and `render` tags add a `tag` argument with their tag name, so custom loaders can modify their search space depending on which tag was used.
See the [Custom Loaders](https://jg-rp.github.io/liquid/guides/custom-loaders) documentation for examples.

1.1.2

- Fixed a bug where a for loop's limit would be incorrect when using `offset: continue` multiple times (three or more `for` tags looping over the same sequence). See 41.

1.1.1

- Test against Django 4.2
- Configure with pyproject.toml
- Test and build with Hatch

1.1.0

- Drop support for Django 2.2
- Test against Python 3.11
- Test against Django 4.1

1.1.0beta.1

- New "if not" tag. A drop-in replacement for the standard `if` tag that supports logical `not` and grouping with parentheses.
- Moved some module-level constants to static class variables for easier subclassing of tags.
- Allow `ObjectChain` to contain `push`, `pop` and `size` properties. This is **potentially a breaking change** for early adopters writing custom tags using `context.scope.push` and `context.scope.pop`. The symbols `chainPush` and `chainPop` would be needed instead.
- Enforce `maxContextDepth` when extending a render context scope as well as copying a `RenderContext`.
- New `FalsyStrictUndefined` type. `FalsyStrictUndefined` is similar to `StrictUndefined`, but can be tested for truthiness and compared to other values in an `if`/`unless` expression without throwing an error.

1.0.4

- A range literal will now use a default of `0` rather than raising a `LiquidTypeError` if either its start or stop values can't be cast to an integer.
- Gracefully handle `liquid` tags that are empty or only contain whitespace.
- Gracefully handle empty `echo` tags.

Page 14 of 23

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.