diff options
author | David Lord <davidism@gmail.com> | 2021-02-06 20:40:52 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-06 20:40:52 -0800 |
commit | 8aa4f4fbebdfaf2c725c493b139992f286ab4ae0 (patch) | |
tree | b9178578f22c59085b4b4de33a58b436b4e6da7a | |
parent | c580dd08b53f91136008cebb1b860bc3b61aca73 (diff) | |
parent | 33ff819a38a35c5f69d57638c56bf7d698674189 (diff) | |
download | jinja2-8aa4f4fbebdfaf2c725c493b139992f286ab4ae0.tar.gz |
Merge pull request #1350 from pallets/update-test-requirements
update requirements, test Python 3.9
-rw-r--r-- | .github/workflows/tests.yaml | 20 | ||||
-rw-r--r-- | .pre-commit-config.yaml | 2 | ||||
-rw-r--r-- | CONTRIBUTING.rst | 6 | ||||
-rw-r--r-- | requirements/dev.in | 3 | ||||
-rw-r--r-- | requirements/dev.txt | 92 | ||||
-rw-r--r-- | requirements/docs.txt | 85 | ||||
-rw-r--r-- | requirements/tests.txt | 12 | ||||
-rw-r--r-- | requirements/typing.in | 1 | ||||
-rw-r--r-- | requirements/typing.txt | 14 | ||||
-rw-r--r-- | setup.cfg | 1 | ||||
-rw-r--r-- | tox.ini | 13 |
11 files changed, 172 insertions, 77 deletions
diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 6fbd296..4654992 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -16,15 +16,15 @@ jobs: fail-fast: false matrix: include: - - {name: Linux, python: '3.8', os: ubuntu-latest, tox: py38} + - {name: Linux, 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: '3.6', python: '3.6', os: ubuntu-latest, tox: py36} - {name: 'PyPy', python: pypy3, os: ubuntu-latest, tox: pypy3} - - {name: Style, python: '3.8', os: ubuntu-latest, tox: style} - - {name: Docs, python: '3.8', os: ubuntu-latest, tox: docs} - - {name: Typing, python: '3.8', os: ubuntu-latest, tox: mypy} - - {name: Windows, python: '3.8', os: windows-latest, tox: py38} - - {name: Mac, python: '3.8', os: macos-latest, tox: py38} + - {name: Docs, python: '3.9', os: ubuntu-latest, tox: docs} + - {name: Typing, python: '3.9', os: ubuntu-latest, tox: typing} + - {name: Windows, python: '3.9', os: windows-latest, tox: py39} + - {name: Mac, python: '3.9', os: macos-latest, tox: py39} steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 @@ -39,15 +39,9 @@ jobs: id: pip-cache run: echo "::set-output name=dir::$(pip cache dir)" - name: cache pip - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ${{ steps.pip-cache.outputs.dir }} key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}|${{ hashFiles('requirements/*.txt') }} - - name: cache pre-commit - uses: actions/cache@v1 - with: - path: ~/.cache/pre-commit - key: pre-commit|${{ matrix.python }}|${{ hashFiles('.pre-commit-config.yaml') }} - if: matrix.tox == 'style' - run: pip install tox - run: tox -e ${{ matrix.tox }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b2893ca..b72b50c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,7 @@ repos: - id: pyupgrade args: ["--py36-plus"] - repo: https://github.com/asottile/reorder_python_imports - rev: v2.3.6 + rev: v2.4.0 hooks: - id: reorder-python-imports args: ["--application-directories", "src"] diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 2b6abe8..40a74c7 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -207,12 +207,6 @@ Read more about `coverage <https://coverage.readthedocs.io>`__. Building the docs ~~~~~~~~~~~~~~~~~ -Install the documentation dependencies if you have not already done so. - -.. code-block:: text - - $ pip install -r requirements/docs.txt - Build the docs in the ``docs`` directory using Sphinx. .. code-block:: text diff --git a/requirements/dev.in b/requirements/dev.in index bcc48da..2588467 100644 --- a/requirements/dev.in +++ b/requirements/dev.in @@ -1,5 +1,6 @@ -# -r docs.in # can't include due to Sphinx/Jinja mutual dependency +-r docs.in -r tests.in +-r typing.in pip-tools pre-commit tox diff --git a/requirements/dev.txt b/requirements/dev.txt index d4ade06..b54929a 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -4,64 +4,126 @@ # # pip-compile requirements/dev.in # +alabaster==0.7.12 + # via sphinx appdirs==1.4.4 # via virtualenv -attrs==19.3.0 +attrs==20.3.0 # via pytest -cfgv==3.1.0 +babel==2.9.0 + # via sphinx +certifi==2020.12.5 + # via requests +cfgv==3.2.0 # via pre-commit +chardet==4.0.0 + # via requests click==7.1.2 # via pip-tools -distlib==0.3.0 +distlib==0.3.1 # via virtualenv +docutils==0.16 + # via sphinx filelock==3.0.12 # via # tox # virtualenv -identify==1.4.15 +identify==1.5.13 # via pre-commit -iniconfig==1.0.0 +idna==2.10 + # via requests +imagesize==1.2.0 + # via sphinx +iniconfig==1.1.1 # via pytest -nodeenv==1.3.5 +jinja2==2.11.3 + # via sphinx +markupsafe==1.1.1 + # via jinja2 +mypy-extensions==0.4.3 + # via mypy +mypy==0.800 + # via -r requirements/typing.in +nodeenv==1.5.0 # via pre-commit -packaging==20.3 +packaging==20.9 # via + # pallets-sphinx-themes # pytest + # sphinx # tox +pallets-sphinx-themes==1.2.3 + # via -r requirements/docs.in pip-tools==5.5.0 # via -r requirements/dev.in pluggy==0.13.1 # via # pytest # tox -pre-commit==2.10.0 +pre-commit==2.10.1 # via -r requirements/dev.in -py==1.9.0 +py==1.10.0 # via # pytest # tox +pygments==2.7.4 + # via sphinx pyparsing==2.4.7 # via packaging pytest==6.2.2 # via -r requirements/tests.in -pyyaml==5.3.1 +pytz==2021.1 + # via babel +pyyaml==5.4.1 # via pre-commit -six==1.14.0 +requests==2.25.1 + # via sphinx +six==1.15.0 # via - # packaging # tox # virtualenv -toml==0.10.1 +snowballstemmer==2.1.0 + # via sphinx +sphinx-issues==1.2.0 + # via -r requirements/docs.in +sphinx==2.4.4 + # via + # -r requirements/docs.in + # pallets-sphinx-themes + # sphinx-issues + # sphinxcontrib-log-cabinet +sphinxcontrib-applehelp==1.0.2 + # via sphinx +sphinxcontrib-devhelp==1.0.2 + # via sphinx +sphinxcontrib-htmlhelp==1.0.3 + # 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 sphinx +sphinxcontrib-serializinghtml==1.1.4 + # via sphinx +toml==0.10.2 # via # pre-commit # pytest # tox -tox==3.21.3 +tox==3.21.4 # via -r requirements/dev.in -virtualenv==20.0.20 +typed-ast==1.4.2 + # via mypy +typing-extensions==3.7.4.3 + # via mypy +urllib3==1.26.3 + # via requests +virtualenv==20.4.2 # via # pre-commit # tox # The following packages are considered to be unsafe in a requirements file: # pip +# setuptools diff --git a/requirements/docs.txt b/requirements/docs.txt index 55b034e..d24fd24 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -4,33 +4,64 @@ # # pip-compile requirements/docs.in # -alabaster==0.7.12 # via sphinx -babel==2.9.0 # via sphinx -certifi==2020.4.5.1 # via requests -chardet==3.0.4 # via requests -docutils==0.16 # via sphinx -idna==2.9 # via requests -imagesize==1.2.0 # via sphinx -jinja2==2.11.2 # via sphinx -markupsafe==1.1.1 # via jinja2 -packaging==20.3 # via pallets-sphinx-themes, sphinx -pallets-sphinx-themes==1.2.3 # via -r requirements/docs.in -pygments==2.6.1 # via sphinx -pyparsing==2.4.7 # via packaging -pytz==2020.1 # via babel -requests==2.23.0 # via sphinx -six==1.14.0 # via packaging -snowballstemmer==2.0.0 # via sphinx -sphinx-issues==1.2.0 # via -r requirements/docs.in -sphinx==2.4.4 # via -r requirements/docs.in, pallets-sphinx-themes, sphinx-issues, sphinxcontrib-log-cabinet -sphinxcontrib-applehelp==1.0.2 # via sphinx -sphinxcontrib-devhelp==1.0.2 # via sphinx -sphinxcontrib-htmlhelp==1.0.3 # 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 sphinx -sphinxcontrib-serializinghtml==1.1.4 # via sphinx -urllib3==1.25.9 # via requests +alabaster==0.7.12 + # via sphinx +babel==2.9.0 + # via sphinx +certifi==2020.12.5 + # via requests +chardet==4.0.0 + # via requests +docutils==0.16 + # via sphinx +idna==2.10 + # via requests +imagesize==1.2.0 + # via sphinx +jinja2==2.11.3 + # via sphinx +markupsafe==1.1.1 + # via jinja2 +packaging==20.9 + # via + # pallets-sphinx-themes + # sphinx +pallets-sphinx-themes==1.2.3 + # via -r requirements/docs.in +pygments==2.7.4 + # via sphinx +pyparsing==2.4.7 + # via packaging +pytz==2021.1 + # via babel +requests==2.25.1 + # via sphinx +snowballstemmer==2.1.0 + # via sphinx +sphinx-issues==1.2.0 + # via -r requirements/docs.in +sphinx==2.4.4 + # via + # -r requirements/docs.in + # pallets-sphinx-themes + # sphinx-issues + # sphinxcontrib-log-cabinet +sphinxcontrib-applehelp==1.0.2 + # via sphinx +sphinxcontrib-devhelp==1.0.2 + # via sphinx +sphinxcontrib-htmlhelp==1.0.3 + # 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 sphinx +sphinxcontrib-serializinghtml==1.1.4 + # via sphinx +urllib3==1.26.3 + # via requests # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/requirements/tests.txt b/requirements/tests.txt index b6dd944..43d6aba 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -4,21 +4,19 @@ # # pip-compile requirements/tests.in # -attrs==19.3.0 +attrs==20.3.0 # via pytest -iniconfig==1.0.0 +iniconfig==1.1.1 # via pytest -packaging==20.3 +packaging==20.9 # via pytest pluggy==0.13.1 # via pytest -py==1.9.0 +py==1.10.0 # via pytest pyparsing==2.4.7 # via packaging pytest==6.2.2 # via -r requirements/tests.in -six==1.14.0 - # via packaging -toml==0.10.1 +toml==0.10.2 # via pytest diff --git a/requirements/typing.in b/requirements/typing.in new file mode 100644 index 0000000..f0aa93a --- /dev/null +++ b/requirements/typing.in @@ -0,0 +1 @@ +mypy diff --git a/requirements/typing.txt b/requirements/typing.txt new file mode 100644 index 0000000..2530301 --- /dev/null +++ b/requirements/typing.txt @@ -0,0 +1,14 @@ +# +# This file is autogenerated by pip-compile +# To update, run: +# +# pip-compile requirements/typing.in +# +mypy-extensions==0.4.3 + # via mypy +mypy==0.800 + # via -r requirements/typing.in +typed-ast==1.4.2 + # via mypy +typing-extensions==3.7.4.3 + # via mypy @@ -79,6 +79,7 @@ per-file-ignores = src/jinja2/__init__.py: F401 [mypy] +files = src/jinja2 allow_redefinition = True disallow_subclassing_any = True # disallow_untyped_defs = True @@ -1,14 +1,14 @@ [tox] envlist = - py{38,37,36,py3} + py{39,38,37,36,py3} style docs - mypy + typing skip_missing_interpreters = true [testenv] deps = -r requirements/tests.txt -commands = pytest --tb=short --basetemp={envtmpdir} {posargs} +commands = pytest -v --tb=short --basetemp={envtmpdir} {posargs} [testenv:style] deps = pre-commit @@ -19,7 +19,6 @@ commands = pre-commit run --all-files --show-diff-on-failure deps = -r requirements/docs.txt commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs {envtmpdir}/html -[testenv:mypy] -deps = mypy -commands = - mypy src/jinja2 tests +[testenv:typing] +deps = -r requirements/typing.txt +commands = mypy |