Skip to content

Commit 4a7b361

Browse files
authored
Merge pull request #55 from kurtmckee/release-1.1.1
Release 1.1.1
2 parents 38187a5 + e6a90e0 commit 4a7b361

17 files changed

+156
-153
lines changed
File renamed without changes.
File renamed without changes.

.github/workflows/readme_example.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is a part of the detect-pythons project.
22
# https://github.com/kurtmckee/detect-pythons
3-
# Copyright 2023 Kurt McKee <[email protected]>
3+
# Copyright 2023-2025 Kurt McKee <[email protected]>
44
# SPDX-License-Identifier: MIT
55

66
# This workflow exists for several purposes:
@@ -46,13 +46,13 @@ jobs:
4646
- uses: "actions/setup-python@v5"
4747
with:
4848
python-version: |
49-
graalpy-23.1
50-
pypy-3.10
51-
3.12
49+
graalpy-24
50+
pypy-3.11
51+
3.13
5252
5353
- uses: "kurtmckee/detect-pythons@v1"
5454

55-
- uses: "actions/cache@v3"
55+
- uses: "actions/cache@v4"
5656
id: "restore-cache"
5757
with:
5858
# You may need to augment the list of files to hash.
@@ -64,7 +64,8 @@ jobs:
6464
6565
- name: "Identify .venv path"
6666
shell: "bash"
67-
run: "echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> $GITHUB_ENV"
67+
run: |
68+
echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> "$GITHUB_ENV"
6869
6970
- name: "Create a virtual environment"
7071
if: "steps.restore-cache.outputs.cache-hit == false"
@@ -95,7 +96,7 @@ jobs:
9596
9697
- uses: "kurtmckee/detect-pythons@v1"
9798

98-
- uses: "actions/cache@v3"
99+
- uses: "actions/cache@v4"
99100
id: "restore-cache"
100101
with:
101102
# You may need to augment the list of files to hash.
@@ -107,7 +108,8 @@ jobs:
107108
108109
- name: "Identify .venv path"
109110
shell: "bash"
110-
run: "echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> $GITHUB_ENV"
111+
run: |
112+
echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> "$GITHUB_ENV"
111113
112114
- name: "Create a virtual environment"
113115
if: "steps.restore-cache.outputs.cache-hit == false"

.github/workflows/test.yaml

Lines changed: 39 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "🔬 Test"
1+
name: "🧪 Test"
22

33
on:
44
pull_request: null
@@ -8,70 +8,52 @@ on:
88
- "releases"
99

1010
jobs:
11-
tox:
12-
name: "Tox (${{ matrix.os.name }})"
11+
code:
12+
name:
13+
"Code (${{
14+
(startswith(matrix.runner, 'ubuntu') && 'Linux')
15+
|| (startswith(matrix.runner, 'macos') && 'macOS')
16+
|| (startswith(matrix.runner, 'windows') && 'Windows')
17+
}})"
1318

1419
strategy:
15-
matrix:
16-
os:
17-
- name: "Linux"
18-
runner: "ubuntu-latest"
19-
- name: "macOS"
20-
runner: "macos-latest"
21-
- name: "Windows"
22-
runner: "windows-latest"
2320
fail-fast: false
21+
matrix:
22+
runner:
23+
- "ubuntu-latest"
24+
- "macos-latest"
25+
- "windows-latest"
26+
27+
# Each operating system should test all Python interpreters simultaneously.
28+
#
29+
# Note: The CPython interpreter versions should be in ascending order
30+
# because the last-listed version will be the default CPython version.
31+
#
32+
include:
33+
- cpythons:
34+
- "3.8"
35+
- "3.9"
36+
- "3.10"
37+
- "3.11"
38+
- "3.12"
39+
- "3.13"
40+
cpython-beta: "3.14"
41+
pypys:
42+
- "3.8"
43+
- "3.9"
44+
- "3.10"
45+
- "3.11"
46+
47+
uses: "kurtmckee/github-workflows/.github/workflows/tox.yaml@ca26472ada33aa277527450aa46436f530e3d2c1" # v1.4
48+
with:
49+
config: "${{ toJSON(matrix) }}"
2450

25-
runs-on: "${{ matrix.os.runner }}"
26-
steps:
27-
- name: "Checkout the repository"
28-
uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
29-
30-
- name: "Setup Pythons"
31-
uses: "actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c" # v5.0.0
32-
with:
33-
python-version: |
34-
pypy3.8
35-
pypy3.9
36-
pypy3.10
37-
3.8
38-
3.9
39-
3.10
40-
3.11
41-
3.12
42-
allow-prereleases: true
43-
cache: "pip"
44-
45-
- name: "Detect Pythons"
46-
uses: "./"
47-
48-
- name: "Restore cache"
49-
id: "restore-cache"
50-
uses: "actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84" # v3.3.2
51-
with:
52-
path: |
53-
.tox/
54-
.venv
55-
key: "tox-os=${{ matrix.os.runner }}-hash=${{ hashFiles('.python-identifiers', 'tox.ini') }}"
56-
57-
- name: "Identify .venv path"
58-
shell: "bash"
59-
run: "echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> $GITHUB_ENV"
60-
61-
- name: "Create a virtual environment"
62-
if: "steps.restore-cache.outputs.cache-hit == false"
63-
run: |
64-
python -m venv .venv
65-
${{ env.venv-path }}/python -m pip install --upgrade pip setuptools wheel
66-
${{ env.venv-path }}/pip install tox
67-
68-
- name: "Run the test suite"
69-
run: "${{ env.venv-path }}/tox"
7051

7152
inputs:
7253
name: "Inputs (${{ matrix.os.name }})"
7354

7455
strategy:
56+
fail-fast: false
7557
matrix:
7658
os:
7759
- name: "Linux"
@@ -80,12 +62,11 @@ jobs:
8062
runner: "macos-latest"
8163
- name: "Windows"
8264
runner: "windows-latest"
83-
fail-fast: false
8465

8566
runs-on: "${{ matrix.os.runner }}"
8667
steps:
8768
- name: "Checkout the repository"
88-
uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11" # v4.1.1
69+
uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683" # v4.2.2
8970

9071
- name: "Test: Disable output file"
9172
uses: "./"

.pre-commit-config.yaml

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
ci:
22
autoupdate_schedule: "monthly"
33

4+
default_language_version:
5+
python: "python3.13"
6+
47
repos:
58
- repo: "meta"
69
hooks:
710
- id: "check-hooks-apply"
811
- id: "check-useless-excludes"
912

1013
- repo: "https://github.com/pre-commit/pre-commit-hooks"
11-
rev: "v4.5.0"
14+
rev: "v5.0.0"
1215
hooks:
1316
- id: "check-yaml"
1417
- id: "check-added-large-files"
@@ -23,34 +26,39 @@ repos:
2326
hooks:
2427
- id: "update-headers"
2528

29+
- repo: "https://github.com/sirosen/slyp"
30+
rev: 0.8.2
31+
hooks:
32+
- id: "slyp"
33+
2634
- repo: "https://github.com/psf/black-pre-commit-mirror"
27-
rev: "23.12.0"
35+
rev: "25.1.0"
2836
hooks:
2937
- id: "black"
3038

3139
- repo: "https://github.com/pycqa/isort"
32-
rev: "5.13.2"
40+
rev: "6.0.1"
3341
hooks:
3442
- id: "isort"
3543

3644
- repo: "https://github.com/pycqa/flake8"
37-
rev: "6.1.0"
45+
rev: "7.1.2"
3846
hooks:
3947
- id: "flake8"
4048
additional_dependencies:
41-
- "flake8-bugbear==23.12.2"
49+
- "flake8-bugbear==24.12.12"
4250

43-
- repo: "https://github.com/editorconfig-checker/editorconfig-checker.python"
44-
rev: "2.7.3"
51+
- repo: "https://github.com/editorconfig-checker/editorconfig-checker"
52+
rev: "v3.2.0"
4553
hooks:
4654
- id: "editorconfig-checker"
47-
# The README contain YAML samples indented with 2 spaces.
55+
# The README contains YAML samples indented with 2 spaces.
4856
# The .editorconfig file requires 4 spaces for indentation,
4957
# so this pre-commit hook will ignore the README.
5058
exclude: "README.rst"
5159

5260
- repo: "https://github.com/shellcheck-py/shellcheck-py"
53-
rev: "v0.9.0.6"
61+
rev: "v0.10.0.1"
5462
hooks:
5563
- id: "shellcheck"
5664
args:
@@ -66,7 +74,12 @@ repos:
6674
pass_filenames: false
6775

6876
- repo: "https://github.com/python-jsonschema/check-jsonschema"
69-
rev: "0.27.3"
77+
rev: "0.31.2"
7078
hooks:
7179
- id: "check-github-workflows"
7280
- id: "check-dependabot"
81+
82+
- repo: "https://github.com/rhysd/actionlint"
83+
rev: "v1.7.7"
84+
hooks:
85+
- id: "actionlint"

CHANGELOG.rst

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
..
22
This file is a part of the detect-pythons project.
33
https://github.com/kurtmckee/detect-pythons
4-
Copyright 2023 Kurt McKee <[email protected]>
4+
Copyright 2023-2025 Kurt McKee <[email protected]>
55
SPDX-License-Identifier: MIT
66
77
..
@@ -24,6 +24,23 @@ Please see the fragment files in the `changelog.d directory`_.
2424

2525
.. scriv-insert-here
2626
27+
.. _changelog-1.1.1:
28+
29+
1.1.1 - 2025-03-06
30+
==================
31+
32+
Python support
33+
--------------
34+
35+
* Support CPython 3.13 and PyPy 3.11.
36+
* Test against early versions of Python 3.14.
37+
38+
Development
39+
-----------
40+
41+
* Migrate to PEP 621 project metadata.
42+
* Migrate to a reusable CI workflow.
43+
2744
.. _changelog-1.1.0:
2845

2946
1.1.0 - 2023-12-16

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright 2023 Kurt McKee <[email protected]>
3+
Copyright 2023-2025 Kurt McKee <[email protected]>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.rst

Lines changed: 13 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
..
22
This file is a part of the detect-pythons project.
33
https://github.com/kurtmckee/detect-pythons
4-
Copyright 2023 Kurt McKee <[email protected]>
4+
Copyright 2023-2025 Kurt McKee <[email protected]>
55
SPDX-License-Identifier: MIT
66
77
Detect Python interpreters
@@ -52,13 +52,13 @@ and tox test environments stored in ``.tox/``.
5252
- uses: "actions/setup-python@v5"
5353
with:
5454
python-version: |
55-
graalpy-23.1
56-
pypy-3.10
57-
3.12
55+
graalpy-24
56+
pypy-3.11
57+
3.13
5858
5959
- uses: "kurtmckee/detect-pythons@v1"
6060
61-
- uses: "actions/cache@v3"
61+
- uses: "actions/cache@v4"
6262
id: "restore-cache"
6363
with:
6464
# You may need to augment the list of files to hash.
@@ -70,7 +70,8 @@ and tox test environments stored in ``.tox/``.
7070
7171
- name: "Identify .venv path"
7272
shell: "bash"
73-
run: "echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> $GITHUB_ENV"
73+
run: |
74+
echo 'venv-path=.venv/${{ runner.os == 'Windows' && 'Scripts' || 'bin' }}' >> "$GITHUB_ENV"
7475
7576
- name: "Create a virtual environment"
7677
if: "steps.restore-cache.outputs.cache-hit == false"
@@ -153,8 +154,8 @@ System CPython interpreters
153154
---------------------------
154155

155156
GitHub's Linux and macOS runners have system CPython interpreters installed.
156-
These are available at paths like ``/usr/bin/python``,
157-
which contains no useful information.
157+
These are available at paths which contain no useful information,
158+
like ``/usr/bin/python``.
158159

159160
For these interpreters, the interpreter is executed
160161
and the value of ``sysconfig.get_config_var("EXT_SUFFIX")`` is extracted.
@@ -166,31 +167,11 @@ This results in a value like the following:
166167
"Linux", "``.cpython-310-x86_64-linux-gnu.so``"
167168
"macOS", "``.cpython-311-darwin.so``"
168169

169-
170-
macOS runner variability
171-
------------------------
172-
173-
At the time of writing, GitHub's macOS runners sometimes have CPython 2.7 pre-installed.
174-
CPython 2.7 doesn't have an ``EXT_SUFFIX`` config value,
175-
so ``detect-pythons`` constructs one.
170+
Extremely old Python versions might not have an ``EXT_SUFFIX`` value.
171+
For example, CPython 2.7 doesn't have this value.
172+
If this is detected then an equivalent value is constructed.
176173

177174
.. csv-table::
178175
:header: "Platform", "Constructed ``EXT_SUFFIX`` equivalent"
179176

180-
"macOS 12.6", "``.cpython-27-darwin-x86_64``"
181-
182-
Note that CPython 2.7 is only installed *sometimes*; sometimes it isn't.
183-
This is because ``macos-latest`` is sometimes macOS 12.6, and sometimes it's macOS 12.7.
184-
See `actions/runner-images#8642`_ for more information.
185-
186-
When using ``detect-pythons`` to help with cache-busting,
187-
this variability means that you may see two caches appear in regular use
188-
for your macOS-based workflows;
189-
one that is valid when CPython 2.7 is pre-installed,
190-
and another that is valid when it *isn't* installed.
191-
192-
193-
.. Links
194-
.. -----
195-
..
196-
.. _actions/runner-images#8642: https://github.com/actions/runner-images/issues/8642
177+
"macOS", "``.cpython-27-darwin-x86_64``"

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is a part of the detect-pythons project.
22
# https://github.com/kurtmckee/detect-pythons
3-
# Copyright 2023 Kurt McKee <[email protected]>
3+
# Copyright 2023-2025 Kurt McKee <[email protected]>
44
# SPDX-License-Identifier: MIT
55

66
author: "Kurt McKee"

0 commit comments

Comments
 (0)