diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13f9611d65..b7669a9079 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,11 +83,16 @@ jobs: strategy: fail-fast: false matrix: - python: ['3.7', '3.8', '3.9', '3.10'] + python: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.8-nightly', 'pypy-3.9-nightly'] arch: ['x86', 'x64'] lsp: [''] lsp_extract_file: [''] extra_name: [''] + exclude: + - python: 'pypy-3.8-nightly' + arch: 'x86' + - python: 'pypy-3.9-nightly' + arch: 'x86' include: - python: '3.8' arch: 'x64' @@ -104,11 +109,15 @@ jobs: # lsp: 'http://download.pctools.com/mirror/updates/9.0.0.2308-SDavfree-lite_en.exe' # lsp_extract_file: '' # extra_name: ', with non-IFS LSP' - - python: '3.8' # <- not actually used - arch: 'x64' - pypy_nightly_branch: 'py3.8' - extra_name: ', pypy 3.8 nightly' - + continue-on-error: >- + ${{ + ( + endsWith(matrix.python, '-dev') + || endsWith(matrix.python, '-nightly') + ) + && true + || false + }} steps: - name: Retrieve the project source from an sdist inside the GHA artifact uses: re-actors/checkout-python-sdist@release/v1 @@ -116,7 +125,7 @@ jobs: source-tarball-name: ${{ needs.build.outputs.sdist-artifact-name }} workflow-artifact-name: ${{ env.dists-artifact-name }} - name: Setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: # This allows the matrix to specify just the major.minor version while still # expanding it to get the latest patch version including alpha releases. @@ -149,26 +158,19 @@ jobs: strategy: fail-fast: false matrix: - python: ['pypy-3.7', 'pypy-3.8', '3.7', '3.8', '3.9', '3.10', '3.11-dev'] + python: ['pypy-3.7', 'pypy-3.8', 'pypy-3.9', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12-dev', 'pypy-3.8-nightly', 'pypy-3.9-nightly'] check_formatting: ['0'] - pypy_nightly_branch: [''] extra_name: [''] include: - python: '3.8' check_formatting: '1' extra_name: ', check formatting' - - python: '3.7' # <- not actually used - pypy_nightly_branch: 'py3.7' - extra_name: ', pypy 3.7 nightly' - - python: '3.8' # <- not actually used - pypy_nightly_branch: 'py3.8' - extra_name: ', pypy 3.8 nightly' continue-on-error: >- ${{ ( matrix.check_formatting == '1' - || matrix.pypy_nightly_branch == 'py3.7' || endsWith(matrix.python, '-dev') + || endsWith(matrix.python, '-nightly') ) && true || false @@ -180,7 +182,7 @@ jobs: source-tarball-name: ${{ needs.build.outputs.sdist-artifact-name }} workflow-artifact-name: ${{ env.dists-artifact-name }} - name: Setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 if: "!endsWith(matrix.python, '-dev')" with: python-version: ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python), matrix.python))[startsWith(matrix.python, 'pypy')] }} @@ -194,27 +196,63 @@ jobs: - name: Run tests run: ./ci.sh env: - PYPY_NIGHTLY_BRANCH: '${{ matrix.pypy_nightly_branch }}' CHECK_FORMATTING: '${{ matrix.check_formatting }}' # Should match 'name:' up above JOB_NAME: 'Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})' + autofmt: + name: Autoformat dependabot PR + timeout-minutes: 10 + if: github.actor == 'dependabot[bot]' + runs-on: 'ubuntu-latest' + # https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#changing-github_token-permissions + permissions: + pull-requests: write + issues: write + repository-projects: write + contents: write + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.ref }} + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: "3.8" + - name: Check formatting + run: | + python -m pip install -r test-requirements.txt + ./check.sh + - name: Commit autoformatter changes + if: failure() + run: | + black setup.py trio + git config user.name 'github-actions[bot]' + git config user.email '41898282+github-actions[bot]@users.noreply.github.com' + git commit -am "Autoformatter changes" + git push + macOS: name: 'macOS (${{ matrix.python }})' needs: - build - timeout-minutes: 10 + timeout-minutes: 15 runs-on: 'macos-latest' strategy: fail-fast: false matrix: - python: ['3.7', '3.8', '3.9', '3.10'] - include: - - python: '3.8' # <- not actually used - arch: 'x64' - pypy_nightly_branch: 'py3.8' - extra_name: ', pypy 3.8 nightly' + python: ['3.7', '3.8', '3.9', '3.10', 'pypy-3.8-nightly', 'pypy-3.9-nightly'] + continue-on-error: >- + ${{ + ( + endsWith(matrix.python, '-dev') + || endsWith(matrix.python, '-nightly') + ) + && true + || false + }} steps: - name: Retrieve the project source from an sdist inside the GHA artifact uses: re-actors/checkout-python-sdist@release/v1 @@ -222,7 +260,7 @@ jobs: source-tarball-name: ${{ needs.build.outputs.sdist-artifact-name }} workflow-artifact-name: ${{ env.dists-artifact-name }} - name: Setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ fromJSON(format('["{0}", "{1}"]', format('{0}.0-alpha - {0}.X', matrix.python), matrix.python))[startsWith(matrix.python, 'pypy')] }} cache: pip diff --git a/.readthedocs.yml b/.readthedocs.yml index 2a32d6c9b5..9fde00ef8f 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -5,8 +5,12 @@ formats: - htmlzip - epub +build: + os: "ubuntu-22.04" + tools: + python: "3.11" + python: - version: 3.7 install: - requirements: docs-requirements.txt diff --git a/check.sh b/check.sh index 57f1e2db40..8416a9c5d1 100755 --- a/check.sh +++ b/check.sh @@ -28,6 +28,15 @@ mypy -m trio -m trio.testing --platform linux || EXIT_STATUS=$? mypy -m trio -m trio.testing --platform darwin || EXIT_STATUS=$? # tests FreeBSD too mypy -m trio -m trio.testing --platform win32 || EXIT_STATUS=$? +# Check pip compile is consistent +pip-compile test-requirements.in +pip-compile docs-requirements.in + +if git status --porcelain | grep -q "requirements.txt"; then + git status --porcelain + EXIT_STATUS=1 +fi + # Finally, leave a really clear warning of any issues and exit if [ $EXIT_STATUS -ne 0 ]; then cat <= 1.7.0, < 3.4 +sphinx >= 1.7.0, < 6.2 # jinja2-3.1 causes importerror with sphinx<4.0 jinja2 < 3.1 sphinx_rtd_theme diff --git a/docs-requirements.txt b/docs-requirements.txt index cdb4d4e9af..4c197c69b3 100644 --- a/docs-requirements.txt +++ b/docs-requirements.txt @@ -1,6 +1,6 @@ # -# This file is autogenerated by pip-compile with python 3.7 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.8 +# by the following command: # # pip-compile docs-requirements.in # @@ -12,11 +12,11 @@ attrs==22.2.0 # via # -r docs-requirements.in # outcome -babel==2.11.0 +babel==2.12.1 # via sphinx certifi==2022.12.7 # via requests -charset-normalizer==3.0.1 +charset-normalizer==3.1.0 # via requests click==8.1.3 # via @@ -24,7 +24,7 @@ click==8.1.3 # towncrier click-default-group==1.2.2 # via towncrier -docutils==0.17.1 +docutils==0.18.1 # via # sphinx # sphinx-rtd-theme @@ -38,6 +38,8 @@ imagesize==1.4.1 # via sphinx immutables==0.19 # via -r docs-requirements.in +importlib-metadata==6.0.0 + # via sphinx incremental==22.10.0 # via towncrier jinja2==3.0.3 @@ -63,19 +65,21 @@ snowballstemmer==2.2.0 # via sphinx sortedcontainers==2.4.0 # via -r docs-requirements.in -sphinx==3.3.1 +sphinx==6.1.3 # via # -r docs-requirements.in # sphinx-rtd-theme # sphinxcontrib-trio -sphinx-rtd-theme==1.1.1 +sphinx-rtd-theme==1.2.0 # via -r docs-requirements.in -sphinxcontrib-applehelp==1.0.2 +sphinxcontrib-applehelp==1.0.4 # via sphinx sphinxcontrib-devhelp==1.0.2 # via sphinx -sphinxcontrib-htmlhelp==2.0.0 +sphinxcontrib-htmlhelp==2.0.1 # via sphinx +sphinxcontrib-jquery==2.0.0 + # via sphinx-rtd-theme sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-qthelp==1.0.3 @@ -86,10 +90,12 @@ sphinxcontrib-trio==1.1.2 # via -r docs-requirements.in tomli==2.0.1 # via towncrier -towncrier==22.8.0 +towncrier==22.12.0 # via -r docs-requirements.in urllib3==1.26.14 # via requests +zipp==3.15.0 + # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: # setuptools diff --git a/docs/source/_templates/layout.html b/docs/source/_templates/layout.html index d3b0ca89fd..dbebf5c2ae 100644 --- a/docs/source/_templates/layout.html +++ b/docs/source/_templates/layout.html @@ -4,8 +4,13 @@ {% extends "!layout.html" %} {% block sidebartitle %} -