Skip to content

Commit b6d8877

Browse files
authored
Declare 3.13 support (#120)
1 parent 00c41ac commit b6d8877

File tree

5 files changed

+54
-52
lines changed

5 files changed

+54
-52
lines changed

Diff for: .github/workflows/check.yml

+16-22
Original file line numberDiff line numberDiff line change
@@ -14,45 +14,37 @@ concurrency:
1414

1515
jobs:
1616
test:
17-
name: test on CPython ${{ matrix.py }}
17+
name: test ${{ matrix.py }}
1818
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"
2829
steps:
30+
- name: setup uv for tox
31+
uses: yezz123/setup-uv@v4
2932
- name: setup python for tox
3033
uses: actions/setup-python@v5
3134
with:
3235
python-version: "3.12"
3336
- name: install tox
34-
run: python -m pip install tox-uv
37+
run: uv pip install tox tox-uv --system
3538
- uses: actions/checkout@v4
3639
- name: setup python for test ${{ matrix.py }}
3740
uses: actions/setup-python@v5
3841
with:
3942
python-version: ${{ matrix.py }}
40-
- name: Pick environment to run
41-
run: |
42-
import codecs; import os; import sys
43-
env = f"TOXENV=py3{sys.version_info[1]}\n"
44-
print("Picked:\n{env}for{sys.version}")
45-
with codecs.open(os.environ["GITHUB_ENV"], "a", "utf-8") as file_handler:
46-
file_handler.write(env)
47-
shell: python
43+
allow-prereleases: true
4844
- name: setup test suite
49-
run: tox -vv --notest
45+
run: tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.py }}
5046
- name: run test suite
51-
run: tox --skip-pkg-install
52-
env:
53-
PYTEST_ADDOPTS: "-vv --durations=20"
54-
CI_RUN: "yes"
55-
DIFF_AGAINST: HEAD
47+
run: tox run --skip-pkg-install -e ${{ matrix.py }}
5648

5749
check:
5850
name: tox env ${{ matrix.tox_env }}
@@ -63,16 +55,18 @@ jobs:
6355
tox_env:
6456
- type
6557
- dev
66-
- pkg_meta
58+
- readme
6759
steps:
60+
- name: setup uv for tox
61+
uses: yezz123/setup-uv@v4
6862
- uses: actions/checkout@v4
6963
- name: setup Python 3.12
7064
uses: actions/setup-python@v5
7165
with:
7266
python-version: "3.12"
7367
- name: install tox
74-
run: python -m pip install tox-uv
75-
- name: run check for ${{ matrix.tox_env }}
76-
run: python -m tox -e ${{ matrix.tox_env }}
77-
env:
78-
UPGRADE_ADVISORY: "yes"
68+
run: uv pip install tox tox-uv --system
69+
- name: Setup test suite
70+
run: tox -vv --notest --skip-missing-interpreters false -e ${{ matrix.tox_env }}
71+
- name: Run test suite
72+
run: tox --skip-pkg-install -e ${{ matrix.tox_env }}

Diff for: .github/workflows/release.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ jobs:
1616
uses: actions/setup-python@v5
1717
with:
1818
python-version: "3.12"
19+
- name: setup uv for tox
20+
uses: yezz123/setup-uv@v4
1921
- name: Install build
20-
run: python -m pip install build
22+
run: uv pip install build[uv] --system
2123
- uses: actions/checkout@v4
2224
with:
2325
fetch-depth: 0
2426
- name: Build package
25-
run: pyproject-build -s -w . -o dist
27+
run: pyproject-build --installer uv --sdist --wheel . --outdir dist
2628
- name: Publish to PyPI
2729
uses: pypa/[email protected]

Diff for: .pre-commit-config.yaml

+8-4
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

Diff for: pyproject.toml

+12-7
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]
@@ -30,19 +30,20 @@ classifiers = [
3030
"Programming Language :: Python :: 3.10",
3131
"Programming Language :: Python :: 3.11",
3232
"Programming Language :: Python :: 3.12",
33+
"Programming Language :: Python :: 3.13",
3334
"Programming Language :: Python :: Implementation :: CPython",
3435
"Topic :: Software Development :: Libraries :: Python Modules",
3536
]
3637
dynamic = [
3738
"version",
3839
]
3940
dependencies = [
40-
"pytest>=8.0.1",
41+
"pytest>=8.3.2",
4142
]
4243
optional-dependencies.test = [
4344
"covdefaults>=2.3",
44-
"coverage>=7.4.2",
45-
"pytest-mock>=3.12",
45+
"coverage>=7.6.1",
46+
"pytest-mock>=3.14",
4647
]
4748
urls.Homepage = "https://github.com/pytest-dev/pytest-print"
4849
urls.Source = "https://github.com/pytest-dev/pytest-print"
@@ -69,15 +70,16 @@ lint.ignore = [
6970
"CPY", # No copyright statements
7071
"D203", # `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible
7172
"D212", # `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible
73+
"DOC", # no support
7274
"ISC001", # Conflict with formatter
7375
"S104", # Possible binding to all interface
7476
]
7577
lint.per-file-ignores."tests/**/*.py" = [
76-
"D", # don"t care about documentation in tests
78+
"D", # don't care about documentation in tests
7779
"FBT", # don't care about booleans as positional arguments in tests
7880
"INP001", # no implicit namespace
7981
"PLR2004", # Magic value used in comparison, consider replacing with a constant variable
80-
"S101", # asserts allowed in tests...
82+
"S101", # asserts allowed in tests
8183
"S603", # `subprocess` call: check for execution of untrusted input
8284
]
8385
lint.isort = { known-first-party = [
@@ -92,6 +94,9 @@ builtin = "clear,usage,en-GB_to_en-US"
9294
write-changes = true
9395
count = true
9496

97+
[tool.pyproject-fmt]
98+
max_supported_python = "3.13"
99+
95100
[tool.coverage]
96101
run.source = [
97102
"pytest_print",
@@ -120,6 +125,6 @@ run.plugins = [
120125
]
121126

122127
[tool.mypy]
123-
python_version = "3.11"
128+
python_version = "3.13"
124129
show_error_codes = true
125130
strict = true

Diff for: tox.ini

+14-17
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ requires =
33
tox>=4.2
44
env_list =
55
fix
6-
py312
7-
py311
8-
py310
9-
py39
10-
py38
11-
py37
126
type
13-
pkg_meta
7+
readme
8+
3.13
9+
3.12
10+
3.11
11+
3.10
12+
3.9
13+
3.8
1414
skip_missing_interpreters = true
1515

1616
[testenv]
@@ -34,7 +34,7 @@ commands =
3434
description = run static analysis and style check using flake8
3535
skip_install = true
3636
deps =
37-
pre-commit>=3.5
37+
pre-commit-uv>=4.1
3838
pass_env =
3939
HOMEPATH
4040
PROGRAMDATA
@@ -44,22 +44,20 @@ commands =
4444
[testenv:type]
4545
description = run type check on code base
4646
deps =
47-
mypy==1.8
48-
set_env =
49-
{tty:MYPY_FORCE_COLOR = 1}
47+
mypy==1.11.2
5048
commands =
5149
mypy --strict src
5250
mypy --strict tests
5351

54-
[testenv:pkg_meta]
52+
[testenv:readme]
5553
description = check that the long description is valid
5654
skip_install = true
5755
deps =
58-
build[virtualenv]>=1.0.3
56+
build[uv]>=1.2.2
5957
check-wheel-contents>=0.6
60-
twine>=5
58+
twine>=5.1.1
6159
commands =
62-
python -m build -o {envtmpdir} -s -w .
60+
pyproject-build --installer uv --outdir {envtmpdir} --sdist --wheel .
6361
twine check {envtmpdir}{/}*
6462
check-wheel-contents --no-config {envtmpdir}
6563

@@ -69,6 +67,5 @@ package = editable
6967
extras =
7068
test
7169
commands =
72-
python -m pip list --format=columns
70+
uv pip tree
7371
python -c 'import sys; print(sys.executable)'
74-
uv_seed = true

0 commit comments

Comments
 (0)