Skip to content

Commit 5e5c6a2

Browse files
committed
Merge remote-tracking branch 'origin/main' into async-tests-issue-warning
2 parents 807c014 + 26215b8 commit 5e5c6a2

File tree

333 files changed

+7028
-4069
lines changed

Some content is hidden

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

333 files changed

+7028
-4069
lines changed

.coveragerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,5 @@ exclude_lines =
2929

3030
^\s*if TYPE_CHECKING:
3131
^\s*@overload( |$)
32+
33+
^\s*@pytest\.mark\.xfail

.github/chronographer.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
3+
branch-protection-check-name: Changelog entry
4+
action-hints:
5+
check-title-prefix: "Chronographer: "
6+
external-docs-url: >-
7+
https://docs.pytest.org/en/latest/contributing.html#preparing-pull-requests
8+
inline-markdown: >-
9+
See
10+
https://docs.pytest.org/en/latest/contributing.html#preparing-pull-requests
11+
for details.
12+
enforce-name:
13+
suffix: .rst
14+
exclude:
15+
humans:
16+
- pyup-bot
17+
labels:
18+
skip-changelog: skip news
19+
20+
...

.github/patchback.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
3+
backport_branch_prefix: patchback/backports/
4+
backport_label_prefix: 'backport ' # IMPORTANT: the labels are space-delimited
5+
# target_branch_prefix: '' # The project's backport branches are non-prefixed
6+
7+
...

.github/workflows/backport.yml

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

.github/workflows/deploy.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
persist-credentials: false
3232

3333
- name: Build and Check Package
34-
uses: hynek/build-and-inspect-python-package@v2.5.0
34+
uses: hynek/build-and-inspect-python-package@v2.9.0
3535
with:
3636
attest-build-provenance-github: 'true'
3737

@@ -54,7 +54,9 @@ jobs:
5454
path: dist
5555

5656
- name: Publish package to PyPI
57-
uses: pypa/[email protected]
57+
uses: pypa/[email protected]
58+
with:
59+
attestations: true
5860

5961
- name: Push tag
6062
run: |

.github/workflows/test.yml

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ on:
1414
branches:
1515
- main
1616
- "[0-9]+.[0-9]+.x"
17+
types:
18+
- opened # default
19+
- synchronize # default
20+
- reopened # default
21+
- ready_for_review # used in PRs created from the release workflow
1722

1823
env:
1924
PYTEST_ADDOPTS: "--color=yes"
@@ -35,7 +40,7 @@ jobs:
3540
fetch-depth: 0
3641
persist-credentials: false
3742
- name: Build and Check Package
38-
uses: hynek/build-and-inspect-python-package@v2.5.0
43+
uses: hynek/build-and-inspect-python-package@v2.9.0
3944

4045
build:
4146
needs: [package]
@@ -142,10 +147,10 @@ jobs:
142147
- name: "ubuntu-py313"
143148
python: "3.13-dev"
144149
os: ubuntu-latest
145-
tox_env: "py313"
150+
tox_env: "py313-pexpect"
146151
use_coverage: true
147152
- name: "ubuntu-pypy3"
148-
python: "pypy-3.8"
153+
python: "pypy-3.9"
149154
os: ubuntu-latest
150155
tox_env: "pypy3-xdist"
151156

@@ -182,6 +187,26 @@ jobs:
182187
tox_env: "doctesting"
183188
use_coverage: true
184189

190+
continue-on-error: >-
191+
${{
192+
contains(
193+
fromJSON(
194+
'[
195+
"windows-py38-pluggy",
196+
"windows-py313",
197+
"ubuntu-py38-pluggy",
198+
"ubuntu-py38-freeze",
199+
"ubuntu-py313",
200+
"macos-py38",
201+
"macos-py313"
202+
]'
203+
),
204+
matrix.name
205+
)
206+
&& true
207+
|| false
208+
}}
209+
185210
steps:
186211
- uses: actions/checkout@v4
187212
with:
@@ -222,8 +247,21 @@ jobs:
222247
- name: Upload coverage to Codecov
223248
if: "matrix.use_coverage"
224249
uses: codecov/codecov-action@v4
225-
continue-on-error: true
226250
with:
227-
fail_ci_if_error: true
251+
fail_ci_if_error: false
228252
files: ./coverage.xml
229253
verbose: true
254+
255+
check: # This job does nothing and is only used for the branch protection
256+
if: always()
257+
258+
needs:
259+
- build
260+
261+
runs-on: ubuntu-latest
262+
263+
steps:
264+
- name: Decide whether the needed jobs succeeded or failed
265+
uses: re-actors/alls-green@223e4bb7a751b91f43eda76992bcfbf23b8b0302
266+
with:
267+
jobs: ${{ toJSON(needs) }}

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

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ jobs:
4646
run: python scripts/update-plugin-list.py
4747

4848
- name: Create Pull Request
49-
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e
49+
id: pr
50+
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f
5051
with:
5152
commit-message: '[automated] Update plugin list'
5253
author: 'pytest bot <[email protected]>'
@@ -55,3 +56,13 @@ jobs:
5556
branch-suffix: short-commit-hash
5657
title: '[automated] Update plugin list'
5758
body: '[automated] Update plugin list'
59+
draft: true
60+
61+
- name: Instruct the maintainers to trigger CI by undrafting the PR
62+
env:
63+
GITHUB_TOKEN: ${{ github.token }}
64+
run: >-
65+
gh pr comment
66+
--body 'Please mark the PR as ready for review to trigger PR checks.'
67+
--repo '${{ github.repository }}'
68+
'${{ steps.pr.outputs.pull-request-number }}'

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ src/_pytest/_version.py
2525

2626
doc/*/_build
2727
doc/*/.doctrees
28-
doc/*/_changelog_towncrier_draft.rst
2928
build/
3029
dist/
3130
*.egg-info

.pre-commit-config.yaml

Lines changed: 61 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,59 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: "v0.4.3"
3+
rev: "v0.6.9"
44
hooks:
55
- id: ruff
66
args: ["--fix"]
77
- id: ruff-format
88
- repo: https://github.com/pre-commit/pre-commit-hooks
9-
rev: v4.6.0
9+
rev: v5.0.0
1010
hooks:
1111
- id: trailing-whitespace
1212
- id: end-of-file-fixer
1313
- id: check-yaml
1414
- repo: https://github.com/adamchainz/blacken-docs
15-
rev: 1.16.0
15+
rev: 1.19.0
1616
hooks:
1717
- id: blacken-docs
1818
additional_dependencies: [black==24.1.1]
19+
- repo: https://github.com/codespell-project/codespell
20+
rev: v2.3.0
21+
hooks:
22+
- id: codespell
23+
args: ["--toml=pyproject.toml"]
24+
additional_dependencies:
25+
- tomli
1926
- repo: https://github.com/pre-commit/pygrep-hooks
2027
rev: v1.10.0
2128
hooks:
2229
- id: python-use-type-annotations
2330
- repo: https://github.com/pre-commit/mirrors-mypy
24-
rev: v1.10.0
31+
rev: v1.11.2
2532
hooks:
2633
- id: mypy
2734
files: ^(src/|testing/|scripts/)
28-
args: []
2935
additional_dependencies:
3036
- iniconfig>=1.1.0
3137
- attrs>=19.2.0
3238
- pluggy>=1.5.0
3339
- packaging
3440
- tomli
35-
- types-pkg_resources
41+
- types-setuptools
3642
- types-tabulate
3743
# for mypy running on python>=3.11 since exceptiongroup is only a dependency
3844
# on <3.11
3945
- exceptiongroup>=1.0.0rc8
4046
- repo: https://github.com/tox-dev/pyproject-fmt
41-
rev: "1.8.0"
47+
rev: "2.3.1"
4248
hooks:
4349
- id: pyproject-fmt
4450
# https://pyproject-fmt.readthedocs.io/en/latest/#calculating-max-supported-python-version
4551
additional_dependencies: ["tox>=4.9"]
52+
- repo: https://github.com/asottile/pyupgrade
53+
rev: v3.18.0
54+
hooks:
55+
- id: pyupgrade
56+
stages: [manual]
4657
- repo: local
4758
hooks:
4859
- id: pylint
@@ -61,9 +72,50 @@ repos:
6172
- id: changelogs-rst
6273
name: changelog filenames
6374
language: fail
64-
entry: 'changelog files must be named ####.(breaking|bugfix|deprecation|doc|feature|improvement|trivial|vendor).rst'
65-
exclude: changelog/(\d+\.(breaking|bugfix|deprecation|doc|feature|improvement|trivial|vendor).rst|README.rst|_template.rst)
75+
entry: >-
76+
changelog files must be named
77+
####.(
78+
breaking
79+
| deprecation
80+
| feature
81+
| improvement
82+
| bugfix
83+
| vendor
84+
| doc
85+
| packaging
86+
| contrib
87+
| misc
88+
)(.#)?(.rst)?
89+
exclude: >-
90+
(?x)
91+
^
92+
changelog/(
93+
\.gitignore
94+
|\d+\.(
95+
breaking
96+
|deprecation
97+
|feature
98+
|improvement
99+
|bugfix
100+
|vendor
101+
|doc
102+
|packaging
103+
|contrib
104+
|misc
105+
)(\.\d+)?(\.rst)?
106+
|README\.rst
107+
|_template\.rst
108+
)
109+
$
66110
files: ^changelog/
111+
- id: changelogs-user-role
112+
name: Changelog files should use a non-broken :user:`name` role
113+
language: pygrep
114+
entry: :user:([^`]+`?|`[^`]+[\s,])
115+
pass_filenames: true
116+
types:
117+
- file
118+
- rst
67119
- id: py-deprecated
68120
name: py library is deprecated
69121
language: pygrep

.readthedocs.yml renamed to .readthedocs.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,16 @@ sphinx:
1414
fail_on_warning: true
1515

1616
build:
17-
os: ubuntu-20.04
17+
os: ubuntu-24.04
1818
tools:
19-
python: "3.9"
19+
python: >-
20+
3.12
2021
apt_packages:
2122
- inkscape
23+
jobs:
24+
post_checkout:
25+
- git fetch --unshallow || true
26+
- git fetch --tags || true
2227

2328
formats:
2429
- epub

0 commit comments

Comments
 (0)