diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 73611f878..9b2aae6ab 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -32,7 +32,7 @@ jobs: - {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39} - {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38} - {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37} - - {name: 'PyPy', python: 'pypy-3.9', os: ubuntu-latest, tox: pypy39} + - {name: 'PyPy', python: 'pypy-3.10', os: ubuntu-latest, tox: pypy310} - {name: Typing, python: '3.11', os: ubuntu-latest, tox: typing} steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 620bd11f0..37bd4c635 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,16 +3,15 @@ ci: autoupdate_schedule: monthly repos: - repo: https://github.com/asottile/pyupgrade - rev: v3.4.0 + rev: v3.7.0 hooks: - id: pyupgrade args: ["--py37-plus"] - - repo: https://github.com/asottile/reorder_python_imports - rev: v3.9.0 + - repo: https://github.com/asottile/reorder-python-imports + rev: v3.10.0 hooks: - id: reorder-python-imports args: ["--application-directories", "src"] - additional_dependencies: ["setuptools>60.9"] - repo: https://github.com/psf/black rev: 23.3.0 hooks: diff --git a/pyproject.toml b/pyproject.toml index 42bfb4417..8ccdc139c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,8 +42,6 @@ version = {attr = "jinja2.__version__"} testpaths = ["tests"] filterwarnings = [ "error", - # change in Python 3.12 beta causes warning from inside pytest - "ignore:ast:DeprecationWarning", ] [tool.coverage.run] diff --git a/requirements/dev.txt b/requirements/dev.txt index 99a6f0346..ed462080a 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -24,7 +24,7 @@ colorama==0.4.6 # via tox distlib==0.3.6 # via virtualenv -filelock==3.12.0 +filelock==3.12.2 # via # tox # virtualenv @@ -36,13 +36,13 @@ pip-compile-multi==2.6.3 # via -r requirements/dev.in pip-tools==6.13.0 # via pip-compile-multi -platformdirs==3.5.1 +platformdirs==3.8.0 # via # tox # virtualenv -pre-commit==3.3.2 +pre-commit==3.3.3 # via -r requirements/dev.in -pyproject-api==1.5.1 +pyproject-api==1.5.2 # via tox pyproject-hooks==1.0.0 # via build @@ -50,9 +50,9 @@ pyyaml==6.0 # via pre-commit toposort==1.10 # via pip-compile-multi -tox==4.5.2 +tox==4.6.3 # via -r requirements/dev.in -virtualenv==20.23.0 +virtualenv==20.23.1 # via # pre-commit # tox diff --git a/requirements/docs.txt b/requirements/docs.txt index 2c36046b0..e125c59a4 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -21,13 +21,13 @@ imagesize==1.4.1 # via sphinx jinja2==3.1.2 # via sphinx -markupsafe==2.1.2 +markupsafe==2.1.3 # via jinja2 packaging==23.1 # via # pallets-sphinx-themes # sphinx -pallets-sphinx-themes==2.1.0 +pallets-sphinx-themes==2.1.1 # via -r requirements/docs.in pygments==2.15.1 # via sphinx @@ -57,5 +57,5 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.5 # via sphinx -urllib3==2.0.2 +urllib3==2.0.3 # via requests diff --git a/requirements/tests.txt b/requirements/tests.txt index 70ca162b7..6168271c8 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -11,9 +11,9 @@ iniconfig==2.0.0 # via pytest packaging==23.1 # via pytest -pluggy==1.0.0 +pluggy==1.2.0 # via pytest -pytest==7.3.1 +pytest==7.4.0 # via -r requirements/tests.in tomli==2.0.1 # via pytest diff --git a/requirements/typing.txt b/requirements/typing.txt index bc63c0f84..e06fb524e 100644 --- a/requirements/typing.txt +++ b/requirements/typing.txt @@ -5,11 +5,11 @@ # # pip-compile-multi # -mypy==1.3.0 +mypy==1.4.1 # via -r requirements/typing.in mypy-extensions==1.0.0 # via mypy tomli==2.0.1 # via mypy -typing-extensions==4.6.2 +typing-extensions==4.6.3 # via mypy diff --git a/src/jinja2/environment.py b/src/jinja2/environment.py index 5474d56ba..c9afae311 100644 --- a/src/jinja2/environment.py +++ b/src/jinja2/environment.py @@ -922,7 +922,7 @@ def list_templates( ) def filter_func(x: str) -> bool: - return "." in x and x.rsplit(".", 1)[1] in extensions # type: ignore + return "." in x and x.rsplit(".", 1)[1] in extensions if filter_func is not None: names = [name for name in names if filter_func(name)] diff --git a/src/jinja2/runtime.py b/src/jinja2/runtime.py index c64999d9d..a90d15f48 100644 --- a/src/jinja2/runtime.py +++ b/src/jinja2/runtime.py @@ -930,9 +930,7 @@ def make_logging_undefined( logger.addHandler(logging.StreamHandler(sys.stderr)) def _log_message(undef: Undefined) -> None: - logger.warning( # type: ignore - "Template variable warning: %s", undef._undefined_message - ) + logger.warning("Template variable warning: %s", undef._undefined_message) class LoggingUndefined(base): # type: ignore __slots__ = () diff --git a/src/jinja2/utils.py b/src/jinja2/utils.py index b9511a86c..4b4720f6d 100644 --- a/src/jinja2/utils.py +++ b/src/jinja2/utils.py @@ -259,7 +259,7 @@ def urlize( if trim_url_limit is not None: def trim_url(x: str) -> str: - if len(x) > trim_url_limit: # type: ignore + if len(x) > trim_url_limit: return f"{x[:trim_url_limit]}..." return x diff --git a/tox.ini b/tox.ini index db5eccb47..a58978c9e 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ [tox] envlist = py3{12,11,10,9,8,7} - pypy39 + pypy310 style typing docs