]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
test on python 3.13 1977/head
authorDavid Lord <davidism@gmail.com>
Mon, 13 May 2024 00:51:31 +0000 (17:51 -0700)
committerDavid Lord <davidism@gmail.com>
Mon, 13 May 2024 15:40:44 +0000 (08:40 -0700)
update dev dependencies
refactor update tox envs
3.7 requires an old version of trio

xfail zip loader template test

13 files changed:
.github/workflows/tests.yaml
.pre-commit-config.yaml
requirements/build.txt
requirements/dev.txt
requirements/docs.txt
requirements/tests.in
requirements/tests.txt
requirements/tests37.in [new file with mode: 0644]
requirements/tests37.txt [new file with mode: 0644]
requirements/typing.txt
src/jinja2/compiler.py
tests/test_loader.py
tox.ini

index c5e5f709a270a0ab24507d5e7eecde67989e9c4c..0cd6f4a21e689f918b9b0557f2cb5c9e202ed592 100644 (file)
@@ -21,6 +21,7 @@ jobs:
       fail-fast: false
       matrix:
         include:
+          - {python: '3.13'}
           - {python: '3.12'}
           - {name: Windows, python: '3.12', os: windows-latest}
           - {name: Mac, python: '3.12', os: macos-latest}
index dd86089b880c348c37b656e73d287f500c2f1477..5b7ebb8780d34eea677222b7f53694c7d4131728 100644 (file)
@@ -2,7 +2,7 @@ ci:
   autoupdate_schedule: monthly
 repos:
   - repo: https://github.com/astral-sh/ruff-pre-commit
-    rev: v0.4.1
+    rev: v0.4.4
     hooks:
       - id: ruff
       - id: ruff-format
index 98175b85658e168b46bcafe0a652dd430d104aa7..52fd1f69a872325dc847db696b16f76c05ac78ed 100644 (file)
@@ -1,15 +1,12 @@
-# SHA1:80754af91bfb6d1073585b046fe0a474ce868509
 #
-# This file is autogenerated by pip-compile-multi
-# To update, run:
+# This file is autogenerated by pip-compile with Python 3.12
+# by the following command:
 #
-#    pip-compile-multi
+#    pip-compile build.in
 #
-build==0.10.0
-    # via -r requirements/build.in
-packaging==23.1
+build==1.2.1
+    # via -r build.in
+packaging==24.0
     # via build
-pyproject-hooks==1.0.0
-    # via build
-tomli==2.0.1
+pyproject-hooks==1.1.0
     # via build
index 79fb7c0bad2f59461aa78a8832fdb9d4994a2c5f..076912b0b1418f545ff4ba0752e9ab8158aa4973 100644 (file)
-# SHA1:54b5b77ec8c7a0064ffa93b2fd16cb0130ba177c
 #
-# This file is autogenerated by pip-compile-multi
-# To update, run:
+# This file is autogenerated by pip-compile with Python 3.12
+# by the following command:
 #
-#    pip-compile-multi
+#    pip-compile dev.in
 #
--r docs.txt
--r tests.txt
--r typing.txt
-build==0.10.0
+alabaster==0.7.16
+    # via sphinx
+attrs==23.2.0
+    # via
+    #   outcome
+    #   trio
+babel==2.15.0
+    # via sphinx
+build==1.2.1
     # via pip-tools
-cachetools==5.3.1
+cachetools==5.3.3
     # via tox
-cfgv==3.3.1
+certifi==2024.2.2
+    # via requests
+cfgv==3.4.0
     # via pre-commit
-chardet==5.1.0
+chardet==5.2.0
     # via tox
-click==8.1.3
+charset-normalizer==3.3.2
+    # via requests
+click==8.1.7
     # via
     #   pip-compile-multi
     #   pip-tools
 colorama==0.4.6
     # via tox
-distlib==0.3.6
+distlib==0.3.8
     # via virtualenv
-filelock==3.12.2
+docutils==0.21.2
+    # via sphinx
+filelock==3.14.0
     # via
     #   tox
     #   virtualenv
-identify==2.5.24
+identify==2.5.36
     # via pre-commit
+idna==3.7
+    # via
+    #   requests
+    #   trio
+imagesize==1.4.1
+    # via sphinx
+iniconfig==2.0.0
+    # via pytest
+jinja2==3.1.4
+    # via sphinx
+markupsafe==2.1.5
+    # via jinja2
+mypy==1.10.0
+    # via -r typing.in
+mypy-extensions==1.0.0
+    # via mypy
 nodeenv==1.8.0
     # via pre-commit
+outcome==1.3.0.post0
+    # via trio
+packaging==24.0
+    # via
+    #   build
+    #   pallets-sphinx-themes
+    #   pyproject-api
+    #   pytest
+    #   sphinx
+    #   tox
+pallets-sphinx-themes==2.1.3
+    # via -r docs.in
 pip-compile-multi==2.6.3
-    # via -r requirements/dev.in
-pip-tools==6.13.0
+    # via -r dev.in
+pip-tools==7.4.1
     # via pip-compile-multi
-platformdirs==3.8.0
+platformdirs==4.2.1
     # via
     #   tox
     #   virtualenv
-pre-commit==3.3.3
-    # via -r requirements/dev.in
-pyproject-api==1.5.2
+pluggy==1.5.0
+    # via
+    #   pytest
+    #   tox
+pre-commit==3.7.1
+    # via -r dev.in
+pygments==2.18.0
+    # via sphinx
+pyproject-api==1.6.1
     # via tox
-pyproject-hooks==1.0.0
-    # via build
+pyproject-hooks==1.1.0
+    # via
+    #   build
+    #   pip-tools
+pytest==8.2.0
+    # via -r tests.in
 pyyaml==6.0.1
     # via pre-commit
+requests==2.31.0
+    # via sphinx
+sniffio==1.3.1
+    # via trio
+snowballstemmer==2.2.0
+    # via sphinx
+sortedcontainers==2.4.0
+    # via trio
+sphinx==7.3.7
+    # via
+    #   -r docs.in
+    #   pallets-sphinx-themes
+    #   sphinx-issues
+    #   sphinxcontrib-log-cabinet
+sphinx-issues==4.1.0
+    # via -r docs.in
+sphinxcontrib-applehelp==1.0.8
+    # via sphinx
+sphinxcontrib-devhelp==1.0.6
+    # via sphinx
+sphinxcontrib-htmlhelp==2.0.5
+    # via sphinx
+sphinxcontrib-jsmath==1.0.1
+    # via sphinx
+sphinxcontrib-log-cabinet==1.0.1
+    # via -r docs.in
+sphinxcontrib-qthelp==1.0.7
+    # via sphinx
+sphinxcontrib-serializinghtml==1.1.10
+    # via sphinx
 toposort==1.10
     # via pip-compile-multi
-tox==4.6.3
-    # via -r requirements/dev.in
-virtualenv==20.23.1
+tox==4.15.0
+    # via -r dev.in
+trio==0.25.0
+    # via -r tests.in
+typing-extensions==4.11.0
+    # via mypy
+urllib3==2.2.1
+    # via requests
+virtualenv==20.26.1
     # via
     #   pre-commit
     #   tox
-wheel==0.40.0
+wheel==0.43.0
     # via pip-tools
 
 # The following packages are considered to be unsafe in a requirements file:
index 27488ade0b627812d9b2768b91bae49674163cec..2cbd73fa818f9eaea77873f8ce3836e55da88d1d 100644 (file)
@@ -1,61 +1,60 @@
-# SHA1:45c590f97fe95b8bdc755eef796e91adf5fbe4ea
 #
-# This file is autogenerated by pip-compile-multi
-# To update, run:
+# This file is autogenerated by pip-compile with Python 3.12
+# by the following command:
 #
-#    pip-compile-multi
+#    pip-compile docs.in
 #
-alabaster==0.7.13
+alabaster==0.7.16
     # via sphinx
-babel==2.12.1
+babel==2.15.0
     # via sphinx
-certifi==2023.5.7
+certifi==2024.2.2
     # via requests
-charset-normalizer==3.1.0
+charset-normalizer==3.3.2
     # via requests
-docutils==0.20.1
+docutils==0.21.2
     # via sphinx
-idna==3.6
+idna==3.7
     # via requests
 imagesize==1.4.1
     # via sphinx
-jinja2==3.1.2
+jinja2==3.1.4
     # via sphinx
-markupsafe==2.1.3
+markupsafe==2.1.5
     # via jinja2
-packaging==23.1
+packaging==24.0
     # via
     #   pallets-sphinx-themes
     #   sphinx
-pallets-sphinx-themes==2.1.1
-    # via -r requirements/docs.in
-pygments==2.15.1
+pallets-sphinx-themes==2.1.3
+    # via -r docs.in
+pygments==2.18.0
     # via sphinx
 requests==2.31.0
     # via sphinx
 snowballstemmer==2.2.0
     # via sphinx
-sphinx==7.0.1
+sphinx==7.3.7
     # via
-    #   -r requirements/docs.in
+    #   -r docs.in
     #   pallets-sphinx-themes
     #   sphinx-issues
     #   sphinxcontrib-log-cabinet
-sphinx-issues==3.0.1
-    # via -r requirements/docs.in
-sphinxcontrib-applehelp==1.0.4
+sphinx-issues==4.1.0
+    # via -r docs.in
+sphinxcontrib-applehelp==1.0.8
     # via sphinx
-sphinxcontrib-devhelp==1.0.2
+sphinxcontrib-devhelp==1.0.6
     # via sphinx
-sphinxcontrib-htmlhelp==2.0.1
+sphinxcontrib-htmlhelp==2.0.5
     # via sphinx
 sphinxcontrib-jsmath==1.0.1
     # via sphinx
 sphinxcontrib-log-cabinet==1.0.1
-    # via -r requirements/docs.in
-sphinxcontrib-qthelp==1.0.3
+    # via -r docs.in
+sphinxcontrib-qthelp==1.0.7
     # via sphinx
-sphinxcontrib-serializinghtml==1.1.5
+sphinxcontrib-serializinghtml==1.1.10
     # via sphinx
-urllib3==2.0.3
+urllib3==2.2.1
     # via requests
index 423e485cc2e35d52f67b5d0774272b978269e502..5669c6ecd758f931b82e27419b1f919253a9fe23 100644 (file)
@@ -1,2 +1,2 @@
 pytest
-trio<=0.22.2  # for Python3.7 support
+trio
index bb8f55df132e57fa3f1f661b479a8c8baecaa636..de18d477d944c9e30a17fb4b6f82a5dbb280ce7c 100644 (file)
@@ -1,35 +1,28 @@
-# SHA1:b8d151f902b43c4435188a9d3494fb8d4af07168
 #
-# This file is autogenerated by pip-compile-multi
-# To update, run:
+# This file is autogenerated by pip-compile with Python 3.12
+# by the following command:
 #
-#    pip-compile-multi
+#    pip-compile tests.in
 #
 attrs==23.2.0
     # via
     #   outcome
     #   trio
-exceptiongroup==1.1.1
-    # via
-    #   pytest
-    #   trio
-idna==3.6
+idna==3.7
     # via trio
 iniconfig==2.0.0
     # via pytest
 outcome==1.3.0.post0
     # via trio
-packaging==23.1
+packaging==24.0
     # via pytest
-pluggy==1.2.0
+pluggy==1.5.0
     # via pytest
-pytest==7.4.0
-    # via -r requirements/tests.in
+pytest==8.2.0
+    # via -r tests.in
 sniffio==1.3.1
     # via trio
 sortedcontainers==2.4.0
     # via trio
-tomli==2.0.1
-    # via pytest
-trio==0.22.2
-    # via -r requirements/tests.in
+trio==0.25.0
+    # via -r tests.in
diff --git a/requirements/tests37.in b/requirements/tests37.in
new file mode 100644 (file)
index 0000000..9c2bed1
--- /dev/null
@@ -0,0 +1,2 @@
+pytest
+trio==0.22.2
diff --git a/requirements/tests37.txt b/requirements/tests37.txt
new file mode 100644 (file)
index 0000000..578789e
--- /dev/null
@@ -0,0 +1,43 @@
+#
+# This file is autogenerated by pip-compile with Python 3.7
+# by the following command:
+#
+#    pip-compile tests37.in
+#
+attrs==23.2.0
+    # via
+    #   outcome
+    #   trio
+exceptiongroup==1.2.1
+    # via
+    #   pytest
+    #   trio
+idna==3.7
+    # via trio
+importlib-metadata==6.7.0
+    # via
+    #   attrs
+    #   pluggy
+    #   pytest
+iniconfig==2.0.0
+    # via pytest
+outcome==1.3.0.post0
+    # via trio
+packaging==24.0
+    # via pytest
+pluggy==1.2.0
+    # via pytest
+pytest==7.4.4
+    # via -r tests37.in
+sniffio==1.3.1
+    # via trio
+sortedcontainers==2.4.0
+    # via trio
+tomli==2.0.1
+    # via pytest
+trio==0.22.2
+    # via -r tests37.in
+typing-extensions==4.7.1
+    # via importlib-metadata
+zipp==3.15.0
+    # via importlib-metadata
index e06fb524e3f300fa262190d5bc7ac2e7bf11f971..c08a5376731e6b4f3bbc55bde9079d2b00e0f4e3 100644 (file)
@@ -1,15 +1,12 @@
-# SHA1:7983aaa01d64547827c20395d77e248c41b2572f
 #
-# This file is autogenerated by pip-compile-multi
-# To update, run:
+# This file is autogenerated by pip-compile with Python 3.12
+# by the following command:
 #
-#    pip-compile-multi
+#    pip-compile typing.in
 #
-mypy==1.4.1
-    # via -r requirements/typing.in
+mypy==1.10.0
+    # via -r typing.in
 mypy-extensions==1.0.0
     # via mypy
-tomli==2.0.1
-    # via mypy
-typing-extensions==4.6.3
+typing-extensions==4.11.0
     # via mypy
index e18a14004bc01910c23f57ff198695a83a544e96..91720c5f97cdbb4017d38344a6dd0d4685a7d66c 100644 (file)
@@ -55,7 +55,7 @@ def optimizeconst(f: F) -> F:
 
         return f(self, node, frame, **kwargs)
 
-    return update_wrapper(t.cast(F, new_func), f)
+    return update_wrapper(new_func, f)  # type: ignore[return-value]
 
 
 def _make_binop(op: str) -> t.Callable[["CodeGenerator", nodes.BinExpr, "Frame"], None]:
index 77d686ef54ef8e0ab1ed28d42cc08b30b5b26a85..3e64f62372b541819d7617185c6c14575f8e2a28 100644 (file)
@@ -2,7 +2,6 @@ import importlib.abc
 import importlib.machinery
 import importlib.util
 import os
-import platform
 import shutil
 import sys
 import tempfile
@@ -364,8 +363,8 @@ def test_package_zip_source(package_zip_loader, template, expect):
 
 
 @pytest.mark.xfail(
-    platform.python_implementation() == "PyPy",
-    reason="PyPy's zipimporter doesn't have a '_files' attribute.",
+    sys.implementation.name == "pypy" or sys.version_info > (3, 13),
+    reason="zipimporter doesn't have a '_files' attribute",
     raises=TypeError,
 )
 def test_package_zip_list(package_zip_loader):
diff --git a/tox.ini b/tox.ini
index 6582e2812f55795cebea74a5cc2c0e141da736fa..b9e972b9391beaee42ce5585107f68288e825054 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -1,6 +1,6 @@
 [tox]
 envlist =
-    py3{12,11,10,9,8,7}
+    py3{13,12,11,10,9,8,7}
     pypy310
     style
     typing
@@ -15,6 +15,9 @@ use_frozen_constraints = true
 deps = -r requirements/tests.txt
 commands = pytest -v --tb=short --basetemp={envtmpdir} {posargs}
 
+[testenv:py37,py3.7]
+deps = -r requirements/tests37.txt
+
 [testenv:style]
 deps = pre-commit
 skip_install = true
@@ -28,16 +31,28 @@ commands = mypy
 deps = -r requirements/docs.txt
 commands = sphinx-build -E -W -b dirhtml docs docs/_build/dirhtml
 
+[testenv:update-pre_commit]
+labels = update
+deps = pre-commit
+skip_install = true
+commands = pre-commit autoupdate -j4
+
 [testenv:update-requirements]
-deps =
-    pip-tools
-    pre-commit
+labels = update
+deps = pip-tools
 skip_install = true
 change_dir = requirements
 commands =
-    pre-commit autoupdate -j4
-    pip-compile -U build.in
-    pip-compile -U docs.in
-    pip-compile -U tests.in
-    pip-compile -U typing.in
-    pip-compile -U dev.in
+    pip-compile build.in -q {posargs:-U}
+    pip-compile docs.in -q {posargs:-U}
+    pip-compile tests.in -q {posargs:-U}
+    pip-compile typing.in -q {posargs:-U}
+    pip-compile dev.in -q {posargs:-U}
+
+[testenv:update-requirements37]
+base_python = 3.7
+labels = update
+deps = pip-tools
+skip_install = true
+change_dir = requirements
+commands = pip-compile tests37.in -q {posargs:-U}