Skip to content

Commit 641a3a1

Browse files
authored
Merge branch 'main' into reprs-assert-callable
2 parents f8167db + 26215b8 commit 641a3a1

File tree

102 files changed

+2168
-787
lines changed

Some content is hidden

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

102 files changed

+2168
-787
lines changed

.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.8.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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
fetch-depth: 0
4141
persist-credentials: false
4242
- name: Build and Check Package
43-
uses: hynek/build-and-inspect-python-package@v2.8.0
43+
uses: hynek/build-and-inspect-python-package@v2.9.0
4444

4545
build:
4646
needs: [package]
@@ -147,7 +147,7 @@ jobs:
147147
- name: "ubuntu-py313"
148148
python: "3.13-dev"
149149
os: ubuntu-latest
150-
tox_env: "py313"
150+
tox_env: "py313-pexpect"
151151
use_coverage: true
152152
- name: "ubuntu-pypy3"
153153
python: "pypy-3.9"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747

4848
- name: Create Pull Request
4949
id: pr
50-
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c
50+
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f
5151
with:
5252
commit-message: '[automated] Update plugin list'
5353
author: 'pytest bot <[email protected]>'

.pre-commit-config.yaml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,56 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: "v0.5.5"
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.18.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.11.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: "2.1.4"
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"]
4652
- repo: https://github.com/asottile/pyupgrade
47-
rev: v3.17.0
53+
rev: v3.18.0
4854
hooks:
4955
- id: pyupgrade
5056
stages: [manual]

AUTHORS

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ Aron Coyle
5151
Aron Curzon
5252
Arthur Richard
5353
Ashish Kurmi
54+
Ashley Whetter
5455
Aviral Verma
5556
Aviv Palivoda
5657
Babak Keyvani
@@ -85,6 +86,7 @@ Chris NeJame
8586
Chris Rose
8687
Chris Wheeler
8788
Christian Boelsen
89+
Christian Clauss
8890
Christian Fetzer
8991
Christian Neumüller
9092
Christian Theunert
@@ -93,6 +95,7 @@ Christine Mecklenborg
9395
Christoph Buelter
9496
Christopher Dignam
9597
Christopher Gilling
98+
Christopher Head
9699
Claire Cecil
97100
Claudio Madotto
98101
Clément M.T. Robert
@@ -115,6 +118,7 @@ Dave Hunt
115118
David Díaz-Barquero
116119
David Mohr
117120
David Paul Röthlisberger
121+
David Peled
118122
David Szotten
119123
David Vierra
120124
Daw-Ran Liou
@@ -158,6 +162,7 @@ Feng Ma
158162
Florian Bruhin
159163
Florian Dahlitz
160164
Floris Bruynooghe
165+
Frank Hoffmann
161166
Fraser Stark
162167
Gabriel Landau
163168
Gabriel Reis
@@ -299,6 +304,7 @@ mrbean-bremen
299304
Nathan Goldbaum
300305
Nathaniel Compton
301306
Nathaniel Waisbrot
307+
Nauman Ahmed
302308
Ned Batchelder
303309
Neil Martin
304310
Neven Mundar
@@ -325,6 +331,7 @@ Paul Müller
325331
Paul Reece
326332
Pauli Virtanen
327333
Pavel Karateev
334+
Pavel Zhukov
328335
Paweł Adamczak
329336
Pedro Algarvio
330337
Petter Strandmark
@@ -351,6 +358,7 @@ Rafal Semik
351358
Raquel Alegre
352359
Ravi Chandra
353360
Reagan Lee
361+
Rob Arrow
354362
Robert Holt
355363
Roberto Aldera
356364
Roberto Polli
@@ -402,6 +410,7 @@ Sviatoslav Sydorenko
402410
Sylvain Marié
403411
Tadek Teleżyński
404412
Takafumi Arakaki
413+
Takumi Otani
405414
Taneli Hukkinen
406415
Tanvi Mehta
407416
Tanya Agarwal
@@ -412,6 +421,7 @@ Ted Xiao
412421
Terje Runde
413422
Thomas Grainger
414423
Thomas Hisch
424+
Tianyu Dongfang
415425
Tim Hoffmann
416426
Tim Strazny
417427
TJ Bruno

CONTRIBUTING.rst

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,57 @@ pull requests from other contributors yourself after having reviewed
380380
them.
381381

382382

383+
Merge/squash guidelines
384+
-----------------------
385+
386+
When a PR is approved and ready to be integrated to the ``main`` branch, one has the option to *merge* the commits unchanged, or *squash* all the commits into a single commit.
387+
388+
Here are some guidelines on how to proceed, based on examples of a single PR commit history:
389+
390+
1. Miscellaneous commits:
391+
392+
* ``Implement X``
393+
* ``Fix test_a``
394+
* ``Add myself to AUTHORS``
395+
* ``fixup! Fix test_a``
396+
* ``Update tests/test_integration.py``
397+
* ``Merge origin/main into PR branch``
398+
* ``Update tests/test_integration.py``
399+
400+
In this case, prefer to use the **Squash** merge strategy: the commit history is a bit messy (not in a derogatory way, often one just commits changes because they know the changes will eventually be squashed together), so squashing everything into a single commit is best. You must clean up the commit message, making sure it contains useful details.
401+
402+
2. Separate commits related to the same topic:
403+
404+
* ``Implement X``
405+
* ``Add myself to AUTHORS``
406+
* ``Update CHANGELOG for X``
407+
408+
In this case, prefer to use the **Squash** merge strategy: while the commit history is not "messy" as in the example above, the individual commits do not bring much value overall, specially when looking at the changes a few months/years down the line.
409+
410+
3. Separate commits, each with their own topic (refactorings, renames, etc), but still have a larger topic/purpose.
411+
412+
* ``Refactor class X in preparation for feature Y``
413+
* ``Remove unused method``
414+
* ``Implement feature Y``
415+
416+
In this case, prefer to use the **Merge** strategy: each commit is valuable on its own, even if they serve a common topic overall. Looking at the history later, it is useful to have the removal of the unused method separately on its own commit, along with more information (such as how it became unused in the first place).
417+
418+
4. Separate commits, each with their own topic, but without a larger topic/purpose other than improve the code base (using more modern techniques, improve typing, removing clutter, etc).
419+
420+
* ``Improve internal names in X``
421+
* ``Add type annotations to Y``
422+
* ``Remove unnecessary dict access``
423+
* ``Remove unreachable code due to EOL Python``
424+
425+
In this case, prefer to use the **Merge** strategy: each commit is valuable on its own, and the information on each is valuable in the long term.
426+
427+
428+
As mentioned, those are overall guidelines, not rules cast in stone. This topic was discussed in `#12633 <https://github.com/pytest-dev/pytest/discussions/12633>`_.
429+
430+
431+
*Backport PRs* (as those created automatically from a ``backport`` label) should always be **squashed**, as they preserve the original PR author.
432+
433+
383434
Backporting bug fixes for the next patch release
384435
------------------------------------------------
385436

@@ -438,6 +489,8 @@ above?
438489
All the above are not rules, but merely some guidelines/suggestions on what we should expect
439490
about backports.
440491

492+
Backports should be **squashed** (rather than **merged**), as doing so preserves the original PR author correctly.
493+
441494
Handling stale issues/PRs
442495
-------------------------
443496

@@ -485,9 +538,9 @@ When closing a Pull Request, it needs to be acknowledging the time, effort, and
485538

486539
<bye>
487540

488-
Closing Issues
541+
Closing issues
489542
--------------
490543

491544
When a pull request is submitted to fix an issue, add text like ``closes #XYZW`` to the PR description and/or commits (where ``XYZW`` is the issue number). See the `GitHub docs <https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword>`_ for more information.
492545

493-
When an issue is due to user error (e.g. misunderstanding of a functionality), please politely explain to the user why the issue raised is really a non-issue and ask them to close the issue if they have no further questions. If the original requestor is unresponsive, the issue will be handled as described in the section `Handling stale issues/PRs`_ above.
546+
When an issue is due to user error (e.g. misunderstanding of a functionality), please politely explain to the user why the issue raised is really a non-issue and ask them to close the issue if they have no further questions. If the original requester is unresponsive, the issue will be handled as described in the section `Handling stale issues/PRs`_ above.

RELEASING.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,6 @@ Both automatic and manual processes described above follow the same steps from t
158158
git tag MAJOR.{MINOR+1}.0.dev0
159159
git push upstream MAJOR.{MINOR+1}.0.dev0
160160

161-
#. For major and minor releases, change the default version in the `Read the Docs Settings <https://readthedocs.org/dashboard/pytest/advanced/>`_ to the new branch.
162-
163161
#. Send an email announcement with the contents from::
164162

165163
doc/en/announce/release-<VERSION>.rst

changelog/10558.doc.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix ambiguous docstring of :func:`pytest.Config.getoption`.

changelog/11118.improvement.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Now :confval:`pythonpath` configures `$PYTHONPATH` earlier than before during the initialization process, which now also affects plugins loaded via the `-p` command-line option.
2+
3+
-- by :user:`millerdev`

changelog/12008.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
In :pr:`11220`, an unintended change in reordering was introduced by changing the way indices were assigned to direct params. More specifically, before that change, the indices of direct params to metafunc's callspecs were assigned after all parametrizations took place. Now, that change is reverted.

0 commit comments

Comments
 (0)