Skip to content

Version 3.0.0

Latest

Choose a tag to compare

@jg-rp jg-rp released this 13 Nov 08:46
· 2 commits to main since this release

This major release improves compatibility with Shopify/liquid, improves template parsing performance, adds a few opt-in template language features and makes several breaking API changes.

See the migration guide for details.

Python versions and dependencies

  • Dropped support for Python version 3.9, 3.10 and 3.11.
  • Removed the pytz dependency. We now use Python's zoneinfo package.
  • Added the tzdata dependency.

Notable API Changes

  • Template(source) can no longer be used to parse a template from a string. Use package level parse(source) or Environment.parse(source) instead.

  • Removed Environment.from_string(). Use package level parse() or Environment.parse() instead.

  • Changed render(), Environment.render() and Template.render() to accept data as a dict (or any mapping) instead of keyword arguments.

  • Renamed class BoundTemplate to Template.

  • Removed Environment class variables in favour of constructor arguments. See configuration docs.

  • Renamed several Environment constructor arguments. See API docs.