From: David Lord Date: Sun, 31 Jan 2021 16:48:44 +0000 (-0800) Subject: Merge branch '2.11.x' X-Git-Tag: 3.0.0rc1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=076d3803614ae433b1591a99572e8026a6004496;p=thirdparty%2Fjinja.git Merge branch '2.11.x' --- 076d3803614ae433b1591a99572e8026a6004496 diff --cc CHANGES.rst index ff190229,511b22be..f1e0ee0d --- a/CHANGES.rst +++ b/CHANGES.rst @@@ -1,37 -1,15 +1,47 @@@ .. currentmodule:: jinja2 +Version 3.0.0 +------------- + +Unreleased + +- 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. +- Use :pep:`451` API to load templates with + :class:`~loaders.PackageLoader`. :issue:`1168` +- Fix a bug that caused imported macros to not have access to the + current template's globals. :issue:`688` +- Add ability to ignore ``trim_blocks`` using ``+%}``. :issue:`1036` +- Fix a bug that caused custom async-only filters to fail with + constant input. :issue:`1279` +- Fix UndefinedError incorrectly being thrown on an undefined variable + instead of ``Undefined`` being returned on + ``NativeEnvironment`` on Python 3.10. :issue:`1335` +- Blocks can be marked as ``required``. They must be overridden at + some point, but not necessarily by the direct child. :issue:`1147` +- Deprecate the ``autoescape`` and ``with`` extensions, they are + built-in to the compiler. :issue:`1203` +- The ``urlize`` filter recognizes ``mailto:`` links and takes + ``extra_schemes`` (or ``env.policies["urlize.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://``. + :issue:`522, 827, 1172`, :pr:`1195` + + + Version 2.11.3 + -------------- + + Released 2021-01-31 + + - Improve the speed of the ``urlize`` filter by reducing regex + backtracking. Email matching requires a word character at the start + of the domain part, and only word characters in the TLD. :pr:`1343` + + Version 2.11.2 -------------- diff --cc src/jinja2/utils.py index 84185fad,6afca810..18e6d1ab --- a/src/jinja2/utils.py +++ b/src/jinja2/utils.py @@@ -11,11 -13,11 +11,6 @@@ from urllib.parse import quote_from_byt from markupsafe import escape from markupsafe import Markup - _striptags_re = re.compile(r"(|<[^>]*>)") - _entity_re = re.compile(r"&([^;]+);") - _letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" - _digits = "0123456789" -from ._compat import abc -from ._compat import string_types -from ._compat import text_type -from ._compat import url_quote -- # special singleton representing missing values for the runtime missing = type("MissingType", (), {"__repr__": lambda x: "missing"})()