]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Merge branch '3.1.x'
authorDavid Lord <davidism@gmail.com>
Thu, 1 Jun 2023 17:49:03 +0000 (10:49 -0700)
committerDavid Lord <davidism@gmail.com>
Thu, 1 Jun 2023 17:50:38 +0000 (10:50 -0700)
1  2 
CHANGES.rst
pyproject.toml
scripts/generate_identifier_pattern.py
src/jinja2/environment.py
src/jinja2/parser.py
src/jinja2/utils.py

diff --cc CHANGES.rst
index d539a7373a2012cff87718ef30e9c3b80c5d2ab2,36db0843a5bf6a9f78d5f156bf2a592ada2f1983..66575ea5ebc10af74b3795adfe7cd23cdf409960
@@@ -1,14 -1,14 +1,23 @@@
  .. currentmodule:: jinja2
  
 +Version 3.2.0
 +-------------
 +
 +Unreleased
 +
 +-   Use modern packaging metadata with ``pyproject.toml`` instead of ``setup.cfg``.
 +    :pr:`1793`
 +
 +
+ Version 3.1.3
+ -------------
+ Unreleased
+ -   Fix compiler error when checking if required blocks in parent templates are
+     empty. :pr:`1858`
  Version 3.1.2
  -------------
  
diff --cc pyproject.toml
index f90576de6fbf67430af09511ba6e5b6ec8ef2fe9,0000000000000000000000000000000000000000..42bfb44173442044ad63d13d0157b6acf164abdd
mode 100644,000000..100644
--- /dev/null
@@@ -1,68 -1,0 +1,70 @@@
- authors = [{name = "Armin Ronacher", email = "armin.ronacher@active-4.com"}]
 +[project]
 +name = "Jinja2"
 +description = "A very fast and expressive template engine."
 +readme = "README.rst"
 +license = {text = "BSD-3-Clause"}
 +maintainers = [{name = "Pallets", email = "contact@palletsprojects.com"}]
- Twitter = "https://twitter.com/PalletsTeam"
 +classifiers = [
 +    "Development Status :: 5 - Production/Stable",
 +    "Environment :: Web Environment",
 +    "Intended Audience :: Developers",
 +    "License :: OSI Approved :: BSD License",
 +    "Operating System :: OS Independent",
 +    "Programming Language :: Python",
 +    "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
 +    "Topic :: Text Processing :: Markup :: HTML",
 +]
 +requires-python = ">=3.7"
 +dependencies = ["MarkupSafe>=2.0"]
 +dynamic = ["version"]
 +
 +[project.urls]
 +Donate = "https://palletsprojects.com/donate"
 +Documentation = "https://jinja.palletsprojects.com/"
 +Changes = "https://jinja.palletsprojects.com/changes/"
 +"Source Code" = "https://github.com/pallets/jinja/"
 +"Issue Tracker" = "https://github.com/pallets/jinja/issues/"
- filterwarnings = ["error"]
 +Chat = "https://discord.gg/pallets"
 +
 +[project.optional-dependencies]
 +i18n = ["Babel>=2.7"]
 +
 +[project.entry-points."babel.extractors"]
 +
 +[build-system]
 +requires = ["setuptools"]
 +build-backend = "setuptools.build_meta"
 +
 +[tool.setuptools.dynamic]
 +version = {attr = "jinja2.__version__"}
 +
 +[tool.pytest.ini_options]
 +testpaths = ["tests"]
++filterwarnings = [
++    "error",
++    # change in Python 3.12 beta causes warning from inside pytest
++    "ignore:ast:DeprecationWarning",
++]
 +
 +[tool.coverage.run]
 +branch = true
 +source = ["jinja2", "tests"]
 +
 +[tool.coverage.paths]
 +source = ["src", "*/site-packages"]
 +
 +[tool.mypy]
 +python_version = "3.7"
 +files = ["src/jinja2"]
 +show_error_codes = true
 +pretty = true
 +strict = true
 +local_partial_types = true
 +warn_unreachable = true
 +
 +[[tool.mypy.overrides]]
 +module = [
 +    "jinja2.defaults",
 +    "markupsafe",
 +]
 +no_implicit_reexport = false
index 24de8788c9f5024be2cc49f18b48fe24c366a08a,baf035eae52bc49ce1e3200d9962e6df34c52229..7fc64aed093f04466a9f6e93d76520663c342d29
@@@ -29,9 -29,9 +29,9 @@@ def collapse_ranges(data)
  
      Source: https://stackoverflow.com/a/4629241/400617
      """
-     for _, b in itertools.groupby(enumerate(data), lambda x: ord(x[1]) - x[0]):
-         lb = list(b)
+     for _, g in itertools.groupby(enumerate(data), lambda x: ord(x[1]) - x[0]):
 -        b = list(g)
 -        yield b[0][1], b[-1][1]
++        lb = list(g)
 +        yield lb[0][1], lb[-1][1]
  
  
  def build_pattern(ranges):
Simple merge
Simple merge
Simple merge