]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Merge branch '2.11.x'
authorDavid Lord <davidism@gmail.com>
Sun, 31 Jan 2021 16:48:44 +0000 (08:48 -0800)
committerDavid Lord <davidism@gmail.com>
Sun, 31 Jan 2021 16:48:44 +0000 (08:48 -0800)
1  2 
CHANGES.rst
docs/api.rst
src/jinja2/filters.py
src/jinja2/utils.py

diff --cc CHANGES.rst
index ff19022900ae6c97ac62644f7709c0e35513d6c9,511b22be63391c1d25ccf610f0f4bdb93a8ff10a..f1e0ee0df06f56ec48fdd16dd661c9f037699a5d
@@@ -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 docs/api.rst
Simple merge
Simple merge
index 84185fad001c7ae052d6b7d1c1c5516b54100d07,6afca81055701d6040186c234b4b78a7142fe6c4..18e6d1abad3165148855be03072527135fa175b4
@@@ -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"})()