Skip to content

Commit 3286e37

Browse files
authored
Declare 3.13 support (#130)
1 parent 5735dad commit 3286e37

File tree

5 files changed

+77
-75
lines changed

5 files changed

+77
-75
lines changed

.github/workflows/check.yml

Lines changed: 30 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -14,78 +14,65 @@ concurrency:
1414

1515
jobs:
1616
test:
17-
name: test ${{ matrix.py }} - ${{ matrix.os }}
18-
runs-on: ${{ matrix.os }}
17+
name: test ${{ matrix.py }}
18+
runs-on: ubuntu-latest
1919
strategy:
2020
fail-fast: false
2121
matrix:
2222
py:
23+
- "3.13"
2324
- "3.12"
2425
- "3.11"
2526
- "3.10"
2627
- "3.9"
2728
- "3.8"
28-
os:
29-
- ubuntu-latest
30-
- windows-2022
31-
- macos-12
32-
3329
steps:
34-
- name: Setup python for tox
30+
- name: Install the latest version of uv
31+
uses: astral-sh/setup-uv@v2
32+
with:
33+
enable-cache: true
34+
github-token: ${{ secrets.GITHUB_TOKEN }}
35+
- name: setup python for tox
3536
uses: actions/setup-python@v5
3637
with:
3738
python-version: "3.12"
38-
- name: Install tox
39-
run: python -m pip install tox-uv
39+
- name: install tox
40+
run: uv pip install tox tox-uv --system
4041
- uses: actions/checkout@v4
41-
with:
42-
fetch-depth: 0
43-
- name: Setup python for test ${{ matrix.py }}
42+
- name: setup python for test ${{ matrix.py }}
4443
uses: actions/setup-python@v5
4544
with:
4645
python-version: ${{ matrix.py }}
47-
- name: Pick environment to run
48-
run: |
49-
import os; import platform; import sys; from pathlib import Path
50-
env = f'TOXENV=py{"" if platform.python_implementation() == "CPython" else "py"}3{sys.version_info.minor}'
51-
print(f"Picked: {env} for {sys.version} based of {sys.executable}")
52-
with Path(os.environ["GITHUB_ENV"]).open("ta") as file_handler:
53-
file_handler.write(env)
54-
shell: python
55-
- name: Setup test suite
56-
run: tox -vv --notest
57-
- name: Run test suite
58-
run: tox --skip-pkg-install
59-
env:
60-
PYTEST_ADDOPTS: "-vv --durations=20"
61-
CI_RUN: "yes"
46+
allow-prereleases: true
47+
- name: setup test suite
48+
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.py }}
49+
- name: run test suite
50+
run: tox run --skip-pkg-install -e ${{ matrix.py }}
6251

6352
check:
64-
name: tox env ${{ matrix.tox_env }} - ${{ matrix.os }}
65-
runs-on: ${{ matrix.os }}
53+
name: tox env ${{ matrix.tox_env }}
54+
runs-on: ubuntu-latest
6655
strategy:
6756
fail-fast: false
6857
matrix:
69-
os:
70-
- ubuntu-latest
71-
- windows-2022
7258
tox_env:
73-
- dev
7459
- type
60+
- dev
7561
- readme
76-
exclude:
77-
- { os: windows-2022, tox_env: readme }
7862
steps:
79-
- uses: actions/checkout@v4
63+
- name: Install the latest version of uv
64+
uses: astral-sh/setup-uv@v2
8065
with:
81-
fetch-depth: 0
82-
- name: Setup Python "3.11"
66+
enable-cache: true
67+
github-token: ${{ secrets.GITHUB_TOKEN }}
68+
- uses: actions/checkout@v4
69+
- name: setup Python 3.12
8370
uses: actions/setup-python@v5
8471
with:
85-
python-version: "3.11"
86-
- name: Install tox
87-
run: python -m pip install tox-uv
72+
python-version: "3.12"
73+
- name: install tox
74+
run: uv pip install tox tox-uv --system
8875
- name: Setup test suite
89-
run: tox -vv --notest -e ${{ matrix.tox_env }}
76+
run: tox -vv --notest --skip-missing-interpreters false -e ${{ matrix.tox_env }}
9077
- name: Run test suite
9178
run: tox --skip-pkg-install -e ${{ matrix.tox_env }}

.github/workflows/release.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@ jobs:
1515
- name: Setup python to build package
1616
uses: actions/setup-python@v5
1717
with:
18-
python-version: "3.11"
18+
python-version: "3.12"
19+
- name: Install the latest version of uv
20+
uses: astral-sh/setup-uv@v2
21+
with:
22+
enable-cache: true
23+
github-token: ${{ secrets.GITHUB_TOKEN }}
1924
- name: Install build
20-
run: python -m pip install build
25+
run: uv pip install build[uv] --system
2126
- uses: actions/checkout@v4
2227
with:
2328
fetch-depth: 0
2429
- name: Build package
25-
run: pyproject-build -s -w . -o dist
30+
run: pyproject-build --installer uv --sdist --wheel . --outdir dist
2631
- name: Publish to PyPI
2732
uses: pypa/[email protected]

.pre-commit-config.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,32 @@ repos:
88
rev: 0.29.2
99
hooks:
1010
- id: check-github-workflows
11-
args: [ "--verbose" ]
11+
args: ["--verbose"]
1212
- repo: https://github.com/codespell-project/codespell
1313
rev: v2.3.0
1414
hooks:
1515
- id: codespell
1616
additional_dependencies: ["tomli>=2.0.1"]
1717
- repo: https://github.com/tox-dev/tox-ini-fmt
18-
rev: "1.3.1"
18+
rev: "1.3.2"
1919
hooks:
2020
- id: tox-ini-fmt
2121
args: ["-p", "fix"]
2222
- repo: https://github.com/tox-dev/pyproject-fmt
2323
rev: "2.2.1"
2424
hooks:
2525
- id: pyproject-fmt
26-
additional_dependencies: ["tox>=4.13"]
2726
- repo: https://github.com/astral-sh/ruff-pre-commit
28-
rev: "v0.6.3"
27+
rev: "v0.6.4"
2928
hooks:
3029
- id: ruff-format
3130
- id: ruff
3231
args: ["--fix", "--unsafe-fixes", "--exit-non-zero-on-fix"]
32+
- repo: https://github.com/rbubley/mirrors-prettier
33+
rev: "v3.3.3"
34+
hooks:
35+
- id: prettier
36+
args: ["--print-width=120", "--prose-wrap=always"]
3337
- repo: meta
3438
hooks:
3539
- id: check-hooks-apply

pyproject.toml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
build-backend = "hatchling.build"
33
requires = [
44
"hatch-vcs>=0.4",
5-
"hatchling>=1.21.1",
5+
"hatchling>=1.25",
66
]
77

88
[project]
@@ -38,6 +38,7 @@ classifiers = [
3838
"Programming Language :: Python :: 3.10",
3939
"Programming Language :: Python :: 3.11",
4040
"Programming Language :: Python :: 3.12",
41+
"Programming Language :: Python :: 3.13",
4142
"Topic :: Software Development :: Libraries",
4243
"Topic :: Software Development :: Testing",
4344
"Topic :: Utilities",
@@ -46,15 +47,15 @@ dynamic = [
4647
"version",
4748
]
4849
dependencies = [
49-
"devpi-client>=7.0.2",
50-
"devpi-server>=6.10",
51-
"typing-extensions>=4.9; python_version<'3.11'",
50+
"devpi-client>=7.1",
51+
"devpi-server>=6.12.1",
52+
"typing-extensions>=4.12.2; python_version<'3.11'",
5253
]
5354
optional-dependencies.test = [
5455
"covdefaults>=2.3",
55-
"httpx>=0.27",
56-
"pytest>=8.0.1",
57-
"pytest-cov>=4.1",
56+
"httpx>=0.27.2",
57+
"pytest>=8.3.2",
58+
"pytest-cov>=5",
5859
]
5960
urls.Homepage = "https://github.com/tox-dev/devpi-process#readme"
6061
urls.Source = "https://github.com/tox-dev/devpi-process"
@@ -83,15 +84,16 @@ lint.ignore = [
8384
"CPY", # No copyright statements
8485
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
8586
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
87+
"DOC", # not supported
8688
"ISC001", # Conflict with formatter
8789
"S104", # Possible binding to all interface
8890
]
8991
lint.per-file-ignores."tests/**/*.py" = [
90-
"D", # don"t care about documentation in tests
92+
"D", # don't care about documentation in tests
9193
"FBT", # don't care about booleans as positional arguments in tests
9294
"INP001", # no implicit namespace
9395
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
94-
"S101", # asserts allowed in tests...
96+
"S101", # asserts allowed in tests
9597
"S603", # `subprocess` call: check for execution of untrusted input
9698
]
9799
lint.isort = { known-first-party = [
@@ -106,6 +108,9 @@ builtin = "clear,usage,en-GB_to_en-US"
106108
write-changes = true
107109
count = true
108110

111+
[tool.pyproject-fmt]
112+
max_supported_python = "3.13"
113+
109114
[tool.coverage]
110115
html.show_contexts = true
111116
html.skip_covered = false
@@ -126,6 +131,6 @@ run.plugins = [
126131
]
127132

128133
[tool.mypy]
129-
python_version = "3.11"
134+
python_version = "3.12"
130135
show_error_codes = true
131136
strict = true

tox.ini

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
[tox]
22
requires =
33
tox>=4.2
4+
tox-uv>=1.11.3
45
env_list =
56
fix
6-
py312
7-
py311
8-
py310
9-
py39
10-
py38
117
type
128
readme
9+
3.13
10+
3.12
11+
3.11
12+
3.10
13+
3.9
14+
3.8
1315
skip_missing_interpreters = true
1416

1517
[testenv]
@@ -34,7 +36,7 @@ commands =
3436
description = run static analysis and style check using flake8
3537
skip_install = true
3638
deps =
37-
pre-commit>=3.6.2
39+
pre-commit-uv>=4.1
3840
pass_env =
3941
HOMEPATH
4042
PROGRAMDATA
@@ -44,9 +46,7 @@ commands =
4446
[testenv:type]
4547
description = run type check on code base
4648
deps =
47-
mypy==1.8
48-
set_env =
49-
{tty:MYPY_FORCE_COLOR = 1}
49+
mypy==1.11.2
5050
commands =
5151
mypy src
5252
mypy tests
@@ -55,11 +55,13 @@ commands =
5555
description = check that the long description is valid
5656
skip_install = true
5757
deps =
58-
build[virtualenv]>=1.0.3
59-
twine>=5
58+
build[uv]>=1.2.2
59+
check-wheel-contents>=0.6
60+
twine>=5.1.1
6061
commands =
61-
python -m build --sdist --wheel -o {envtmpdir} .
62-
twine check {envtmpdir}/*
62+
pyproject-build --installer uv --outdir {envtmpdir} --sdist --wheel .
63+
twine check {envtmpdir}{/}*
64+
check-wheel-contents --no-config {envtmpdir}
6365

6466
[testenv:dev]
6567
description = generate a DEV environment
@@ -68,6 +70,5 @@ extras =
6870
docs
6971
test
7072
commands =
71-
python -m pip list --format=columns
73+
uv pip tree
7274
python -c 'import sys; print(sys.executable)'
73-
uv_seed = true

0 commit comments

Comments
 (0)