From 87fc4378ec87317d0450d1e57db89a9f7ba7da8e Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 28 Dec 2023 06:48:43 -0800 Subject: [PATCH 1/5] update read the docs env --- .readthedocs.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 346900b20..5ffe32b36 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -1,8 +1,8 @@ version: 2 build: - os: ubuntu-20.04 + os: ubuntu-22.04 tools: - python: "3.10" + python: "3.12" python: install: - requirements: requirements/docs.txt From ecc170108bfee299550997d0e1cd7cd5f899fa57 Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 28 Dec 2023 08:22:43 -0800 Subject: [PATCH 2/5] update description --- .github/workflows/lock.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lock.yaml b/.github/workflows/lock.yaml index e962fd041..9825178c3 100644 --- a/.github/workflows/lock.yaml +++ b/.github/workflows/lock.yaml @@ -1,8 +1,8 @@ -name: 'Lock threads' -# Lock closed issues that have not received any further activity for -# two weeks. This does not close open issues, only humans may do that. -# We find that it is easier to respond to new issues with fresh examples -# rather than continuing discussions on old issues. +name: 'Lock inactive closed issues' +# Lock closed issues that have not received any further activity for two weeks. +# This does not close open issues, only humans may do that. We find that it is +# easier to respond to new issues with fresh examples rather than continuing +# discussions on old issues. on: schedule: From d861b0ca60d56cbd638fc7ee5462e764e85b15c6 Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 28 Dec 2023 08:24:52 -0800 Subject: [PATCH 3/5] update python version matrix --- .github/workflows/tests.yaml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index c1e6ea314..450bcaf28 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -9,9 +9,6 @@ on: - '*.md' - '*.rst' pull_request: - branches: - - main - - '*.x' paths-ignore: - 'docs/**' - '*.md' @@ -24,15 +21,15 @@ jobs: fail-fast: false matrix: include: - - {name: Linux, python: '3.11', os: ubuntu-latest, tox: py311} - - {name: Windows, python: '3.11', os: windows-latest, tox: py311} - - {name: Mac, python: '3.11', os: macos-latest, tox: py311} - - {name: '3.12-dev', python: '3.12-dev', os: ubuntu-latest, tox: py312} + - {name: Linux, python: '3.12', os: ubuntu-latest, tox: py312} + - {name: Windows, python: '3.12', os: windows-latest, tox: py312} + - {name: Mac, python: '3.12', os: macos-latest, tox: py312} + - {name: '3.11', python: '3.11', os: ubuntu-latest, tox: py311} - {name: '3.10', python: '3.10', os: ubuntu-latest, tox: py310} - {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39} - {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38} - {name: 'PyPy', python: 'pypy-3.10', os: ubuntu-latest, tox: pypy310} - - {name: Typing, python: '3.11', os: ubuntu-latest, tox: typing} + - {name: Typing, python: '3.12', os: ubuntu-latest, tox: typing} steps: - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 From f78ee55fb225dbf1d79ce595f6f21a6aca930753 Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 28 Dec 2023 08:37:28 -0800 Subject: [PATCH 4/5] use pip-compile instead of pip-compile-multi --- .github/workflows/publish.yaml | 26 +++---- .github/workflows/tests.yaml | 17 ++-- requirements/build.txt | 13 ++-- requirements/dev.in | 2 +- requirements/dev.txt | 138 ++++++++++++++++++++++++++------- requirements/docs.in | 4 +- requirements/docs.txt | 37 +++++---- requirements/tests.txt | 15 ++-- requirements/typing.txt | 17 ++-- src/click/decorators.py | 4 +- 10 files changed, 177 insertions(+), 96 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 58914f900..16707210c 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -9,12 +9,12 @@ jobs: outputs: hash: ${{ steps.hash.outputs.hash }} steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + - uses: actions/setup-python@d27e3f3d7c64b4bbf8e4abfb9b63b83e846e0435 with: python-version: '3.x' - cache: 'pip' - cache-dependency-path: 'requirements/*.txt' + cache: pip + cache-dependency-path: requirements/*.txt - run: pip install -r requirements/build.txt # Use the commit date instead of the current date during the build. - run: echo "SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)" >> $GITHUB_ENV @@ -27,19 +27,19 @@ jobs: with: path: ./dist provenance: - needs: ['build'] + needs: [build] permissions: actions: read id-token: write contents: write # Can't pin with hash due to how this workflow works. - uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.9.0 + uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.7.0 with: base64-subjects: ${{ needs.build.outputs.hash }} create-release: # Upload the sdist, wheels, and provenance to a GitHub release. They remain # available as build artifacts for a while as well. - needs: ['provenance'] + needs: [provenance] runs-on: ubuntu-latest permissions: contents: write @@ -53,19 +53,19 @@ jobs: env: GH_TOKEN: ${{ github.token }} publish-pypi: - needs: ['provenance'] + needs: [provenance] # Wait for approval before attempting to upload to PyPI. This allows reviewing the # files in the draft release. - environment: 'publish' + environment: publish runs-on: ubuntu-latest permissions: id-token: write steps: - uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a - - uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e + - uses: pypa/gh-action-pypi-publish@29930c9cf57955dc1b98162d0d8bc3ec80d9e75c with: - repository_url: https://test.pypi.org/legacy/ - packages_dir: artifact/ - - uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e + repository-url: https://test.pypi.org/legacy/ + packages-dir: artifact/ + - uses: pypa/gh-action-pypi-publish@29930c9cf57955dc1b98162d0d8bc3ec80d9e75c with: packages-dir: artifact/ diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 450bcaf28..761c55c27 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -31,17 +31,22 @@ jobs: - {name: 'PyPy', python: 'pypy-3.10', os: ubuntu-latest, tox: pypy310} - {name: Typing, python: '3.12', os: ubuntu-latest, tox: typing} steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - uses: actions/setup-python@5ccb29d8773c3f3f653e1705f474dfaa8a06a912 with: python-version: ${{ matrix.python }} - cache: 'pip' - cache-dependency-path: 'requirements/*.txt' + cache: pip + cache-dependency-path: requirements/*.txt + - name: update pip + run: | + pip install -U wheel + pip install -U setuptools + python -m pip install -U pip - name: cache mypy - uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 + uses: actions/cache@58c146cc91c5b9e778e71775dfe9bf1442ad9a12 with: path: ./.mypy_cache - key: mypy|${{ matrix.python }}|${{ hashFiles('pyproject.toml') }} + key: mypy|${{ matrix.python }}|${{ hashFiles('setup.cfg') }} if: matrix.tox == 'typing' - run: pip install tox - run: tox run -e ${{ matrix.tox }} diff --git a/requirements/build.txt b/requirements/build.txt index 196545d0e..fc640402e 100644 --- a/requirements/build.txt +++ b/requirements/build.txt @@ -1,13 +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.0.3 + # via -r build.in +packaging==23.2 # via build pyproject-hooks==1.0.0 # via build diff --git a/requirements/dev.in b/requirements/dev.in index 99f5942f8..2588467c1 100644 --- a/requirements/dev.in +++ b/requirements/dev.in @@ -1,6 +1,6 @@ -r docs.in -r tests.in -r typing.in -pip-compile-multi +pip-tools pre-commit tox diff --git a/requirements/dev.txt b/requirements/dev.txt index 7fcef99fb..490291a2d 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -1,60 +1,140 @@ -# 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.13 + # via sphinx +babel==2.14.0 + # via sphinx +build==1.0.3 # via pip-tools -cachetools==5.3.1 +cachetools==5.3.2 # via tox +certifi==2023.11.17 + # via requests cfgv==3.4.0 # via pre-commit chardet==5.2.0 # via tox -click==8.1.6 - # via - # pip-compile-multi - # pip-tools +charset-normalizer==3.3.2 + # via requests +click==8.1.7 + # via pip-tools colorama==0.4.6 # via tox -distlib==0.3.7 +distlib==0.3.8 # via virtualenv -filelock==3.12.2 +docutils==0.18.1 + # via + # sphinx + # sphinx-tabs +filelock==3.13.1 # via # tox # virtualenv -identify==2.5.26 +identify==2.5.33 # via pre-commit -pip-compile-multi==2.6.3 - # via -r requirements/dev.in +idna==3.6 + # via requests +imagesize==1.4.1 + # via sphinx +iniconfig==2.0.0 + # via pytest +jinja2==3.1.2 + # via sphinx +markupsafe==2.1.3 + # via jinja2 +mypy==1.8.0 + # via -r typing.in +mypy-extensions==1.0.0 + # via mypy +nodeenv==1.8.0 + # via + # pre-commit + # pyright +packaging==23.2 + # via + # build + # pallets-sphinx-themes + # pyproject-api + # pytest + # sphinx + # tox +pallets-sphinx-themes==2.1.1 + # via -r docs.in pip-tools==7.3.0 - # via pip-compile-multi -platformdirs==3.10.0 + # via -r dev.in +platformdirs==4.1.0 # via # tox # virtualenv -pre-commit==3.3.3 - # via -r requirements/dev.in -pyproject-api==1.5.4 +pluggy==1.3.0 + # via + # pytest + # tox +pre-commit==3.6.0 + # via -r dev.in +pygments==2.17.2 + # via + # sphinx + # sphinx-tabs +pyproject-api==1.6.1 # via tox pyproject-hooks==1.0.0 # via build +pyright==1.1.343 + # via -r typing.in +pytest==7.4.3 + # via -r tests.in pyyaml==6.0.1 # via pre-commit -toposort==1.10 - # via pip-compile-multi -tox==4.9.0 - # via -r requirements/dev.in -virtualenv==20.24.3 +requests==2.31.0 + # via sphinx +snowballstemmer==2.2.0 + # via sphinx +sphinx==7.2.6 + # via + # -r docs.in + # pallets-sphinx-themes + # sphinx-issues + # sphinx-tabs + # sphinxcontrib-applehelp + # sphinxcontrib-devhelp + # sphinxcontrib-htmlhelp + # sphinxcontrib-log-cabinet + # sphinxcontrib-qthelp + # sphinxcontrib-serializinghtml +sphinx-issues==3.0.1 + # via -r docs.in +sphinx-tabs==3.4.4 + # via -r docs.in +sphinxcontrib-applehelp==1.0.7 + # via sphinx +sphinxcontrib-devhelp==1.0.5 + # via sphinx +sphinxcontrib-htmlhelp==2.0.4 + # via sphinx +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-log-cabinet==1.0.1 + # via -r docs.in +sphinxcontrib-qthelp==1.0.6 + # via sphinx +sphinxcontrib-serializinghtml==1.1.9 + # via sphinx +tox==4.11.4 + # via -r dev.in +typing-extensions==4.9.0 + # via mypy +urllib3==2.1.0 + # via requests +virtualenv==20.25.0 # via # pre-commit # tox -wheel==0.41.1 +wheel==0.42.0 # via pip-tools # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/docs.in b/requirements/docs.in index 3ee050af0..a00c08f85 100644 --- a/requirements/docs.in +++ b/requirements/docs.in @@ -1,5 +1,5 @@ -Pallets-Sphinx-Themes -Sphinx +pallets-sphinx-themes +sphinx sphinx-issues sphinxcontrib-log-cabinet sphinx-tabs diff --git a/requirements/docs.txt b/requirements/docs.txt index dd05987c2..df0eb5cbb 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -1,23 +1,22 @@ -# SHA1:34fd4ca6516e97c7348e6facdd9c4ebb68209d1c # -# 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 # via sphinx -babel==2.12.1 +babel==2.14.0 # via sphinx -certifi==2023.7.22 +certifi==2023.11.17 # via requests -charset-normalizer==3.2.0 +charset-normalizer==3.3.2 # via requests docutils==0.18.1 # via # sphinx # sphinx-tabs -idna==3.4 +idna==3.6 # via requests imagesize==1.4.1 # via sphinx @@ -25,13 +24,13 @@ jinja2==3.1.2 # via sphinx markupsafe==2.1.3 # via jinja2 -packaging==23.1 +packaging==23.2 # via # pallets-sphinx-themes # sphinx pallets-sphinx-themes==2.1.1 - # via -r requirements/docs.in -pygments==2.16.1 + # via -r docs.in +pygments==2.17.2 # via # sphinx # sphinx-tabs @@ -39,9 +38,9 @@ requests==2.31.0 # via sphinx snowballstemmer==2.2.0 # via sphinx -sphinx==7.2.1 +sphinx==7.2.6 # via - # -r requirements/docs.in + # -r docs.in # pallets-sphinx-themes # sphinx-issues # sphinx-tabs @@ -52,9 +51,9 @@ sphinx==7.2.1 # sphinxcontrib-qthelp # sphinxcontrib-serializinghtml sphinx-issues==3.0.1 - # via -r requirements/docs.in -sphinx-tabs==3.4.1 - # via -r requirements/docs.in + # via -r docs.in +sphinx-tabs==3.4.4 + # via -r docs.in sphinxcontrib-applehelp==1.0.7 # via sphinx sphinxcontrib-devhelp==1.0.5 @@ -64,10 +63,10 @@ sphinxcontrib-htmlhelp==2.0.4 sphinxcontrib-jsmath==1.0.1 # via sphinx sphinxcontrib-log-cabinet==1.0.1 - # via -r requirements/docs.in + # via -r docs.in sphinxcontrib-qthelp==1.0.6 # via sphinx -sphinxcontrib-serializinghtml==1.1.8 +sphinxcontrib-serializinghtml==1.1.9 # via sphinx -urllib3==2.0.4 +urllib3==2.1.0 # via requests diff --git a/requirements/tests.txt b/requirements/tests.txt index 6a6808865..2064c24c5 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -1,15 +1,14 @@ -# SHA1:0eaa389e1fdb3a1917c0f987514bd561be5718ee # -# 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 # iniconfig==2.0.0 # via pytest -packaging==23.1 +packaging==23.2 # via pytest -pluggy==1.2.0 +pluggy==1.3.0 # via pytest -pytest==7.4.0 - # via -r requirements/tests.in +pytest==7.4.3 + # via -r tests.in diff --git a/requirements/typing.txt b/requirements/typing.txt index 5edc6f5ff..fbc4459f4 100644 --- a/requirements/typing.txt +++ b/requirements/typing.txt @@ -1,19 +1,18 @@ -# SHA1:0d25c235a98f3c8c55aefb59b91c82834e185f0a # -# 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.5.1 - # via -r requirements/typing.in +mypy==1.8.0 + # via -r typing.in mypy-extensions==1.0.0 # via mypy nodeenv==1.8.0 # via pyright -pyright==1.1.323 - # via -r requirements/typing.in -typing-extensions==4.7.1 +pyright==1.1.343 + # via -r typing.in +typing-extensions==4.9.0 # via mypy # The following packages are considered to be unsafe in a requirements file: diff --git a/src/click/decorators.py b/src/click/decorators.py index 892d807f1..4d11478f1 100644 --- a/src/click/decorators.py +++ b/src/click/decorators.py @@ -94,7 +94,7 @@ def new_func(*args: P.args, **kwargs: P.kwargs) -> R: return update_wrapper(new_func, f) - return decorator # type: ignore[return-value] + return decorator def pass_meta_key( @@ -127,7 +127,7 @@ def new_func(*args: P.args, **kwargs: P.kwargs) -> R: f"Decorator that passes {doc_description} as the first argument" " to the decorated function." ) - return decorator # type: ignore[return-value] + return decorator CmdType = t.TypeVar("CmdType", bound=Command) From d7cc79008a33372778e8d9df4092e59655411ebc Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 28 Dec 2023 08:38:17 -0800 Subject: [PATCH 5/5] enable grouped updates for actions and python --- .github/dependabot.yml | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 90f94bc32..1f47f125e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,9 +1,18 @@ version: 2 updates: -- package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "monthly" - day: "monday" - time: "16:00" - timezone: "UTC" + - package-ecosystem: github-actions + directory: / + schedule: + interval: monthly + groups: + github-actions: + patterns: + - '*' + - package-ecosystem: pip + directory: /requirements/ + schedule: + interval: monthly + groups: + python-requirements: + patterns: + - '*'