From 4a87de33a4c0607fdbf4b540373cc02cd2bea7d1 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 9 Jan 2024 09:48:04 -0600 Subject: [PATCH 01/48] Run `tox -e update` --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4c18700..782d8c4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: - id: "update-headers" - repo: "https://github.com/psf/black-pre-commit-mirror" - rev: "23.12.0" + rev: "23.12.1" hooks: - id: "black" @@ -34,7 +34,7 @@ repos: - id: "isort" - repo: "https://github.com/pycqa/flake8" - rev: "6.1.0" + rev: "7.0.0" hooks: - id: "flake8" additional_dependencies: From ca4374d126e32b00e88bae2f19f4000504768a6e Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 9 Jan 2024 09:53:38 -0600 Subject: [PATCH 02/48] Update copyrights --- .github/workflows/readme_example.yaml | 2 +- CHANGELOG.rst | 2 +- README.rst | 2 +- action.yml | 2 +- pyproject.toml | 2 +- src/detect_pythons/detector.ps1 | 2 +- src/detect_pythons/detector.sh | 2 +- src/detect_pythons/identify.py | 2 +- src/detect_pythons/sync_readme_example.py | 2 +- tests/test_identify.py | 2 +- tests/test_sync_readme_example.py | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/readme_example.yaml b/.github/workflows/readme_example.yaml index a7d8c8e..da17383 100644 --- a/.github/workflows/readme_example.yaml +++ b/.github/workflows/readme_example.yaml @@ -1,6 +1,6 @@ # This file is a part of the detect-pythons project. # https://github.com/kurtmckee/detect-pythons -# Copyright 2023 Kurt McKee +# Copyright 2023-2024 Kurt McKee # SPDX-License-Identifier: MIT # This workflow exists for several purposes: diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 76ef915..04e389f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,7 +1,7 @@ .. This file is a part of the detect-pythons project. https://github.com/kurtmckee/detect-pythons - Copyright 2023 Kurt McKee + Copyright 2023-2024 Kurt McKee SPDX-License-Identifier: MIT .. diff --git a/README.rst b/README.rst index 6df9ea5..1200961 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ .. This file is a part of the detect-pythons project. https://github.com/kurtmckee/detect-pythons - Copyright 2023 Kurt McKee + Copyright 2023-2024 Kurt McKee SPDX-License-Identifier: MIT Detect Python interpreters diff --git a/action.yml b/action.yml index 21df35a..2f9014b 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,6 @@ # This file is a part of the detect-pythons project. # https://github.com/kurtmckee/detect-pythons -# Copyright 2023 Kurt McKee +# Copyright 2023-2024 Kurt McKee # SPDX-License-Identifier: MIT author: "Kurt McKee" diff --git a/pyproject.toml b/pyproject.toml index 55c90e8..94ef258 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,7 @@ new_fragment_template = "file: fragment-template.rst.txt" template = """ This file is a part of the detect-pythons project. https://github.com/kurtmckee/detect-pythons -Copyright 2023 Kurt McKee +Copyright 2023-{{ year }} Kurt McKee SPDX-License-Identifier: MIT """ exclusions = [ diff --git a/src/detect_pythons/detector.ps1 b/src/detect_pythons/detector.ps1 index 0f679f1..49b36f1 100644 --- a/src/detect_pythons/detector.ps1 +++ b/src/detect_pythons/detector.ps1 @@ -1,6 +1,6 @@ # This file is a part of the detect-pythons project. # https://github.com/kurtmckee/detect-pythons -# Copyright 2023 Kurt McKee +# Copyright 2023-2024 Kurt McKee # SPDX-License-Identifier: MIT # Search paths in $PATH for Python interpreters. diff --git a/src/detect_pythons/detector.sh b/src/detect_pythons/detector.sh index be8f537..a9d6544 100644 --- a/src/detect_pythons/detector.sh +++ b/src/detect_pythons/detector.sh @@ -1,6 +1,6 @@ # This file is a part of the detect-pythons project. # https://github.com/kurtmckee/detect-pythons -# Copyright 2023 Kurt McKee +# Copyright 2023-2024 Kurt McKee # SPDX-License-Identifier: MIT IDENTIFY_PY="${GITHUB_ACTION_PATH}/src/detect_pythons/identify.py" diff --git a/src/detect_pythons/identify.py b/src/detect_pythons/identify.py index 0e73d1c..3235e31 100644 --- a/src/detect_pythons/identify.py +++ b/src/detect_pythons/identify.py @@ -1,6 +1,6 @@ # This file is a part of the detect-pythons project. # https://github.com/kurtmckee/detect-pythons -# Copyright 2023 Kurt McKee +# Copyright 2023-2024 Kurt McKee # SPDX-License-Identifier: MIT from __future__ import print_function diff --git a/src/detect_pythons/sync_readme_example.py b/src/detect_pythons/sync_readme_example.py index 71fe0a8..3447207 100644 --- a/src/detect_pythons/sync_readme_example.py +++ b/src/detect_pythons/sync_readme_example.py @@ -1,6 +1,6 @@ # This file is a part of the detect-pythons project. # https://github.com/kurtmckee/detect-pythons -# Copyright 2023 Kurt McKee +# Copyright 2023-2024 Kurt McKee # SPDX-License-Identifier: MIT import pathlib diff --git a/tests/test_identify.py b/tests/test_identify.py index a06b6a3..9f6b807 100644 --- a/tests/test_identify.py +++ b/tests/test_identify.py @@ -1,6 +1,6 @@ # This file is a part of the detect-pythons project. # https://github.com/kurtmckee/detect-pythons -# Copyright 2023 Kurt McKee +# Copyright 2023-2024 Kurt McKee # SPDX-License-Identifier: MIT import platform diff --git a/tests/test_sync_readme_example.py b/tests/test_sync_readme_example.py index 8312871..6fb9cc6 100644 --- a/tests/test_sync_readme_example.py +++ b/tests/test_sync_readme_example.py @@ -1,6 +1,6 @@ # This file is a part of the detect-pythons project. # https://github.com/kurtmckee/detect-pythons -# Copyright 2023 Kurt McKee +# Copyright 2023-2024 Kurt McKee # SPDX-License-Identifier: MIT import unittest.mock From 0e98eec2333a05ff111830dbbaa37a286a76882b Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Mon, 5 Feb 2024 12:44:25 -0600 Subject: [PATCH 03/48] Run `tox -e update`; fix a typo --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 782d8c4..53a0b78 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: - id: "update-headers" - repo: "https://github.com/psf/black-pre-commit-mirror" - rev: "23.12.1" + rev: "24.1.1" hooks: - id: "black" @@ -38,13 +38,13 @@ repos: hooks: - id: "flake8" additional_dependencies: - - "flake8-bugbear==23.12.2" + - "flake8-bugbear==24.1.17" - repo: "https://github.com/editorconfig-checker/editorconfig-checker.python" rev: "2.7.3" hooks: - id: "editorconfig-checker" - # The README contain YAML samples indented with 2 spaces. + # The README contains YAML samples indented with 2 spaces. # The .editorconfig file requires 4 spaces for indentation, # so this pre-commit hook will ignore the README. exclude: "README.rst" @@ -66,7 +66,7 @@ repos: pass_filenames: false - repo: "https://github.com/python-jsonschema/check-jsonschema" - rev: "0.27.3" + rev: "0.27.4" hooks: - id: "check-github-workflows" - id: "check-dependabot" From 523ec804bd2c5d4d4272b77a5d5f135267ab0412 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Mon, 5 Feb 2024 12:44:37 -0600 Subject: [PATCH 04/48] Update the copyright years in the LICENSE --- LICENSE.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE.txt b/LICENSE.txt index a8c5822..4425673 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright 2023 Kurt McKee +Copyright 2023-2024 Kurt McKee Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From c274bb56a044bf2098f1e1e45923ebda4c88a228 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Mon, 5 Feb 2024 13:40:00 -0600 Subject: [PATCH 05/48] Test against Python 3.13 Also, transition to lists of lists for Python interpreter versions, and stop caching pip packages since all virtual environments are cached. --- .github/workflows/test.yaml | 38 +++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 37f6ad4..8573c92 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,6 +20,26 @@ jobs: runner: "macos-latest" - name: "Windows" runner: "windows-latest" + + # Each operating system should test all Python interpreters simultaneously. + # This nested-list syntax accomplishes that goal + # without creating cross-products of every possible OS and interpreter. + # + # Note: The CPython interpreter versions should be in ascending order + # because the last-listed version will be the default CPython version. + # + cpythons: + - - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" + cpython-beta: + - "3.13" + pypys: + - - "3.8" + - "3.9" + - "3.10" fail-fast: false runs-on: "${{ matrix.os.runner }}" @@ -30,17 +50,15 @@ jobs: - name: "Setup Pythons" uses: "actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c" # v5.0.0 with: - python-version: | - pypy3.8 - pypy3.9 - pypy3.10 - 3.8 - 3.9 - 3.10 - 3.11 - 3.12 + python-version: "${{ + format( + '{0}\n{1}\n{2}', + format('pypy{0}', join(matrix.pypys, '\npypy')), + matrix.cpython-beta, + join(matrix.cpythons, '\n') + ) + }}" allow-prereleases: true - cache: "pip" - name: "Detect Pythons" uses: "./" From 013d1f744f7835ce0d305baf50a27bd0b99eff72 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Mon, 5 Feb 2024 13:48:29 -0600 Subject: [PATCH 06/48] Add a changelog fragment --- changelog.d/20240205_134734_kurtmckee_updates.rst | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 changelog.d/20240205_134734_kurtmckee_updates.rst diff --git a/changelog.d/20240205_134734_kurtmckee_updates.rst b/changelog.d/20240205_134734_kurtmckee_updates.rst new file mode 100644 index 0000000..4c2b9e5 --- /dev/null +++ b/changelog.d/20240205_134734_kurtmckee_updates.rst @@ -0,0 +1,4 @@ +Python support +-------------- + +* Test against early Python 3.13 versions in CI. From 837545c6a70928c7d4e1aa677f170a7f92c66e3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 22:44:18 +0000 Subject: [PATCH 07/48] Bump the github-actions group with 1 update Bumps the github-actions group with 1 update: [actions/cache](https://github.com/actions/cache). Updates `actions/cache` from 3 to 4 - [Release notes](https://github.com/actions/cache/releases) - [Commits](https://github.com/actions/cache/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/readme_example.yaml | 4 ++-- .github/workflows/test.yaml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/readme_example.yaml b/.github/workflows/readme_example.yaml index da17383..02978de 100644 --- a/.github/workflows/readme_example.yaml +++ b/.github/workflows/readme_example.yaml @@ -52,7 +52,7 @@ jobs: - uses: "kurtmckee/detect-pythons@v1" - - uses: "actions/cache@v3" + - uses: "actions/cache@v4" id: "restore-cache" with: # You may need to augment the list of files to hash. @@ -95,7 +95,7 @@ jobs: - uses: "kurtmckee/detect-pythons@v1" - - uses: "actions/cache@v3" + - uses: "actions/cache@v4" id: "restore-cache" with: # You may need to augment the list of files to hash. diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 8573c92..60fe819 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -65,7 +65,7 @@ jobs: - name: "Restore cache" id: "restore-cache" - uses: "actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84" # v3.3.2 + uses: "actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319" # v4.0.1 with: path: | .tox/ From 939d1579294cc6dc23fb096515426d5c49e5be76 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 22:45:28 +0000 Subject: [PATCH 08/48] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 1200961..2d12431 100644 --- a/README.rst +++ b/README.rst @@ -58,7 +58,7 @@ and tox test environments stored in ``.tox/``. - uses: "kurtmckee/detect-pythons@v1" - - uses: "actions/cache@v3" + - uses: "actions/cache@v4" id: "restore-cache" with: # You may need to augment the list of files to hash. From 20630b8521bb3e8fcde6f8a4b70aa18e7c34d2d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 22:22:49 +0000 Subject: [PATCH 09/48] Bump the github-actions group with 2 updates Bumps the github-actions group with 2 updates: [actions/setup-python](https://github.com/actions/setup-python) and [actions/checkout](https://github.com/actions/checkout). Updates `actions/setup-python` from 5.0.0 to 5.1.0 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5...v5.1.0) Updates `actions/checkout` from 4.1.1 to 4.1.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/b4ffde65f46336ab88eb53be808477a3936bae11...9bb56186c3b09b4f86b1c65136769dd318469633) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/readme_example.yaml | 4 ++-- .github/workflows/test.yaml | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/readme_example.yaml b/.github/workflows/readme_example.yaml index 02978de..f8082fd 100644 --- a/.github/workflows/readme_example.yaml +++ b/.github/workflows/readme_example.yaml @@ -43,7 +43,7 @@ jobs: runs-on: "${{ matrix.os.runner }}" steps: # START_README_EXAMPLE_BLOCK - - uses: "actions/setup-python@v5" + - uses: "actions/setup-python@v5.1.0" with: python-version: | graalpy-23.1 @@ -87,7 +87,7 @@ jobs: name: "Verify (Windows)" runs-on: "windows-latest" steps: - - uses: "actions/setup-python@v5" + - uses: "actions/setup-python@v5.1.0" with: python-version: | pypy-3.10 diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 60fe819..a49324b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -45,10 +45,10 @@ jobs: runs-on: "${{ matrix.os.runner }}" steps: - name: "Checkout the repository" - uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1 + uses: "actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633" # v4.1.2 - name: "Setup Pythons" - uses: "actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c" # v5.0.0 + uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0 with: python-version: "${{ format( @@ -103,7 +103,7 @@ jobs: runs-on: "${{ matrix.os.runner }}" steps: - name: "Checkout the repository" - uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1 + uses: "actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633" # v4.1.2 - name: "Test: Disable output file" uses: "./" From 2bc67b54fb0000fb11ae29b015b994f15e370b06 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 22:23:02 +0000 Subject: [PATCH 10/48] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 2d12431..2b9c217 100644 --- a/README.rst +++ b/README.rst @@ -49,7 +49,7 @@ and tox test environments stored in ``.tox/``. .. START_README_EXAMPLE_BLOCK .. code-block:: yaml - - uses: "actions/setup-python@v5" + - uses: "actions/setup-python@v5.1.0" with: python-version: | graalpy-23.1 From 441b8af99baeeb596a33d6073de69b6019edb776 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 22:59:32 +0000 Subject: [PATCH 11/48] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black-pre-commit-mirror: 24.1.1 → 24.3.0](https://github.com/psf/black-pre-commit-mirror/compare/24.1.1...24.3.0) - [github.com/shellcheck-py/shellcheck-py: v0.9.0.6 → v0.10.0.1](https://github.com/shellcheck-py/shellcheck-py/compare/v0.9.0.6...v0.10.0.1) - [github.com/python-jsonschema/check-jsonschema: 0.27.4 → 0.28.1](https://github.com/python-jsonschema/check-jsonschema/compare/0.27.4...0.28.1) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 53a0b78..71f509c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: - id: "update-headers" - repo: "https://github.com/psf/black-pre-commit-mirror" - rev: "24.1.1" + rev: "24.3.0" hooks: - id: "black" @@ -50,7 +50,7 @@ repos: exclude: "README.rst" - repo: "https://github.com/shellcheck-py/shellcheck-py" - rev: "v0.9.0.6" + rev: "v0.10.0.1" hooks: - id: "shellcheck" args: @@ -66,7 +66,7 @@ repos: pass_filenames: false - repo: "https://github.com/python-jsonschema/check-jsonschema" - rev: "0.27.4" + rev: "0.28.1" hooks: - id: "check-github-workflows" - id: "check-dependabot" From d4146785a319ce18c88d3d0a7967ef639cd4f2cb Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Mon, 1 Apr 2024 19:49:29 -0500 Subject: [PATCH 12/48] Revert a change that affects the README example block --- .github/workflows/readme_example.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/readme_example.yaml b/.github/workflows/readme_example.yaml index f8082fd..02978de 100644 --- a/.github/workflows/readme_example.yaml +++ b/.github/workflows/readme_example.yaml @@ -43,7 +43,7 @@ jobs: runs-on: "${{ matrix.os.runner }}" steps: # START_README_EXAMPLE_BLOCK - - uses: "actions/setup-python@v5.1.0" + - uses: "actions/setup-python@v5" with: python-version: | graalpy-23.1 @@ -87,7 +87,7 @@ jobs: name: "Verify (Windows)" runs-on: "windows-latest" steps: - - uses: "actions/setup-python@v5.1.0" + - uses: "actions/setup-python@v5" with: python-version: | pypy-3.10 From 4dbebffc44c007b4a50180aecf74c7743088b819 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 00:49:34 +0000 Subject: [PATCH 13/48] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 2b9c217..2d12431 100644 --- a/README.rst +++ b/README.rst @@ -49,7 +49,7 @@ and tox test environments stored in ``.tox/``. .. START_README_EXAMPLE_BLOCK .. code-block:: yaml - - uses: "actions/setup-python@v5.1.0" + - uses: "actions/setup-python@v5" with: python-version: | graalpy-23.1 From fd1c2be039c184ec3f69a944df3bb07998ac740e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 22:12:15 +0000 Subject: [PATCH 14/48] Bump actions/checkout from 4.1.2 to 4.1.4 in the github-actions group Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.2 to 4.1.4 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/9bb56186c3b09b4f86b1c65136769dd318469633...0ad4b8fadaa221de15dcec353f45205ec38ea70b) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a49324b..9d3b859 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -45,7 +45,7 @@ jobs: runs-on: "${{ matrix.os.runner }}" steps: - name: "Checkout the repository" - uses: "actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633" # v4.1.2 + uses: "actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b" # v4.1.4 - name: "Setup Pythons" uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0 @@ -103,7 +103,7 @@ jobs: runs-on: "${{ matrix.os.runner }}" steps: - name: "Checkout the repository" - uses: "actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633" # v4.1.2 + uses: "actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b" # v4.1.4 - name: "Test: Disable output file" uses: "./" From e8c9f34854e7695d85cac2de97a2f43dcef388e1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 May 2024 22:50:00 +0000 Subject: [PATCH 15/48] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0) - [github.com/psf/black-pre-commit-mirror: 24.3.0 → 24.4.2](https://github.com/psf/black-pre-commit-mirror/compare/24.3.0...24.4.2) - [github.com/python-jsonschema/check-jsonschema: 0.28.1 → 0.28.2](https://github.com/python-jsonschema/check-jsonschema/compare/0.28.1...0.28.2) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 71f509c..86d1e32 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: - id: "check-useless-excludes" - repo: "https://github.com/pre-commit/pre-commit-hooks" - rev: "v4.5.0" + rev: "v4.6.0" hooks: - id: "check-yaml" - id: "check-added-large-files" @@ -24,7 +24,7 @@ repos: - id: "update-headers" - repo: "https://github.com/psf/black-pre-commit-mirror" - rev: "24.3.0" + rev: "24.4.2" hooks: - id: "black" @@ -66,7 +66,7 @@ repos: pass_filenames: false - repo: "https://github.com/python-jsonschema/check-jsonschema" - rev: "0.28.1" + rev: "0.28.2" hooks: - id: "check-github-workflows" - id: "check-dependabot" From ddb5daa21d54ba7b135465ab00a6798d192a32e2 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Sat, 11 May 2024 08:07:21 -0500 Subject: [PATCH 16/48] Update some things --- .pre-commit-config.yaml | 4 ++-- tox.ini | 17 +++++++++++------ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 86d1e32..fc2382c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,7 +38,7 @@ repos: hooks: - id: "flake8" additional_dependencies: - - "flake8-bugbear==24.1.17" + - "flake8-bugbear==24.4.26" - repo: "https://github.com/editorconfig-checker/editorconfig-checker.python" rev: "2.7.3" @@ -66,7 +66,7 @@ repos: pass_filenames: false - repo: "https://github.com/python-jsonschema/check-jsonschema" - rev: "0.28.2" + rev: "0.28.3" hooks: - id: "check-github-workflows" - id: "check-dependabot" diff --git a/tox.ini b/tox.ini index 06b842d..6ad9544 100644 --- a/tox.ini +++ b/tox.ini @@ -3,11 +3,13 @@ min_version = 4.3.5 envlist = coverage_erase - py{313, 312, 311, 310, 39, 38, py310, py39, py38} + py{3.13, 3.12, 3.11, 3.10, 3.9, 3.8, py3.10, py3.9, py3.8} coverage_report skip_missing_interpreters = True isolated_build = True +labels = + update=update [testenv] @@ -15,7 +17,7 @@ package = wheel wheel_build_env = build_wheel depends = - py{313, 312, 311, 310, 39, 38, py310, py39, py38}: coverage_erase + py{3.13, 3.12, 3.11, 3.10, 3.9, 3.8, py3.10, py3.9, py3.8}: coverage_erase deps = coverage[toml] pytest @@ -33,7 +35,7 @@ commands = coverage erase [testenv:coverage_report] depends = - py{313, 312, 311, 310, 39, 38, py310, py39, py38} + py{3.13, 3.12, 3.11, 3.10, 3.9, 3.8, py3.10, py3.9, py3.8} skipsdist = true skip_install = true deps = coverage[toml] @@ -44,17 +46,20 @@ commands = coverage report [testenv:update] +description = Update tool versions +base_python = py3.12 +recreate = true +skip_install = true deps = pre-commit upadup -skip_install = true commands = # Update pre-commit hooks and additional dependencies. pre-commit autoupdate upadup - # Run pre-commit. - pre-commit run --all-files + # Run pre-commit immediately, but ignore its exit code. + - pre-commit run -a [flake8] From b502dc6d771eedaf3518f932ccc3924705881e70 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Sat, 11 May 2024 08:13:17 -0500 Subject: [PATCH 17/48] Migrate code tests in CI to a reusable workflow --- .github/workflows/test.yaml | 65 ++++++++----------------------------- 1 file changed, 14 insertions(+), 51 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 9d3b859..5419f33 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -8,18 +8,20 @@ on: - "releases" jobs: - tox: - name: "Tox (${{ matrix.os.name }})" + code: + name: + "Code (${{ + (startswith(matrix.runner, 'ubuntu') && 'Linux') + || (startswith(matrix.runner, 'macos') && 'macOS') + || (startswith(matrix.runner, 'windows') && 'Windows') + }})" strategy: matrix: - os: - - name: "Linux" - runner: "ubuntu-latest" - - name: "macOS" - runner: "macos-latest" - - name: "Windows" - runner: "windows-latest" + runner: + - "ubuntu-latest" + - "macos-latest" + - "windows-latest" # Each operating system should test all Python interpreters simultaneously. # This nested-list syntax accomplishes that goal @@ -42,49 +44,10 @@ jobs: - "3.10" fail-fast: false - runs-on: "${{ matrix.os.runner }}" - steps: - - name: "Checkout the repository" - uses: "actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b" # v4.1.4 - - - name: "Setup Pythons" - uses: "actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d" # v5.1.0 - with: - python-version: "${{ - format( - '{0}\n{1}\n{2}', - format('pypy{0}', join(matrix.pypys, '\npypy')), - matrix.cpython-beta, - join(matrix.cpythons, '\n') - ) - }}" - allow-prereleases: true - - - name: "Detect Pythons" - uses: "./" - - - name: "Restore cache" - id: "restore-cache" - uses: "actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319" # v4.0.1 - with: - path: | - .tox/ - .venv - key: "tox-os=${{ matrix.os.runner }}-hash=${{ hashFiles('.python-identifiers', 'tox.ini') }}" - - - name: "Identify .venv path" - shell: "bash" - run: "echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> $GITHUB_ENV" - - - name: "Create a virtual environment" - if: "steps.restore-cache.outputs.cache-hit == false" - run: | - python -m venv .venv - ${{ env.venv-path }}/python -m pip install --upgrade pip setuptools wheel - ${{ env.venv-path }}/pip install tox + uses: "kurtmckee/github-workflows/.github/workflows/tox.yaml@73024397dba10c866931a1d26cc2a0e7d223472f" # v0.2 + with: + config: "${{ toJSON(matrix) }}" - - name: "Run the test suite" - run: "${{ env.venv-path }}/tox" inputs: name: "Inputs (${{ matrix.os.name }})" From 94600f49f9d49ec23495077ba91dfb8108654082 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Sat, 11 May 2024 17:59:37 -0500 Subject: [PATCH 18/48] Rename `.yml` file extensions --- .github/{FUNDING.yml => FUNDING.yaml} | 0 .github/{dependabot.yml => dependabot.yaml} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename .github/{FUNDING.yml => FUNDING.yaml} (100%) rename .github/{dependabot.yml => dependabot.yaml} (100%) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yaml similarity index 100% rename from .github/FUNDING.yml rename to .github/FUNDING.yaml diff --git a/.github/dependabot.yml b/.github/dependabot.yaml similarity index 100% rename from .github/dependabot.yml rename to .github/dependabot.yaml From 661e403bfe8bc73417dd400cb0aa7ba20758746e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 11 May 2024 23:35:23 +0000 Subject: [PATCH 19/48] Bump actions/checkout from 4.1.4 to 4.1.5 in the github-actions group Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.4 to 4.1.5 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/0ad4b8fadaa221de15dcec353f45205ec38ea70b...44c2b7a8a4ea60a981eaca3cf939b5f4305c123b) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5419f33..7a20f71 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -66,7 +66,7 @@ jobs: runs-on: "${{ matrix.os.runner }}" steps: - name: "Checkout the repository" - uses: "actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b" # v4.1.4 + uses: "actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b" # v4.1.5 - name: "Test: Disable output file" uses: "./" From 6cbbb430d82aff3c2053870629187ce030bb8c40 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jun 2024 22:11:37 +0000 Subject: [PATCH 20/48] Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.5 to 4.1.6 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/44c2b7a8a4ea60a981eaca3cf939b5f4305c123b...a5ac7e51b41094c92402da3b24376905380afc29) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7a20f71..2dc5d7b 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -66,7 +66,7 @@ jobs: runs-on: "${{ matrix.os.runner }}" steps: - name: "Checkout the repository" - uses: "actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b" # v4.1.5 + uses: "actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29" # v4.1.6 - name: "Test: Disable output file" uses: "./" From 46c1fd6dfd3d44f3c8c4bd41ce48a5cbec966d51 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 22:57:34 +0000 Subject: [PATCH 21/48] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/python-jsonschema/check-jsonschema: 0.28.3 → 0.28.4](https://github.com/python-jsonschema/check-jsonschema/compare/0.28.3...0.28.4) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fc2382c..28561ef 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,7 +66,7 @@ repos: pass_filenames: false - repo: "https://github.com/python-jsonschema/check-jsonschema" - rev: "0.28.3" + rev: "0.28.4" hooks: - id: "check-github-workflows" - id: "check-dependabot" From d94580e180ae06bd296ad8b53fd952d2d04a3778 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 4 Jun 2024 09:02:44 -0500 Subject: [PATCH 22/48] Upgrade an example to GraalPy 24.x --- .github/workflows/readme_example.yaml | 2 +- README.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/readme_example.yaml b/.github/workflows/readme_example.yaml index 02978de..3eaf2e9 100644 --- a/.github/workflows/readme_example.yaml +++ b/.github/workflows/readme_example.yaml @@ -46,7 +46,7 @@ jobs: - uses: "actions/setup-python@v5" with: python-version: | - graalpy-23.1 + graalpy-24 pypy-3.10 3.12 diff --git a/README.rst b/README.rst index 2d12431..614a38d 100644 --- a/README.rst +++ b/README.rst @@ -52,7 +52,7 @@ and tox test environments stored in ``.tox/``. - uses: "actions/setup-python@v5" with: python-version: | - graalpy-23.1 + graalpy-24 pypy-3.10 3.12 From 2ed3d3f97eaf407b80257e17d7a9e20d51610550 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 4 Jun 2024 09:04:26 -0500 Subject: [PATCH 23/48] Fix broken link rendering in the GitHub web interface --- README.rst | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/README.rst b/README.rst index 614a38d..f3fc759 100644 --- a/README.rst +++ b/README.rst @@ -181,16 +181,10 @@ so ``detect-pythons`` constructs one. Note that CPython 2.7 is only installed *sometimes*; sometimes it isn't. This is because ``macos-latest`` is sometimes macOS 12.6, and sometimes it's macOS 12.7. -See `actions/runner-images#8642`_ for more information. +See actions/runner-images#8642 for more information. When using ``detect-pythons`` to help with cache-busting, this variability means that you may see two caches appear in regular use for your macOS-based workflows; one that is valid when CPython 2.7 is pre-installed, and another that is valid when it *isn't* installed. - - -.. Links -.. ----- -.. -.. _actions/runner-images#8642: https://github.com/actions/runner-images/issues/8642 From b2d6bb285c7ddda07ab001787fb97b2d69b88114 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 22:52:32 +0000 Subject: [PATCH 24/48] Bump actions/checkout from 4.1.6 to 4.1.7 in the github-actions group Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.6 to 4.1.7 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/a5ac7e51b41094c92402da3b24376905380afc29...692973e3d937129bcbf40652eb9f2f61becf3332) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2dc5d7b..975ac07 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -66,7 +66,7 @@ jobs: runs-on: "${{ matrix.os.runner }}" steps: - name: "Checkout the repository" - uses: "actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29" # v4.1.6 + uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7 - name: "Test: Disable output file" uses: "./" From 1994ba5f39733b642bbad30d1029f658e4ae4b08 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 01:17:05 +0000 Subject: [PATCH 25/48] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/flake8: 7.0.0 → 7.1.0](https://github.com/pycqa/flake8/compare/7.0.0...7.1.0) - [github.com/python-jsonschema/check-jsonschema: 0.28.4 → 0.28.6](https://github.com/python-jsonschema/check-jsonschema/compare/0.28.4...0.28.6) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 28561ef..ab734c5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,7 +34,7 @@ repos: - id: "isort" - repo: "https://github.com/pycqa/flake8" - rev: "7.0.0" + rev: "7.1.0" hooks: - id: "flake8" additional_dependencies: @@ -66,7 +66,7 @@ repos: pass_filenames: false - repo: "https://github.com/python-jsonschema/check-jsonschema" - rev: "0.28.4" + rev: "0.28.6" hooks: - id: "check-github-workflows" - id: "check-dependabot" From c86151ae02985ac24c9e47dd3f511cbd78446c51 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Mon, 29 Jul 2024 14:11:11 -0500 Subject: [PATCH 26/48] Run `tox run -m update` --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ab734c5..ea536f4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -66,7 +66,7 @@ repos: pass_filenames: false - repo: "https://github.com/python-jsonschema/check-jsonschema" - rev: "0.28.6" + rev: "0.29.1" hooks: - id: "check-github-workflows" - id: "check-dependabot" From a9719c21119231201848691d83a2c23fabeea978 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 6 Aug 2024 11:45:36 -0500 Subject: [PATCH 27/48] Run `tox run -m update` --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ea536f4..dc23d59 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: - id: "update-headers" - repo: "https://github.com/psf/black-pre-commit-mirror" - rev: "24.4.2" + rev: "24.8.0" hooks: - id: "black" @@ -34,7 +34,7 @@ repos: - id: "isort" - repo: "https://github.com/pycqa/flake8" - rev: "7.1.0" + rev: "7.1.1" hooks: - id: "flake8" additional_dependencies: From 8380745dcf58ceda223a9560d38b34c8578484fe Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 20 Aug 2024 13:12:53 -0500 Subject: [PATCH 28/48] Lint action workflows; fix reported issues --- .github/workflows/readme_example.yaml | 6 ++++-- .pre-commit-config.yaml | 5 +++++ README.rst | 3 ++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/readme_example.yaml b/.github/workflows/readme_example.yaml index 3eaf2e9..0f1a36f 100644 --- a/.github/workflows/readme_example.yaml +++ b/.github/workflows/readme_example.yaml @@ -64,7 +64,8 @@ jobs: - name: "Identify .venv path" shell: "bash" - run: "echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> $GITHUB_ENV" + run: | + echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> "$GITHUB_ENV" - name: "Create a virtual environment" if: "steps.restore-cache.outputs.cache-hit == false" @@ -107,7 +108,8 @@ jobs: - name: "Identify .venv path" shell: "bash" - run: "echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> $GITHUB_ENV" + run: | + echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> "$GITHUB_ENV" - name: "Create a virtual environment" if: "steps.restore-cache.outputs.cache-hit == false" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index dc23d59..8316923 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -70,3 +70,8 @@ repos: hooks: - id: "check-github-workflows" - id: "check-dependabot" + + - repo: "https://github.com/rhysd/actionlint" + rev: "v1.7.1" + hooks: + - id: "actionlint" diff --git a/README.rst b/README.rst index f3fc759..ce75e5d 100644 --- a/README.rst +++ b/README.rst @@ -70,7 +70,8 @@ and tox test environments stored in ``.tox/``. - name: "Identify .venv path" shell: "bash" - run: "echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> $GITHUB_ENV" + run: | + echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> "$GITHUB_ENV" - name: "Create a virtual environment" if: "steps.restore-cache.outputs.cache-hit == false" From 9f236d11bd6701ff4b272c085606e18f899c4c38 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Tue, 20 Aug 2024 13:14:41 -0500 Subject: [PATCH 29/48] Run `tox run -m update` --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8316923..260cf01 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -38,7 +38,7 @@ repos: hooks: - id: "flake8" additional_dependencies: - - "flake8-bugbear==24.4.26" + - "flake8-bugbear==24.8.19" - repo: "https://github.com/editorconfig-checker/editorconfig-checker.python" rev: "2.7.3" From 233c57ae54f24fe19aa6fc05cb9d3006d08167dc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 23:10:59 +0000 Subject: [PATCH 30/48] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/editorconfig-checker/editorconfig-checker.python: 2.7.3 → 3.0.3](https://github.com/editorconfig-checker/editorconfig-checker.python/compare/2.7.3...3.0.3) - [github.com/python-jsonschema/check-jsonschema: 0.29.1 → 0.29.2](https://github.com/python-jsonschema/check-jsonschema/compare/0.29.1...0.29.2) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 260cf01..babb127 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -41,7 +41,7 @@ repos: - "flake8-bugbear==24.8.19" - repo: "https://github.com/editorconfig-checker/editorconfig-checker.python" - rev: "2.7.3" + rev: "3.0.3" hooks: - id: "editorconfig-checker" # The README contains YAML samples indented with 2 spaces. @@ -66,7 +66,7 @@ repos: pass_filenames: false - repo: "https://github.com/python-jsonschema/check-jsonschema" - rev: "0.29.1" + rev: "0.29.2" hooks: - id: "check-github-workflows" - id: "check-dependabot" From cb606b8bc825b60566204fd71764b678cd6f8ec0 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Fri, 6 Sep 2024 12:01:24 -0500 Subject: [PATCH 31/48] Remove the now-unnecessary tox v3 `isolated_build` option --- tox.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/tox.ini b/tox.ini index 6ad9544..b9d634f 100644 --- a/tox.ini +++ b/tox.ini @@ -7,7 +7,6 @@ envlist = coverage_report skip_missing_interpreters = True -isolated_build = True labels = update=update From 61798db7f1b7e7f1513480d6ce77426afd555b2c Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Thu, 26 Sep 2024 15:33:38 -0500 Subject: [PATCH 32/48] Remove the redundant tox `skip_missing_interpreters` setting --- tox.ini | 3 --- 1 file changed, 3 deletions(-) diff --git a/tox.ini b/tox.ini index b9d634f..642237a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,12 +1,9 @@ [tox] min_version = 4.3.5 - envlist = coverage_erase py{3.13, 3.12, 3.11, 3.10, 3.9, 3.8, py3.10, py3.9, py3.8} coverage_report - -skip_missing_interpreters = True labels = update=update From a7ea02855ee844c74bf9df2205531eceb8431454 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 22:56:30 +0000 Subject: [PATCH 33/48] Bump the github-actions group with 2 updates Bumps the github-actions group with 2 updates: [kurtmckee/github-workflows](https://github.com/kurtmckee/github-workflows) and [actions/checkout](https://github.com/actions/checkout). Updates `kurtmckee/github-workflows` from 0.2 to 0.4 - [Release notes](https://github.com/kurtmckee/github-workflows/releases) - [Changelog](https://github.com/kurtmckee/github-workflows/blob/main/CHANGELOG.rst) - [Commits](https://github.com/kurtmckee/github-workflows/compare/73024397dba10c866931a1d26cc2a0e7d223472f...420931a88d3f09ca8dbce4778d145ed610c231e0) Updates `actions/checkout` from 4.1.7 to 4.2.0 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/692973e3d937129bcbf40652eb9f2f61becf3332...d632683dd7b4114ad314bca15554477dd762a938) --- updated-dependencies: - dependency-name: kurtmckee/github-workflows dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 975ac07..5315648 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -44,7 +44,7 @@ jobs: - "3.10" fail-fast: false - uses: "kurtmckee/github-workflows/.github/workflows/tox.yaml@73024397dba10c866931a1d26cc2a0e7d223472f" # v0.2 + uses: "kurtmckee/github-workflows/.github/workflows/tox.yaml@420931a88d3f09ca8dbce4778d145ed610c231e0" # v0.4 with: config: "${{ toJSON(matrix) }}" @@ -66,7 +66,7 @@ jobs: runs-on: "${{ matrix.os.runner }}" steps: - name: "Checkout the repository" - uses: "actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332" # v4.1.7 + uses: "actions/checkout@d632683dd7b4114ad314bca15554477dd762a938" # v4.2.0 - name: "Test: Disable output file" uses: "./" From 55cb84fa84931be48d753efd1dfb59077d037219 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 22:27:15 +0000 Subject: [PATCH 34/48] Bump actions/checkout from 4.2.0 to 4.2.2 in the github-actions group Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.2.0 to 4.2.2 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/d632683dd7b4114ad314bca15554477dd762a938...11bd71901bbe5b1630ceea73d27597364c9af683) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 5315648..7f14000 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -66,7 +66,7 @@ jobs: runs-on: "${{ matrix.os.runner }}" steps: - name: "Checkout the repository" - uses: "actions/checkout@d632683dd7b4114ad314bca15554477dd762a938" # v4.2.0 + uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4.2.2 - name: "Test: Disable output file" uses: "./" From 79b1d8a220298012d0590dcd165089d673b81d10 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Fri, 1 Nov 2024 18:13:42 -0500 Subject: [PATCH 35/48] Update tools and configurations --- .github/workflows/test.yaml | 32 ++++++------ .pre-commit-config.yaml | 18 +++++-- .../20240205_134734_kurtmckee_updates.rst | 2 +- pyproject.toml | 52 ++++++++++++------- tox.ini | 9 ++-- 5 files changed, 66 insertions(+), 47 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7f14000..1377afd 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,4 +1,4 @@ -name: "🔬 Test" +name: "🧪 Test" on: pull_request: null @@ -17,6 +17,7 @@ jobs: }})" strategy: + fail-fast: false matrix: runner: - "ubuntu-latest" @@ -24,25 +25,22 @@ jobs: - "windows-latest" # Each operating system should test all Python interpreters simultaneously. - # This nested-list syntax accomplishes that goal - # without creating cross-products of every possible OS and interpreter. # # Note: The CPython interpreter versions should be in ascending order # because the last-listed version will be the default CPython version. # - cpythons: - - - "3.8" - - "3.9" - - "3.10" - - "3.11" - - "3.12" - cpython-beta: - - "3.13" - pypys: - - - "3.8" - - "3.9" - - "3.10" - fail-fast: false + include: + - cpythons: + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" + - "3.13" + pypys: + - "3.8" + - "3.9" + - "3.10" uses: "kurtmckee/github-workflows/.github/workflows/tox.yaml@420931a88d3f09ca8dbce4778d145ed610c231e0" # v0.4 with: @@ -53,6 +51,7 @@ jobs: name: "Inputs (${{ matrix.os.name }})" strategy: + fail-fast: false matrix: os: - name: "Linux" @@ -61,7 +60,6 @@ jobs: runner: "macos-latest" - name: "Windows" runner: "windows-latest" - fail-fast: false runs-on: "${{ matrix.os.runner }}" steps: diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index babb127..136ead4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,9 @@ ci: autoupdate_schedule: "monthly" +default_language_version: + python: "python3.13" + repos: - repo: "meta" hooks: @@ -8,7 +11,7 @@ repos: - id: "check-useless-excludes" - repo: "https://github.com/pre-commit/pre-commit-hooks" - rev: "v4.6.0" + rev: "v5.0.0" hooks: - id: "check-yaml" - id: "check-added-large-files" @@ -23,8 +26,13 @@ repos: hooks: - id: "update-headers" + - repo: "https://github.com/sirosen/slyp" + rev: 0.8.1 + hooks: + - id: "slyp" + - repo: "https://github.com/psf/black-pre-commit-mirror" - rev: "24.8.0" + rev: "24.10.0" hooks: - id: "black" @@ -38,7 +46,7 @@ repos: hooks: - id: "flake8" additional_dependencies: - - "flake8-bugbear==24.8.19" + - "flake8-bugbear==24.10.31" - repo: "https://github.com/editorconfig-checker/editorconfig-checker.python" rev: "3.0.3" @@ -66,12 +74,12 @@ repos: pass_filenames: false - repo: "https://github.com/python-jsonschema/check-jsonschema" - rev: "0.29.2" + rev: "0.29.4" hooks: - id: "check-github-workflows" - id: "check-dependabot" - repo: "https://github.com/rhysd/actionlint" - rev: "v1.7.1" + rev: "v1.7.3" hooks: - id: "actionlint" diff --git a/changelog.d/20240205_134734_kurtmckee_updates.rst b/changelog.d/20240205_134734_kurtmckee_updates.rst index 4c2b9e5..4a63f17 100644 --- a/changelog.d/20240205_134734_kurtmckee_updates.rst +++ b/changelog.d/20240205_134734_kurtmckee_updates.rst @@ -1,4 +1,4 @@ Python support -------------- -* Test against early Python 3.13 versions in CI. +* Test against Python 3.13 versions in CI. diff --git a/pyproject.toml b/pyproject.toml index 94ef258..fe6f875 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,11 @@ +[build-system] +requires = ["poetry-core"] +build-backend = "poetry.core.masonry.api" + + +# poetry +# ------ + [tool.poetry] name = "detect_pythons" version = "1.1.0" @@ -6,15 +14,27 @@ authors = ["Kurt McKee "] license = "MIT" readme = "README.rst" - [tool.poetry.dependencies] python = ">=3.8" -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" +# chipshot +# -------- + +[tool.chipshot] +template = """ +This file is a part of the detect-pythons project. +https://github.com/kurtmckee/detect-pythons +Copyright 2023-{{ year }} Kurt McKee +SPDX-License-Identifier: MIT +""" +exclusions = [ + "changelog.d/", +] + +# coverage +# -------- [tool.coverage.run] parallel = true @@ -24,28 +44,31 @@ source = [ "tests", ] - [tool.coverage.paths] source = [ "src", "*/site-packages", ] - [tool.coverage.report] skip_covered = true fail_under = 100 - [tool.coverage.html] skip_covered = false directory = "htmlcov/" +# isort +# ----- + [tool.isort] profile = "black" +# pytest +# ------ + [tool.pytest.ini_options] addopts = "--color=yes" filterwarnings = [ @@ -53,6 +76,9 @@ filterwarnings = [ ] +# scriv +# ----- + [tool.scriv] version = "literal: pyproject.toml: tool.poetry.version" categories = [ @@ -70,15 +96,3 @@ fragment_directory = "changelog.d" insert_marker = "scriv-insert-here" main_branches = ["main", "releases"] new_fragment_template = "file: fragment-template.rst.txt" - - -[tool.chipshot] -template = """ -This file is a part of the detect-pythons project. -https://github.com/kurtmckee/detect-pythons -Copyright 2023-{{ year }} Kurt McKee -SPDX-License-Identifier: MIT -""" -exclusions = [ - "changelog.d/", -] diff --git a/tox.ini b/tox.ini index 642237a..66e8da8 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,8 @@ min_version = 4.3.5 envlist = coverage_erase - py{3.13, 3.12, 3.11, 3.10, 3.9, 3.8, py3.10, py3.9, py3.8} + py{3.13, 3.12, 3.11, 3.10, 3.9, 3.8} + pypy{3.10, 3.9, 3.8} coverage_report labels = update=update @@ -13,7 +14,7 @@ package = wheel wheel_build_env = build_wheel depends = - py{3.13, 3.12, 3.11, 3.10, 3.9, 3.8, py3.10, py3.9, py3.8}: coverage_erase + py{3.13, 3.12, 3.11, 3.10, 3.9, 3.8}, pypy{3.10, 3.9, 3.8}: coverage_erase deps = coverage[toml] pytest @@ -23,7 +24,6 @@ commands = [testenv:coverage_erase] -skipsdist = true skip_install = true deps = coverage[toml] commands = coverage erase @@ -31,8 +31,7 @@ commands = coverage erase [testenv:coverage_report] depends = - py{3.13, 3.12, 3.11, 3.10, 3.9, 3.8, py3.10, py3.9, py3.8} -skipsdist = true + py{3.13, 3.12, 3.11, 3.10, 3.9, 3.8}, pypy{3.10, 3.9, 3.8} skip_install = true deps = coverage[toml] commands_pre = From 64a30f8b62bd03fd178ac1cf623820c6afdc96b4 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Fri, 1 Nov 2024 18:25:42 -0500 Subject: [PATCH 36/48] Update the README --- README.rst | 26 ++++++-------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/README.rst b/README.rst index ce75e5d..1688f82 100644 --- a/README.rst +++ b/README.rst @@ -154,8 +154,8 @@ System CPython interpreters --------------------------- GitHub's Linux and macOS runners have system CPython interpreters installed. -These are available at paths like ``/usr/bin/python``, -which contains no useful information. +These are available at paths which contain no useful information, +like ``/usr/bin/python``. For these interpreters, the interpreter is executed and the value of ``sysconfig.get_config_var("EXT_SUFFIX")`` is extracted. @@ -167,25 +167,11 @@ This results in a value like the following: "Linux", "``.cpython-310-x86_64-linux-gnu.so``" "macOS", "``.cpython-311-darwin.so``" - -macOS runner variability ------------------------- - -At the time of writing, GitHub's macOS runners sometimes have CPython 2.7 pre-installed. -CPython 2.7 doesn't have an ``EXT_SUFFIX`` config value, -so ``detect-pythons`` constructs one. +Extremely old Python versions might not have an ``EXT_SUFFIX`` value. +For example, CPython 2.7 doesn't have this value. +If this is detected then an equivalent value is constructed. .. csv-table:: :header: "Platform", "Constructed ``EXT_SUFFIX`` equivalent" - "macOS 12.6", "``.cpython-27-darwin-x86_64``" - -Note that CPython 2.7 is only installed *sometimes*; sometimes it isn't. -This is because ``macos-latest`` is sometimes macOS 12.6, and sometimes it's macOS 12.7. -See actions/runner-images#8642 for more information. - -When using ``detect-pythons`` to help with cache-busting, -this variability means that you may see two caches appear in regular use -for your macOS-based workflows; -one that is valid when CPython 2.7 is pre-installed, -and another that is valid when it *isn't* installed. + "macOS", "``.cpython-27-darwin-x86_64``" From 148c471cae3a86b99e6e176df326ce10e489caf4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 00:16:46 +0000 Subject: [PATCH 37/48] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/rhysd/actionlint: v1.7.3 → v1.7.4](https://github.com/rhysd/actionlint/compare/v1.7.3...v1.7.4) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 136ead4..6446639 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -80,6 +80,6 @@ repos: - id: "check-dependabot" - repo: "https://github.com/rhysd/actionlint" - rev: "v1.7.3" + rev: "v1.7.4" hooks: - id: "actionlint" From 9ad948ed7ec1737ffde31853dc042b2f2ea482e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 15:43:21 +0000 Subject: [PATCH 38/48] Bump kurtmckee/github-workflows in the github-actions group Bumps the github-actions group with 1 update: [kurtmckee/github-workflows](https://github.com/kurtmckee/github-workflows). Updates `kurtmckee/github-workflows` from 0.4 to 1.0 - [Release notes](https://github.com/kurtmckee/github-workflows/releases) - [Changelog](https://github.com/kurtmckee/github-workflows/blob/main/CHANGELOG.rst) - [Commits](https://github.com/kurtmckee/github-workflows/compare/420931a88d3f09ca8dbce4778d145ed610c231e0...2f156c58bf4ceebc623014b407f5711899e41235) --- updated-dependencies: - dependency-name: kurtmckee/github-workflows dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1377afd..c0dbd99 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -42,7 +42,7 @@ jobs: - "3.9" - "3.10" - uses: "kurtmckee/github-workflows/.github/workflows/tox.yaml@420931a88d3f09ca8dbce4778d145ed610c231e0" # v0.4 + uses: "kurtmckee/github-workflows/.github/workflows/tox.yaml@2f156c58bf4ceebc623014b407f5711899e41235" # v1.0 with: config: "${{ toJSON(matrix) }}" From 13d197aba2fb2ceb210dcc76d60418d8b5d65f4b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 00:27:45 +0000 Subject: [PATCH 39/48] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/python-jsonschema/check-jsonschema: 0.29.4 → 0.30.0](https://github.com/python-jsonschema/check-jsonschema/compare/0.29.4...0.30.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6446639..9ea5eda 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -74,7 +74,7 @@ repos: pass_filenames: false - repo: "https://github.com/python-jsonschema/check-jsonschema" - rev: "0.29.4" + rev: "0.30.0" hooks: - id: "check-github-workflows" - id: "check-dependabot" From 1842ef44c07e8d3e1358dee32824253727064040 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 01:27:43 +0000 Subject: [PATCH 40/48] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/rhysd/actionlint: v1.7.4 → v1.7.6](https://github.com/rhysd/actionlint/compare/v1.7.4...v1.7.6) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9ea5eda..a84e4bd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -80,6 +80,6 @@ repos: - id: "check-dependabot" - repo: "https://github.com/rhysd/actionlint" - rev: "v1.7.4" + rev: "v1.7.6" hooks: - id: "actionlint" From 7d9dfa051bfb8853e0c22e00ae556b6bf6483850 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 01:28:17 +0000 Subject: [PATCH 41/48] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- CHANGELOG.rst | 2 +- README.rst | 2 +- src/detect_pythons/detector.ps1 | 2 +- src/detect_pythons/detector.sh | 2 +- src/detect_pythons/identify.py | 2 +- src/detect_pythons/sync_readme_example.py | 2 +- tests/test_identify.py | 2 +- tests/test_sync_readme_example.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 04e389f..1238b67 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,7 +1,7 @@ .. This file is a part of the detect-pythons project. https://github.com/kurtmckee/detect-pythons - Copyright 2023-2024 Kurt McKee + Copyright 2023-2025 Kurt McKee SPDX-License-Identifier: MIT .. diff --git a/README.rst b/README.rst index 1688f82..aaa53c0 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ .. This file is a part of the detect-pythons project. https://github.com/kurtmckee/detect-pythons - Copyright 2023-2024 Kurt McKee + Copyright 2023-2025 Kurt McKee SPDX-License-Identifier: MIT Detect Python interpreters diff --git a/src/detect_pythons/detector.ps1 b/src/detect_pythons/detector.ps1 index 49b36f1..7f4f0e7 100644 --- a/src/detect_pythons/detector.ps1 +++ b/src/detect_pythons/detector.ps1 @@ -1,6 +1,6 @@ # This file is a part of the detect-pythons project. # https://github.com/kurtmckee/detect-pythons -# Copyright 2023-2024 Kurt McKee +# Copyright 2023-2025 Kurt McKee # SPDX-License-Identifier: MIT # Search paths in $PATH for Python interpreters. diff --git a/src/detect_pythons/detector.sh b/src/detect_pythons/detector.sh index a9d6544..9a0f426 100644 --- a/src/detect_pythons/detector.sh +++ b/src/detect_pythons/detector.sh @@ -1,6 +1,6 @@ # This file is a part of the detect-pythons project. # https://github.com/kurtmckee/detect-pythons -# Copyright 2023-2024 Kurt McKee +# Copyright 2023-2025 Kurt McKee # SPDX-License-Identifier: MIT IDENTIFY_PY="${GITHUB_ACTION_PATH}/src/detect_pythons/identify.py" diff --git a/src/detect_pythons/identify.py b/src/detect_pythons/identify.py index 3235e31..57497c2 100644 --- a/src/detect_pythons/identify.py +++ b/src/detect_pythons/identify.py @@ -1,6 +1,6 @@ # This file is a part of the detect-pythons project. # https://github.com/kurtmckee/detect-pythons -# Copyright 2023-2024 Kurt McKee +# Copyright 2023-2025 Kurt McKee # SPDX-License-Identifier: MIT from __future__ import print_function diff --git a/src/detect_pythons/sync_readme_example.py b/src/detect_pythons/sync_readme_example.py index 3447207..cb52d3a 100644 --- a/src/detect_pythons/sync_readme_example.py +++ b/src/detect_pythons/sync_readme_example.py @@ -1,6 +1,6 @@ # This file is a part of the detect-pythons project. # https://github.com/kurtmckee/detect-pythons -# Copyright 2023-2024 Kurt McKee +# Copyright 2023-2025 Kurt McKee # SPDX-License-Identifier: MIT import pathlib diff --git a/tests/test_identify.py b/tests/test_identify.py index 9f6b807..6a33abb 100644 --- a/tests/test_identify.py +++ b/tests/test_identify.py @@ -1,6 +1,6 @@ # This file is a part of the detect-pythons project. # https://github.com/kurtmckee/detect-pythons -# Copyright 2023-2024 Kurt McKee +# Copyright 2023-2025 Kurt McKee # SPDX-License-Identifier: MIT import platform diff --git a/tests/test_sync_readme_example.py b/tests/test_sync_readme_example.py index 6fb9cc6..9e888fc 100644 --- a/tests/test_sync_readme_example.py +++ b/tests/test_sync_readme_example.py @@ -1,6 +1,6 @@ # This file is a part of the detect-pythons project. # https://github.com/kurtmckee/detect-pythons -# Copyright 2023-2024 Kurt McKee +# Copyright 2023-2025 Kurt McKee # SPDX-License-Identifier: MIT import unittest.mock From e4d1fb90d272f442cb432ed70d2b233b0ec2081a Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Mon, 27 Jan 2025 17:18:18 -0600 Subject: [PATCH 42/48] Update pre-commit hooks; switch to plain editorconfig-checker --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a84e4bd..e6cb880 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,7 +37,7 @@ repos: - id: "black" - repo: "https://github.com/pycqa/isort" - rev: "5.13.2" + rev: "6.0.0" hooks: - id: "isort" @@ -46,10 +46,10 @@ repos: hooks: - id: "flake8" additional_dependencies: - - "flake8-bugbear==24.10.31" + - "flake8-bugbear==24.12.12" - - repo: "https://github.com/editorconfig-checker/editorconfig-checker.python" - rev: "3.0.3" + - repo: "https://github.com/editorconfig-checker/editorconfig-checker" + rev: "v3.2.0" hooks: - id: "editorconfig-checker" # The README contains YAML samples indented with 2 spaces. @@ -74,12 +74,12 @@ repos: pass_filenames: false - repo: "https://github.com/python-jsonschema/check-jsonschema" - rev: "0.30.0" + rev: "0.31.0" hooks: - id: "check-github-workflows" - id: "check-dependabot" - repo: "https://github.com/rhysd/actionlint" - rev: "v1.7.6" + rev: "v1.7.7" hooks: - id: "actionlint" From c7d2df1ade1b9f5b5939135593abddf3b01becf1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Feb 2025 22:24:30 +0000 Subject: [PATCH 43/48] Bump kurtmckee/github-workflows in the github-actions group Bumps the github-actions group with 1 update: [kurtmckee/github-workflows](https://github.com/kurtmckee/github-workflows). Updates `kurtmckee/github-workflows` from 1.0 to 1.4 - [Release notes](https://github.com/kurtmckee/github-workflows/releases) - [Changelog](https://github.com/kurtmckee/github-workflows/blob/main/CHANGELOG.rst) - [Commits](https://github.com/kurtmckee/github-workflows/compare/2f156c58bf4ceebc623014b407f5711899e41235...ca26472ada33aa277527450aa46436f530e3d2c1) --- updated-dependencies: - dependency-name: kurtmckee/github-workflows dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c0dbd99..4612d5f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -42,7 +42,7 @@ jobs: - "3.9" - "3.10" - uses: "kurtmckee/github-workflows/.github/workflows/tox.yaml@2f156c58bf4ceebc623014b407f5711899e41235" # v1.0 + uses: "kurtmckee/github-workflows/.github/workflows/tox.yaml@ca26472ada33aa277527450aa46436f530e3d2c1" # v1.4 with: config: "${{ toJSON(matrix) }}" From e1e44d06935d3b46adad7fa823d17acf7fdb3917 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 01:02:08 +0000 Subject: [PATCH 44/48] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black-pre-commit-mirror: 24.10.0 → 25.1.0](https://github.com/psf/black-pre-commit-mirror/compare/24.10.0...25.1.0) - [github.com/python-jsonschema/check-jsonschema: 0.31.0 → 0.31.1](https://github.com/python-jsonschema/check-jsonschema/compare/0.31.0...0.31.1) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e6cb880..a082813 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,7 +32,7 @@ repos: - id: "slyp" - repo: "https://github.com/psf/black-pre-commit-mirror" - rev: "24.10.0" + rev: "25.1.0" hooks: - id: "black" @@ -74,7 +74,7 @@ repos: pass_filenames: false - repo: "https://github.com/python-jsonschema/check-jsonschema" - rev: "0.31.0" + rev: "0.31.1" hooks: - id: "check-github-workflows" - id: "check-dependabot" From c62b7e698e9271211fc778dac4febfdb392423ed Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 21:28:24 +0000 Subject: [PATCH 45/48] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/sirosen/slyp: 0.8.1 → 0.8.2](https://github.com/sirosen/slyp/compare/0.8.1...0.8.2) - [github.com/pycqa/isort: 6.0.0 → 6.0.1](https://github.com/pycqa/isort/compare/6.0.0...6.0.1) - [github.com/pycqa/flake8: 7.1.1 → 7.1.2](https://github.com/pycqa/flake8/compare/7.1.1...7.1.2) - [github.com/python-jsonschema/check-jsonschema: 0.31.1 → 0.31.2](https://github.com/python-jsonschema/check-jsonschema/compare/0.31.1...0.31.2) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a082813..3b1146d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,7 +27,7 @@ repos: - id: "update-headers" - repo: "https://github.com/sirosen/slyp" - rev: 0.8.1 + rev: 0.8.2 hooks: - id: "slyp" @@ -37,12 +37,12 @@ repos: - id: "black" - repo: "https://github.com/pycqa/isort" - rev: "6.0.0" + rev: "6.0.1" hooks: - id: "isort" - repo: "https://github.com/pycqa/flake8" - rev: "7.1.1" + rev: "7.1.2" hooks: - id: "flake8" additional_dependencies: @@ -74,7 +74,7 @@ repos: pass_filenames: false - repo: "https://github.com/python-jsonschema/check-jsonschema" - rev: "0.31.1" + rev: "0.31.2" hooks: - id: "check-github-workflows" - id: "check-dependabot" From 4ad34c820f4a2d92927c185d95092e69dd6af7d6 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Thu, 6 Mar 2025 06:11:57 -0600 Subject: [PATCH 46/48] Support CPython 3.13 and PyPy 3.11; test against CPython 3.14 --- .github/workflows/readme_example.yaml | 6 +++--- .github/workflows/test.yaml | 2 ++ LICENSE.txt | 2 +- README.rst | 4 ++-- action.yml | 2 +- changelog.d/20250306_060146_kurtmckee_updates.rst | 6 ++++++ tox.ini | 10 +++++----- 7 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 changelog.d/20250306_060146_kurtmckee_updates.rst diff --git a/.github/workflows/readme_example.yaml b/.github/workflows/readme_example.yaml index 0f1a36f..911694e 100644 --- a/.github/workflows/readme_example.yaml +++ b/.github/workflows/readme_example.yaml @@ -1,6 +1,6 @@ # This file is a part of the detect-pythons project. # https://github.com/kurtmckee/detect-pythons -# Copyright 2023-2024 Kurt McKee +# Copyright 2023-2025 Kurt McKee # SPDX-License-Identifier: MIT # This workflow exists for several purposes: @@ -47,8 +47,8 @@ jobs: with: python-version: | graalpy-24 - pypy-3.10 - 3.12 + pypy-3.11 + 3.13 - uses: "kurtmckee/detect-pythons@v1" diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 4612d5f..8a59960 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -37,10 +37,12 @@ jobs: - "3.11" - "3.12" - "3.13" + cpython-beta: "3.14" pypys: - "3.8" - "3.9" - "3.10" + - "3.11" uses: "kurtmckee/github-workflows/.github/workflows/tox.yaml@ca26472ada33aa277527450aa46436f530e3d2c1" # v1.4 with: diff --git a/LICENSE.txt b/LICENSE.txt index 4425673..f681486 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ MIT License -Copyright 2023-2024 Kurt McKee +Copyright 2023-2025 Kurt McKee Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.rst b/README.rst index aaa53c0..6d2efe9 100644 --- a/README.rst +++ b/README.rst @@ -53,8 +53,8 @@ and tox test environments stored in ``.tox/``. with: python-version: | graalpy-24 - pypy-3.10 - 3.12 + pypy-3.11 + 3.13 - uses: "kurtmckee/detect-pythons@v1" diff --git a/action.yml b/action.yml index 2f9014b..d9c4fd5 100644 --- a/action.yml +++ b/action.yml @@ -1,6 +1,6 @@ # This file is a part of the detect-pythons project. # https://github.com/kurtmckee/detect-pythons -# Copyright 2023-2024 Kurt McKee +# Copyright 2023-2025 Kurt McKee # SPDX-License-Identifier: MIT author: "Kurt McKee" diff --git a/changelog.d/20250306_060146_kurtmckee_updates.rst b/changelog.d/20250306_060146_kurtmckee_updates.rst new file mode 100644 index 0000000..55375db --- /dev/null +++ b/changelog.d/20250306_060146_kurtmckee_updates.rst @@ -0,0 +1,6 @@ +Python support +-------------- + +* Support CPython 3.13. +* Support PyPy 3.11. +* Test against early versions of Python 3.14. diff --git a/tox.ini b/tox.ini index 66e8da8..e485d17 100644 --- a/tox.ini +++ b/tox.ini @@ -2,8 +2,8 @@ min_version = 4.3.5 envlist = coverage_erase - py{3.13, 3.12, 3.11, 3.10, 3.9, 3.8} - pypy{3.10, 3.9, 3.8} + py{3.14, 3.13, 3.12, 3.11, 3.10, 3.9, 3.8} + pypy{3.11, 3.10, 3.9, 3.8} coverage_report labels = update=update @@ -14,7 +14,7 @@ package = wheel wheel_build_env = build_wheel depends = - py{3.13, 3.12, 3.11, 3.10, 3.9, 3.8}, pypy{3.10, 3.9, 3.8}: coverage_erase + py{3.14, 3.13, 3.12, 3.11, 3.10, 3.9, 3.8}, pypy{3.11, 3.10, 3.9, 3.8}: coverage_erase deps = coverage[toml] pytest @@ -31,7 +31,7 @@ commands = coverage erase [testenv:coverage_report] depends = - py{3.13, 3.12, 3.11, 3.10, 3.9, 3.8}, pypy{3.10, 3.9, 3.8} + py{3.14, 3.13, 3.12, 3.11, 3.10, 3.9, 3.8}, pypy{3.11, 3.10, 3.9, 3.8} skip_install = true deps = coverage[toml] commands_pre = @@ -42,7 +42,7 @@ commands = coverage report [testenv:update] description = Update tool versions -base_python = py3.12 +base_python = py3.13 recreate = true skip_install = true deps = From 584d7c85a1bc994542006b32665f8c29592357ce Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Thu, 6 Mar 2025 06:34:47 -0600 Subject: [PATCH 47/48] Migrate to PEP 621 metadata ...but disable uploading to PyPI. --- pyproject.toml | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fe6f875..0673792 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,21 +1,16 @@ -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" - - -# poetry -# ------ - -[tool.poetry] +[project] name = "detect_pythons" version = "1.1.0" description = "A GitHub action to detect installed Pythons. Suitable for cache-busting." -authors = ["Kurt McKee "] +authors = [{ name = "Kurt McKee", email = "contactme@kurtmckee.org" }] license = "MIT" readme = "README.rst" +requires-python = ">=3.8" +classifiers = ["Private :: Do not Upload"] -[tool.poetry.dependencies] -python = ">=3.8" +[build-system] +requires = ["poetry-core>=2.0.0,<3.0.0"] +build-backend = "poetry.core.masonry.api" # chipshot From e6a90e0ab88b93c9763d6d5b929f1dc83ec5a5f9 Mon Sep 17 00:00:00 2001 From: Kurt McKee Date: Thu, 6 Mar 2025 06:39:08 -0600 Subject: [PATCH 48/48] Update project metadata --- CHANGELOG.rst | 17 +++++++++++++++++ .../20240205_134734_kurtmckee_updates.rst | 4 ---- .../20250306_060146_kurtmckee_updates.rst | 6 ------ pyproject.toml | 4 ++-- 4 files changed, 19 insertions(+), 12 deletions(-) delete mode 100644 changelog.d/20240205_134734_kurtmckee_updates.rst delete mode 100644 changelog.d/20250306_060146_kurtmckee_updates.rst diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1238b67..008691d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -24,6 +24,23 @@ Please see the fragment files in the `changelog.d directory`_. .. scriv-insert-here +.. _changelog-1.1.1: + +1.1.1 - 2025-03-06 +================== + +Python support +-------------- + +* Support CPython 3.13 and PyPy 3.11. +* Test against early versions of Python 3.14. + +Development +----------- + +* Migrate to PEP 621 project metadata. +* Migrate to a reusable CI workflow. + .. _changelog-1.1.0: 1.1.0 - 2023-12-16 diff --git a/changelog.d/20240205_134734_kurtmckee_updates.rst b/changelog.d/20240205_134734_kurtmckee_updates.rst deleted file mode 100644 index 4a63f17..0000000 --- a/changelog.d/20240205_134734_kurtmckee_updates.rst +++ /dev/null @@ -1,4 +0,0 @@ -Python support --------------- - -* Test against Python 3.13 versions in CI. diff --git a/changelog.d/20250306_060146_kurtmckee_updates.rst b/changelog.d/20250306_060146_kurtmckee_updates.rst deleted file mode 100644 index 55375db..0000000 --- a/changelog.d/20250306_060146_kurtmckee_updates.rst +++ /dev/null @@ -1,6 +0,0 @@ -Python support --------------- - -* Support CPython 3.13. -* Support PyPy 3.11. -* Test against early versions of Python 3.14. diff --git a/pyproject.toml b/pyproject.toml index 0673792..17ccaf0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "detect_pythons" -version = "1.1.0" +version = "1.1.1" description = "A GitHub action to detect installed Pythons. Suitable for cache-busting." authors = [{ name = "Kurt McKee", email = "contactme@kurtmckee.org" }] license = "MIT" @@ -75,7 +75,7 @@ filterwarnings = [ # ----- [tool.scriv] -version = "literal: pyproject.toml: tool.poetry.version" +version = "literal: pyproject.toml: project.version" categories = [ "Python support", "Added",