Opened 23 months ago

Closed 23 months ago

Last modified 20 months ago

#15031 closed enhancement (fixed)

jinja2-3.0.0 (Python module)

Reported by: Bruce Dubbs Owned by: Bruce Dubbs
Priority: normal Milestone: 11.0
Component: BOOK Version: git
Severity: normal Keywords:


New major version.

Change History (5)

comment:1 by Douglas R. Reno, 23 months ago

Summary: junja-2-3.0.0 (Python module)jinja2-3.0.0 (Python module)

Use the correct name :)

comment:2 by Bruce Dubbs, 23 months ago

Owner: changed from blfs-book to Bruce Dubbs
Status: newassigned

comment:3 by Bruce Dubbs, 23 months ago

Version 3.0.0

Released 2021-05-11

  • Drop support for Python 2.7 and 3.5.
  • Bump MarkupSafe dependency to >=1.1.
  • Bump Babel optional dependency to >=2.1.
  • Remove code that was marked deprecated.
  • Add type hinting.
  • Use :pep:451 API to load templates with :class:~loaders.PackageLoader.
  • Fix a bug that caused imported macros to not have access to the current template's globals.
  • Add ability to ignore trim_blocks using +%}.
  • Fix a bug that caused custom async-only filters to fail with constant input.
  • Fix UndefinedError incorrectly being thrown on an undefined variable instead of Undefined being returned on NativeEnvironment on Python 3.10.
  • Blocks can be marked as required. They must be overridden at some point, but not necessarily by the direct child.
  • Deprecate the autoescape and with extensions, they are built-in to the compiler.
  • The urlize filter recognizes mailto: links and takes extra_schemes (or env.policiesurlize.extra_schemes) to recognize other schemes. It tries to balance parentheses within a URL instead of ignoring trailing characters. The parsing in general has been updated to be more efficient and match more cases. URLs without a scheme are linked as https:// instead of http://.
  • Filters that get attributes, such as map and groupby, can use a false or empty value as a default.
  • Fix a bug that prevented variables set in blocks or loops from being accessed in custom context functions.
  • Fix a bug that caused scoped blocks from accessing special loop variables.
  • Update the template globals when calling Environment.get_template(globals=...) even if the template was already loaded.
  • Do not raise an error for undefined filters in unexecuted if-statements and conditional expressions.
  • Add is filter and is test tests to test if a name is a registered filter or test. This allows checking if a filter is available in a template before using it. Test functions can be decorated with @pass_environment, @pass_eval_context, or @pass_context. :issue:842,
  • Support pgettext and npgettext (message contexts) in i18n extension.
  • The |indent filter's width argument can be a string to indent by.
  • The parser understands hex, octal, and binary integer literals.
  • Undefined.contains (in) raises an UndefinedError instead of a TypeError.
  • Undefined is iterable in an async environment. :issue:1294
  • NativeEnvironment supports async mode.
  • Template rendering only treats \n, \r\n and \r as line breaks. Other characters are left unchanged.
  • |groupby filter takes an optional default argument.
  • The function and filter decorators have been renamed and unified. The old names are deprecated.
    • pass_context replaces contextfunction and contextfilter.
    • pass_eval_context replaces evalcontextfunction and evalcontextfilter
    • pass_environment replaces environmentfunction and environmentfilter.
  • Async support no longer requires Jinja to patch itself. It must still be enabled with Environment(enable_async=True).
  • Overriding Context.resolve is deprecated, override resolve_or_missing instead.

comment:4 by Bruce Dubbs, 23 months ago

Resolution: fixed
Status: assignedclosed
327a2630f9 Update to sudo-1.9.7 and libXfixes-6.0.0 (Xorg Library)
6d2b973748 Update to Jinja2-3.0.0 and MarkupSafe-2.0.0 (Python modules)

comment:5 by Bruce Dubbs, 20 months ago

Milestone: 10.211.0

Milestone renamed

Note: See TracTickets for help on using tickets.