Skip to content

Commit ca1fa64

Browse files
authored
Merge branch 'main' into style-use-typename-in-raises-errors
2 parents a3018b8 + 7743720 commit ca1fa64

File tree

122 files changed

+1999
-1277
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+1999
-1277
lines changed

.coveragerc

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ updates:
99
allow:
1010
- dependency-type: direct
1111
- dependency-type: indirect
12+
cooldown:
13+
default-days: 7
1214
- package-ecosystem: github-actions
1315
directory: /
1416
schedule:
1517
interval: weekly
1618
time: "03:00"
1719
open-pull-requests-limit: 10
20+
cooldown:
21+
default-days: 7

.github/workflows/deploy.yml

Lines changed: 60 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
package:
1717
runs-on: ubuntu-latest
1818
env:
19-
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.version }}
19+
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST: ${{ github.event.inputs.version }}
2020
timeout-minutes: 10
2121

2222
# Required by attest-build-provenance-github.
@@ -35,20 +35,52 @@ jobs:
3535
with:
3636
attest-build-provenance-github: 'true'
3737

38-
deploy:
39-
if: github.repository == 'pytest-dev/pytest'
38+
generate-gh-release-notes:
4039
needs: [package]
4140
runs-on: ubuntu-latest
42-
environment: deploy
4341
timeout-minutes: 30
4442
permissions:
45-
id-token: write
46-
contents: write
43+
contents: read
4744
steps:
4845
- uses: actions/checkout@v5
4946
with:
50-
persist-credentials: true
47+
fetch-depth: 0
48+
persist-credentials: false
49+
50+
- name: Set up Python
51+
uses: actions/setup-python@v6
52+
with:
53+
python-version: "3.13"
54+
55+
- name: Install tox
56+
run: |
57+
python -m pip install --upgrade pip
58+
pip install tox
5159
60+
- name: Generate release notes
61+
env:
62+
VERSION: ${{ github.event.inputs.version }}
63+
run: |
64+
tox -e generate-gh-release-notes -- "$VERSION" gh-release-notes.md
65+
66+
- name: Upload release notes
67+
uses: actions/upload-artifact@v5
68+
with:
69+
name: release-notes
70+
path: gh-release-notes.md
71+
retention-days: 1
72+
73+
publish-to-pypi:
74+
if: github.repository == 'pytest-dev/pytest'
75+
# Need generate-gh-release-notes only for ordering.
76+
# Don't want to release to PyPI if generating GitHub release notes fails.
77+
needs: [package, generate-gh-release-notes]
78+
runs-on: ubuntu-latest
79+
environment: deploy
80+
timeout-minutes: 30
81+
permissions:
82+
id-token: write
83+
steps:
5284
- name: Download Package
5385
uses: actions/download-artifact@v6
5486
with:
@@ -60,6 +92,18 @@ jobs:
6092
with:
6193
attestations: true
6294

95+
push-tag:
96+
needs: [publish-to-pypi]
97+
runs-on: ubuntu-latest
98+
timeout-minutes: 10
99+
permissions:
100+
contents: write
101+
steps:
102+
- uses: actions/checkout@v5
103+
with:
104+
fetch-depth: 0
105+
persist-credentials: true
106+
63107
- name: Push tag
64108
env:
65109
VERSION: ${{ github.event.inputs.version }}
@@ -69,48 +113,29 @@ jobs:
69113
git tag --annotate --message=v"$VERSION" "$VERSION" ${{ github.sha }}
70114
git push origin "$VERSION"
71115
72-
release-notes:
73-
74-
# todo: generate the content in the build job
75-
# the goal being of using a github action script to push the release data
76-
# after success instead of creating a complete python/tox env
77-
needs: [deploy]
116+
create-github-release:
117+
needs: [push-tag, generate-gh-release-notes]
78118
runs-on: ubuntu-latest
79-
timeout-minutes: 30
119+
timeout-minutes: 10
80120
permissions:
81121
contents: write
82122
steps:
83-
- uses: actions/checkout@v5
84-
with:
85-
fetch-depth: 0
86-
persist-credentials: false
87-
88123
- name: Download Package
89124
uses: actions/download-artifact@v6
90125
with:
91126
name: Packages
92127
path: dist
93128

94-
- name: Set up Python
95-
uses: actions/setup-python@v6
129+
- name: Download release notes
130+
uses: actions/download-artifact@v6
96131
with:
97-
python-version: "3.11"
98-
99-
- name: Install tox
100-
run: |
101-
python -m pip install --upgrade pip
102-
pip install --upgrade tox
103-
104-
- name: Generate release notes
105-
env:
106-
VERSION: ${{ github.event.inputs.version }}
107-
run: |
108-
sudo apt-get install pandoc
109-
tox -e generate-gh-release-notes -- "$VERSION" scripts/latest-release-notes.md
132+
name: release-notes
133+
path: .
110134

111135
- name: Publish GitHub Release
112136
env:
113137
VERSION: ${{ github.event.inputs.version }}
138+
GH_REPO: ${{ github.repository }}
114139
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115140
run: |
116-
gh release create --notes-file scripts/latest-release-notes.md --verify-tag "$VERSION" dist/*
141+
gh release create --notes-file gh-release-notes.md --verify-tag "$VERSION" dist/*

.github/workflows/doc-check-links.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
- name: Setup Python
2626
uses: actions/setup-python@v6
2727
with:
28-
python-version: "3.11"
28+
python-version: "3.13"
2929
cache: pip
3030

31-
- name: Install dependencies
31+
- name: Install tox
3232
run: |
3333
python -m pip install --upgrade pip
3434
pip install tox

.github/workflows/prepare-release-pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ jobs:
3636
- name: Set up Python
3737
uses: actions/setup-python@v6
3838
with:
39-
python-version: "3.x"
39+
python-version: "3.13"
4040

41-
- name: Install dependencies
41+
- name: Install tox
4242
run: |
4343
python -m pip install --upgrade pip
44-
pip install --upgrade setuptools tox
44+
pip install tox
4545
4646
- name: Prepare release PR (minor/patch release)
4747
if: github.event.inputs.major == 'no'

.github/workflows/test.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -268,10 +268,10 @@ jobs:
268268
check-latest: true
269269
allow-prereleases: true
270270

271-
- name: Install dependencies
271+
- name: Install tox
272272
run: |
273273
python -m pip install --upgrade pip
274-
pip install tox coverage
274+
pip install tox
275275
276276
- name: Test without coverage
277277
if: "! matrix.use_coverage"
@@ -283,10 +283,6 @@ jobs:
283283
shell: bash
284284
run: tox run -e ${{ matrix.tox_env }}-coverage --installpkg `find dist/*.tar.gz`
285285

286-
- name: Generate coverage report
287-
if: "matrix.use_coverage"
288-
run: python -m coverage xml
289-
290286
- name: Upload coverage to Codecov
291287
if: "matrix.use_coverage"
292288
uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7

.github/workflows/update-plugin-list.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ jobs:
2828
- name: Setup Python
2929
uses: actions/setup-python@v6
3030
with:
31-
python-version: "3.11"
32-
cache: pip
31+
python-version: "3.13"
3332

3433
- name: requests-cache
3534
uses: actions/cache@v4
@@ -38,13 +37,13 @@ jobs:
3837
key: plugins-http-cache-${{ github.run_id }} # Can use time based key as well
3938
restore-keys: plugins-http-cache-
4039

41-
- name: Install dependencies
40+
- name: Install tox
4241
run: |
4342
python -m pip install --upgrade pip
44-
pip install packaging requests tabulate[widechars] tqdm requests-cache platformdirs
43+
pip install tox
4544
4645
- name: Update Plugin List
47-
run: python scripts/update-plugin-list.py
46+
run: tox -e update-plugin-list
4847

4948
- name: Create Pull Request
5049
id: pr

.pre-commit-config.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
minimum_pre_commit_version: "4.4.0"
12
repos:
23
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: "v0.14.2"
4+
rev: "v0.14.5"
45
hooks:
56
- id: ruff-check
67
args: ["--fix"]
@@ -12,9 +13,10 @@ repos:
1213
- id: end-of-file-fixer
1314
- id: check-yaml
1415
- repo: https://github.com/woodruffw/zizmor-pre-commit
15-
rev: v1.16.0
16+
rev: v1.16.3
1617
hooks:
1718
- id: zizmor
19+
args: ["--fix"]
1820
- repo: https://github.com/adamchainz/blacken-docs
1921
rev: 1.20.0
2022
hooks:
@@ -66,13 +68,13 @@ repos:
6668
# Manual because passing pyright is a work in progress.
6769
stages: [manual]
6870
- repo: https://github.com/tox-dev/pyproject-fmt
69-
rev: "v2.11.0"
71+
rev: "v2.11.1"
7072
hooks:
7173
- id: pyproject-fmt
7274
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version
7375
additional_dependencies: ["tox>=4.9"]
7476
- repo: https://github.com/asottile/pyupgrade
75-
rev: v3.21.0
77+
rev: v3.21.1
7678
hooks:
7779
- id: pyupgrade
7880
args:
@@ -85,7 +87,7 @@ repos:
8587
- id: pylint
8688
name: pylint
8789
entry: pylint
88-
language: system
90+
language: unsupported
8991
types: [python]
9092
args: ["-rn", "-sn", "--fail-on=I", "--enable-all-extentions"]
9193
require_serial: true

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ build:
1717
os: ubuntu-24.04
1818
tools:
1919
python: >-
20-
3.12
20+
3.13
2121
apt_packages:
2222
- inkscape
2323
jobs:

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ Yusuke Kadowaki
501501
Yutian Li
502502
Yuval Shimon
503503
Zac Hatfield-Dodds
504+
Zac Palmer Laporte
504505
Zach Snicker
505506
Zachary Kneupper
506507
Zachary OBrien

0 commit comments

Comments
 (0)