Skip to content

Commit 3bc20b6

Browse files
Merge branch 'main' into improve-high-scope-fixtures-teardown-issue-3806
2 parents 4269fc1 + 78d81ef commit 3bc20b6

File tree

100 files changed

+1249
-988
lines changed

Some content is hidden

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

100 files changed

+1249
-988
lines changed

.github/workflows/deploy.yml

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,53 @@ on:
1313
permissions: {}
1414

1515
jobs:
16-
17-
deploy:
18-
if: github.repository == 'pytest-dev/pytest'
19-
16+
build:
2017
runs-on: ubuntu-latest
21-
timeout-minutes: 30
22-
permissions:
23-
contents: write
24-
18+
timeout-minutes: 10
2519
steps:
2620
- uses: actions/checkout@v3
2721
with:
2822
fetch-depth: 0
2923
persist-credentials: false
30-
3124
- name: Build and Check Package
3225
uses: hynek/[email protected]
3326

27+
deploy:
28+
if: github.repository == 'pytest-dev/pytest'
29+
needs: [build]
30+
runs-on: ubuntu-latest
31+
timeout-minutes: 30
32+
permissions:
33+
id-token: write
34+
steps:
3435
- name: Download Package
3536
uses: actions/download-artifact@v3
3637
with:
3738
name: Packages
3839
path: dist
39-
4040
- name: Publish package to PyPI
41-
uses: pypa/gh-action-pypi-publish@release/v1
42-
with:
43-
password: ${{ secrets.pypi_token }}
41+
uses: pypa/gh-action-pypi-publish@v1.8.7
42+
43+
release-notes:
4444

45+
# todo: generate the content in the build job
46+
# the goal being of using a github action script to push the release data
47+
# after success instead of creating a complete python/tox env
48+
needs: [deploy]
49+
runs-on: ubuntu-latest
50+
timeout-minutes: 30
51+
permissions:
52+
contents: write
53+
steps:
54+
- uses: actions/checkout@v3
55+
with:
56+
fetch-depth: 0
57+
persist-credentials: false
4558
- name: Set up Python
4659
uses: actions/setup-python@v4
4760
with:
48-
python-version: "3.7"
61+
python-version: "3.11"
62+
4963

5064
- name: Install tox
5165
run: |

.github/workflows/test.yml

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,23 @@ jobs:
3737
fail-fast: false
3838
matrix:
3939
name: [
40-
"windows-py37",
41-
"windows-py37-pluggy",
4240
"windows-py38",
41+
"windows-py38-pluggy",
4342
"windows-py39",
4443
"windows-py310",
4544
"windows-py311",
4645
"windows-py312",
4746

48-
"ubuntu-py37",
49-
"ubuntu-py37-pluggy",
50-
"ubuntu-py37-freeze",
5147
"ubuntu-py38",
48+
"ubuntu-py38-pluggy",
49+
"ubuntu-py38-freeze",
5250
"ubuntu-py39",
5351
"ubuntu-py310",
5452
"ubuntu-py311",
5553
"ubuntu-py312",
5654
"ubuntu-pypy3",
5755

58-
"macos-py37",
56+
"macos-py38",
5957
"macos-py39",
6058
"macos-py310",
6159
"macos-py312",
@@ -66,19 +64,15 @@ jobs:
6664
]
6765

6866
include:
69-
- name: "windows-py37"
70-
python: "3.7"
71-
os: windows-latest
72-
tox_env: "py37-numpy"
73-
- name: "windows-py37-pluggy"
74-
python: "3.7"
75-
os: windows-latest
76-
tox_env: "py37-pluggymain-pylib-xdist"
7767
- name: "windows-py38"
7868
python: "3.8"
7969
os: windows-latest
8070
tox_env: "py38-unittestextras"
8171
use_coverage: true
72+
- name: "windows-py38-pluggy"
73+
python: "3.8"
74+
os: windows-latest
75+
tox_env: "py38-pluggymain-pylib-xdist"
8276
- name: "windows-py39"
8377
python: "3.9"
8478
os: windows-latest
@@ -96,23 +90,19 @@ jobs:
9690
os: windows-latest
9791
tox_env: "py312"
9892

99-
- name: "ubuntu-py37"
100-
python: "3.7"
93+
- name: "ubuntu-py38"
94+
python: "3.8"
10195
os: ubuntu-latest
102-
tox_env: "py37-lsof-numpy-pexpect"
96+
tox_env: "py38-lsof-numpy-pexpect"
10397
use_coverage: true
104-
- name: "ubuntu-py37-pluggy"
105-
python: "3.7"
106-
os: ubuntu-latest
107-
tox_env: "py37-pluggymain-pylib-xdist"
108-
- name: "ubuntu-py37-freeze"
109-
python: "3.7"
98+
- name: "ubuntu-py38-pluggy"
99+
python: "3.8"
110100
os: ubuntu-latest
111-
tox_env: "py37-freeze"
112-
- name: "ubuntu-py38"
101+
tox_env: "py38-pluggymain-pylib-xdist"
102+
- name: "ubuntu-py38-freeze"
113103
python: "3.8"
114104
os: ubuntu-latest
115-
tox_env: "py38-xdist"
105+
tox_env: "py38-freeze"
116106
- name: "ubuntu-py39"
117107
python: "3.9"
118108
os: ubuntu-latest
@@ -132,14 +122,14 @@ jobs:
132122
tox_env: "py312"
133123
use_coverage: true
134124
- name: "ubuntu-pypy3"
135-
python: "pypy-3.7"
125+
python: "pypy-3.8"
136126
os: ubuntu-latest
137127
tox_env: "pypy3-xdist"
138128

139-
- name: "macos-py37"
140-
python: "3.7"
129+
- name: "macos-py38"
130+
python: "3.8"
141131
os: macos-latest
142-
tox_env: "py37-xdist"
132+
tox_env: "py38-xdist"
143133
- name: "macos-py39"
144134
python: "3.9"
145135
os: macos-latest
@@ -160,11 +150,11 @@ jobs:
160150
tox_env: "plugins"
161151

162152
- name: "docs"
163-
python: "3.7"
153+
python: "3.8"
164154
os: ubuntu-latest
165155
tox_env: "docs"
166156
- name: "doctesting"
167-
python: "3.7"
157+
python: "3.8"
168158
os: ubuntu-latest
169159
tox_env: "doctesting"
170160
use_coverage: true

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 23.3.0
3+
rev: 23.7.0
44
hooks:
55
- id: black
66
args: [--safe, --quiet]
77
- repo: https://github.com/asottile/blacken-docs
8-
rev: 1.14.0
8+
rev: 1.15.0
99
hooks:
1010
- id: blacken-docs
11-
additional_dependencies: [black==23.1.0]
11+
additional_dependencies: [black==23.7.0]
1212
- repo: https://github.com/pre-commit/pre-commit-hooks
1313
rev: v4.4.0
1414
hooks:
@@ -40,14 +40,14 @@ repos:
4040
rev: v3.10.0
4141
hooks:
4242
- id: reorder-python-imports
43-
args: ['--application-directories=.:src', --py37-plus]
43+
args: ['--application-directories=.:src', --py38-plus]
4444
- repo: https://github.com/asottile/pyupgrade
45-
rev: v3.7.0
45+
rev: v3.9.0
4646
hooks:
4747
- id: pyupgrade
48-
args: [--py37-plus]
48+
args: [--py38-plus]
4949
- repo: https://github.com/asottile/setup-cfg-fmt
50-
rev: v2.3.0
50+
rev: v2.4.0
5151
hooks:
5252
- id: setup-cfg-fmt
5353
args: ["--max-py-version=3.12", "--include-version-classifiers"]

AUTHORS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Adam Johnson
1111
Adam Stewart
1212
Adam Uhlir
1313
Ahn Ki-Wook
14+
Akhilesh Ramakrishnan
1415
Akiomi Kamakura
1516
Alan Velasco
1617
Alessio Izzo
@@ -262,6 +263,7 @@ Mickey Pashov
262263
Mihai Capotă
263264
Mike Hoyle (hoylemd)
264265
Mike Lundy
266+
Milan Lesnek
265267
Miro Hrončok
266268
Nathaniel Compton
267269
Nathaniel Waisbrot
@@ -311,6 +313,7 @@ Raphael Pierzina
311313
Rafal Semik
312314
Raquel Alegre
313315
Ravi Chandra
316+
Reagan Lee
314317
Robert Holt
315318
Roberto Aldera
316319
Roberto Polli
@@ -372,6 +375,7 @@ Tomer Keren
372375
Tony Narlock
373376
Tor Colvin
374377
Trevor Bekolay
378+
Tushar Sadhwani
375379
Tyler Goodlet
376380
Tzu-ping Chung
377381
Vasily Kuznetsov

CONTRIBUTING.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ Short version
201201
#. Follow **PEP-8** for naming and `black <https://github.com/psf/black>`_ for formatting.
202202
#. Tests are run using ``tox``::
203203

204-
tox -e linting,py37
204+
tox -e linting,py39
205205

206206
The test environments above are usually enough to cover most cases locally.
207207

@@ -272,24 +272,24 @@ Here is a simple overview, with pytest-specific bits:
272272

273273
#. Run all the tests
274274

275-
You need to have Python 3.7 available in your system. Now
275+
You need to have Python 3.8 or later available in your system. Now
276276
running tests is as simple as issuing this command::
277277

278-
$ tox -e linting,py37
278+
$ tox -e linting,py39
279279

280-
This command will run tests via the "tox" tool against Python 3.7
280+
This command will run tests via the "tox" tool against Python 3.9
281281
and also perform "lint" coding-style checks.
282282

283283
#. You can now edit your local working copy and run the tests again as necessary. Please follow PEP-8 for naming.
284284

285-
You can pass different options to ``tox``. For example, to run tests on Python 3.7 and pass options to pytest
285+
You can pass different options to ``tox``. For example, to run tests on Python 3.9 and pass options to pytest
286286
(e.g. enter pdb on failure) to pytest you can do::
287287

288-
$ tox -e py37 -- --pdb
288+
$ tox -e py39 -- --pdb
289289

290-
Or to only run tests in a particular test module on Python 3.7::
290+
Or to only run tests in a particular test module on Python 3.9::
291291

292-
$ tox -e py37 -- testing/test_config.py
292+
$ tox -e py39 -- testing/test_config.py
293293

294294

295295
When committing, ``pre-commit`` will re-format the files if necessary.

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ Features
100100
- Can run `unittest <https://docs.pytest.org/en/stable/how-to/unittest.html>`_ (or trial),
101101
`nose <https://docs.pytest.org/en/stable/how-to/nose.html>`_ test suites out of the box
102102

103-
- Python 3.7+ or PyPy3
103+
- Python 3.8+ or PyPy3
104104

105105
- Rich plugin architecture, with over 850+ `external plugins <https://docs.pytest.org/en/latest/reference/plugin_list.html>`_ and thriving community
106106

changelog/10337.bugfix.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fixed that fake intermediate modules generated by ``--import-mode=importlib`` would not include the
2+
child modules as attributes of the parent modules.

changelog/10447.bugfix.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
markers are now considered in the reverse mro order to ensure base class markers are considered first
2+
this resolves a regression.

changelog/10701.bugfix.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
:meth:`pytest.WarningsRecorder.pop` will return the most-closely-matched warning in the list,
2+
rather than the first warning which is an instance of the requested type.

changelog/10702.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed error assertion handling in :func:`pytest.approx` when ``None`` is an expected or received value when comparing dictionaries.

0 commit comments

Comments
 (0)