Skip to content

v7.0.0b0

Pre-release
Pre-release

Choose a tag to compare

@TheFes TheFes released this 30 Sep 11:15
23468dd

🚨 THIS VERSION COULD INCLUDE BREAKING CHANGES 🚨

🌟 IMPROVEMENTS

  • Instead of always returning a string, this version now returns the native type. This means that a numeric value will already be a number (no need to a float conversion), a datetime value will be a datetime object, etc. So this means that:
    • as_datetime not longer needs to be applied in case the value is a datetime object (like for mode='start or mode='end')
    • the bool function or filter no longer needs to be applied in case mode='is_now' is used
    • a float or int conversion is no longer needed for numeric output, like for mode='min' or mode='max'
    • from_json is no longer needed to convert a json string to a list or dictionary, when eg mode='list' or mode='all' is used
      especially this last one could be breaking, for the others is doesn't matter if the input is already the desired native type, but from_json will error if the input is already a list or dictionary.
  • time_format='isoformat' can be used to let the macro return isoformat datetime strings instead of datetime objects. This is added becasue the template parser returns datetime objects in the Python datetime format if they are part of a dictionary.

You can find the updated documentation here

What's Changed

Full Changelog: v6.0.2...v7.0.0b0