Skip to content

Commit 11b16f7

Browse files
authoredOct 23, 2024··
refactor: default to Python 3.13 (#51)
use coatldev/python image for pypi-upload
1 parent 53c2cd2 commit 11b16f7

9 files changed

+20
-42
lines changed
 

‎.github/workflows/pip-compile-upgrade.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111
Python version to use for installing pip-tools.
1212
required: false
1313
type: string
14-
default: '3.12'
14+
default: '3.13'
1515
pr-create:
1616
description: >-
1717
Whether to create a Pull Request.

‎.github/workflows/pre-commit-autoupdate.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
uses: actions/setup-python@v5
5555
id: setup-python
5656
with:
57-
python-version: '3.12'
57+
python-version: '3.13'
5858

5959
- name: Checkout requirements repo
6060
uses: actions/checkout@v4

‎.github/workflows/pre-commit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: actions/setup-python@v5
1818
id: setup-python
1919
with:
20-
python-version: '3.12'
20+
python-version: '3.13'
2121

2222
- name: Checkout requirements repo
2323
uses: actions/checkout@v4

‎.github/workflows/pylint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
uses: actions/setup-python@v5
1313
id: setup-python
1414
with:
15-
python-version: '3.12'
15+
python-version: '3.13'
1616

1717
- name: Checkout requirements repo
1818
uses: actions/checkout@v4

‎.github/workflows/pypi-upload.yml

+2-14
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
description: Version of Python to use.
66
required: false
77
type: string
8-
default: '3.12'
8+
default: '3.13'
99
check:
1010
description: Check metadata with twine before uploading.
1111
required: false
@@ -33,23 +33,11 @@ jobs:
3333
upload:
3434
runs-on: ubuntu-latest
3535
container:
36-
image: python:${{ inputs.python-version }}-slim
37-
env:
38-
PIP_DISABLE_PIP_VERSION_CHECK: '1'
39-
PIP_NO_CACHE_DIR: '1'
40-
PIP_NO_PYTHON_VERSION_WARNING: '1'
41-
PIP_ROOT_USER_ACTION: 'ignore'
36+
image: coatldev/python:${{ inputs.python-version }}-slim
4237
steps:
4338
- name: Checkout repo
4439
uses: actions/checkout@v4
4540

46-
- name: Upgrade packages
47-
run: |
48-
python -m pip install --upgrade \
49-
pip \
50-
setuptools \
51-
wheel
52-
5341
- name: Install dependencies
5442
run: |
5543
python -m pip install \

‎.github/workflows/tox-envs.yml

-7
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ jobs:
3131
path: ${{ steps.setup-python.outputs.python-path }}
3232
key: py-${{ steps.setup-python.outputs.python-version }}-${{ runner.os }}
3333

34-
- name: Upgrade pre-installed dependencies
35-
run: |
36-
python -m pip install --upgrade \
37-
pip \
38-
setuptools \
39-
wheel
40-
4134
- name: Install dependencies
4235
run: |
4336
python -m pip install --upgrade tox

‎.github/workflows/tox-gh.yml

-7
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,6 @@ jobs:
3131
path: ${{ steps.setup-python.outputs.python-path }}
3232
key: py-${{ steps.setup-python.outputs.python-version }}-${{ runner.os }}
3333

34-
- name: Upgrade pre-installed dependencies
35-
run: |
36-
python -m pip install --upgrade \
37-
pip \
38-
setuptools \
39-
wheel
40-
4134
- name: Install dependencies
4235
run: |
4336
python -m pip install --upgrade tox-gh

‎.github/workflows/tox.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
uses: actions/setup-python@v5
1313
id: setup-python
1414
with:
15-
python-version: '3.12'
15+
python-version: '3.13'
1616

1717
- name: Checkout requirements repo
1818
uses: actions/checkout@v4

‎README.md

+13-9
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ requirements.
8383

8484
- `path` (`string`): A file or location of the requirement file(s).
8585
- `python-version` (`string`): Python version to use for installing `pip-tools`.
86-
You may use MAJOR.MINOR or exact version. Defaults to `'3.12'`. Optional.
86+
You may use MAJOR.MINOR or exact version. Defaults to `'3.13'`. Optional.
8787
- `pr-create` (`string`): Whether to create a Pull Request. Options: `'yes'`,
8888
`'no'`. Defaults to `'yes'`. Optional.
8989
- `pr-commit-message` (`string`): Use the given message as the commit message.
@@ -214,11 +214,15 @@ jobs:
214214
This workflow allows you to build and upload your Python distribution packages
215215
PyPI (or any other repository) using `build` and `twine`.
216216

217+
> [!NOTE]
218+
> This workflow uses the [`coatldev/python`] Docker image, which has tags for
219+
> Python 3.13, 3.12 and 2.7.
220+
217221
**Inputs**:
218222

219223
- `python-version` (`string`): The Python version to use for building and
220224
publishing the package. You may use MAJOR.MINOR or exact version. Defaults to
221-
`'3.12'`. Optional
225+
`'3.13'`. Optional
222226
- `check` (`boolean`): Check metadata with twine before uploading. Defaults to
223227
`true`. Optional.
224228
- `url` (`string`): The repository (package index) URL to upload the package to.
@@ -238,7 +242,7 @@ jobs:
238242
main:
239243
uses: coatl-dev/workflows/.github/workflows/pypi-upload.yml@v4.1.3
240244
with:
241-
python-version: '3.11'
245+
python-version: '3.13'
242246
secrets:
243247
password: ${{ secrets.PYPI_API_TOKEN }}
244248
```
@@ -250,7 +254,7 @@ This workflow will install the latest version of `tox` to run all envs found in
250254

251255
> [!NOTE]
252256
> This workflow uses the [`coatldev/six`] Docker image, which comes with
253-
> Python 3.12 and 2.7.18.
257+
> Python 3.13, 3.12 and 2.7.18.
254258

255259
**Example**:
256260

@@ -298,7 +302,7 @@ jobs:
298302
main:
299303
uses: coatl-dev/workflows/.github/workflows/tox-envs.yml@v4.1.3
300304
with:
301-
python-versions: '["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]'
305+
python-versions: '["3.9", "3.10", "3.11", "3.12", "3.13"]'
302306
```
303307

304308
### .github/workflows/tox-gh.yml
@@ -321,12 +325,11 @@ tox.ini:
321325
```ini
322326
[gh]
323327
python =
324-
3.7 = py37
325-
3.8 = py38
326328
3.9 = py39
327-
3.10 = py310, install, typecheck
329+
3.10 = py310
328330
3.11 = py311
329331
3.12 = py312
332+
3.13 = py313, install, typecheck
330333
```
331334

332335
and on your workflow:
@@ -336,7 +339,7 @@ jobs:
336339
main:
337340
uses: coatl-dev/workflows/.github/workflows/tox-gh.yml@v4.1.3
338341
with:
339-
python-versions: '["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]'
342+
python-versions: '["3.9", "3.10", "3.11", "3.12", "3.13"]'
340343
```
341344

342345
### .github/workflows/tox.yml
@@ -353,6 +356,7 @@ jobs:
353356
```
354357

355358
[`actions/setup-python`]: https://github.com/actions/setup-python
359+
[`coatldev/python`]: https://hub.docker.com/r/coatldev/python
356360
[`coatldev/six`]: https://hub.docker.com/r/coatldev/six
357361
[`env_list`]: https://tox.wiki/en/latest/config.html#env_list
358362
[`local hooks`]: https://pre-commit.com/#repository-local-hooks

0 commit comments

Comments
 (0)
Please sign in to comment.