Skip to content

Commit

Permalink
Merge branch 'main' into feature/doc-typing-12842
Browse files Browse the repository at this point in the history
  • Loading branch information
mwychung authored Nov 29, 2024
2 parents 1d944c4 + b938e70 commit 310b7d5
Show file tree
Hide file tree
Showing 95 changed files with 902 additions and 576 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/prepare-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"
python-version: "3.x"

- name: Install dependencies
run: |
Expand Down
105 changes: 60 additions & 45 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,24 @@ jobs:
fail-fast: false
matrix:
name: [
"windows-py38",
"windows-py38-pluggy",
"windows-py39",
"windows-py39-unittestextras",
"windows-py39-pluggy",
"windows-py39-xdist",
"windows-py310",
"windows-py311",
"windows-py312",
"windows-py313",

"ubuntu-py38",
"ubuntu-py38-pluggy",
"ubuntu-py38-freeze",
"ubuntu-py39",
"ubuntu-py310",
"ubuntu-py39-lsof-numpy-pexpect",
"ubuntu-py39-pluggy",
"ubuntu-py39-freeze",
"ubuntu-py39-xdist",
"ubuntu-py310-xdist",
"ubuntu-py311",
"ubuntu-py312",
"ubuntu-py313",
"ubuntu-pypy3",
"ubuntu-py313-pexpect",
"ubuntu-pypy3-xdist",

"macos-py38",
"macos-py39",
"macos-py310",
"macos-py312",
Expand All @@ -83,106 +82,122 @@ jobs:
]

include:
- name: "windows-py38"
python: "3.8"
- name: "windows-py39-unittestextras"
python: "3.9"
os: windows-latest
tox_env: "py38-unittestextras"
tox_env: "py39-unittestextras"
use_coverage: true
- name: "windows-py38-pluggy"
python: "3.8"

- name: "windows-py39-pluggy"
python: "3.9"
os: windows-latest
tox_env: "py38-pluggymain-pylib-xdist"
- name: "windows-py39"
tox_env: "py39-pluggymain-pylib-xdist"

- name: "windows-py39-xdist"
python: "3.9"
os: windows-latest
tox_env: "py39-xdist"

- name: "windows-py310"
python: "3.10"
os: windows-latest
tox_env: "py310-xdist"

- name: "windows-py311"
python: "3.11"
os: windows-latest
tox_env: "py311"

- name: "windows-py312"
python: "3.12"
os: windows-latest
tox_env: "py312"

- name: "windows-py313"
python: "3.13-dev"
python: "3.13"
os: windows-latest
tox_env: "py313"

- name: "ubuntu-py38"
python: "3.8"

- name: "ubuntu-py39-lsof-numpy-pexpect"
python: "3.9"
os: ubuntu-latest
tox_env: "py38-lsof-numpy-pexpect"
use_coverage: true
- name: "ubuntu-py38-pluggy"
python: "3.8"
tox_env: "py39-lsof-numpy-pexpect"

- name: "ubuntu-py39-pluggy"
python: "3.9"
os: ubuntu-latest
tox_env: "py38-pluggymain-pylib-xdist"
- name: "ubuntu-py38-freeze"
python: "3.8"
tox_env: "py39-pluggymain-pylib-xdist"

- name: "ubuntu-py39-freeze"
python: "3.9"
os: ubuntu-latest
tox_env: "py38-freeze"
- name: "ubuntu-py39"
tox_env: "py39-freeze"

- name: "ubuntu-py39-xdist"
python: "3.9"
os: ubuntu-latest
tox_env: "py39-xdist"
- name: "ubuntu-py310"

- name: "ubuntu-py310-xdist"
python: "3.10"
os: ubuntu-latest
tox_env: "py310-xdist"

- name: "ubuntu-py311"
python: "3.11"
os: ubuntu-latest
tox_env: "py311"
use_coverage: true

- name: "ubuntu-py312"
python: "3.12"
os: ubuntu-latest
tox_env: "py312"
use_coverage: true
- name: "ubuntu-py313"
python: "3.13-dev"

- name: "ubuntu-py313-pexpect"
python: "3.13"
os: ubuntu-latest
tox_env: "py313-pexpect"
use_coverage: true
- name: "ubuntu-pypy3"

- name: "ubuntu-pypy3-xdist"
python: "pypy-3.9"
os: ubuntu-latest
tox_env: "pypy3-xdist"

- name: "macos-py38"
python: "3.8"
os: macos-latest
tox_env: "py38-xdist"

- name: "macos-py39"
python: "3.9"
os: macos-latest
tox_env: "py39-xdist"
use_coverage: true

- name: "macos-py310"
python: "3.10"
os: macos-latest
tox_env: "py310-xdist"

- name: "macos-py312"
python: "3.12"
os: macos-latest
tox_env: "py312-xdist"

- name: "macos-py313"
python: "3.13-dev"
python: "3.13"
os: macos-latest
tox_env: "py313-xdist"


- name: "plugins"
python: "3.12"
os: ubuntu-latest
tox_env: "plugins"


- name: "doctesting"
python: "3.8"
python: "3.9"
os: ubuntu-latest
tox_env: "doctesting"
use_coverage: true
Expand All @@ -192,12 +207,12 @@ jobs:
contains(
fromJSON(
'[
"windows-py38-pluggy",
"windows-py39-pluggy",
"windows-py313",
"ubuntu-py38-pluggy",
"ubuntu-py38-freeze",
"ubuntu-py39-pluggy",
"ubuntu-py39-freeze",
"ubuntu-py313",
"macos-py38",
"macos-py39",
"macos-py313"
]'
),
Expand Down Expand Up @@ -246,7 +261,7 @@ jobs:

- name: Upload coverage to Codecov
if: "matrix.use_coverage"
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: false
files: ./coverage.xml
Expand Down
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.7.3"
rev: "v0.7.4"
hooks:
- id: ruff
args: ["--fix"]
Expand Down Expand Up @@ -53,6 +53,10 @@ repos:
rev: v3.19.0
hooks:
- id: pyupgrade
args:
- "--py39-plus"
# Manual because ruff does what pyupgrade does and the two are not out of sync
# often enough to make launching pyupgrade everytime worth it
stages: [manual]
- repo: local
hooks:
Expand Down
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ Kristoffer Nordström
Kyle Altendorf
Lawrence Mitchell
Lee Kamentsky
Leonardus Chen
Lev Maximov
Levon Saldamli
Lewis Cowles
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ Here is a simple overview, with pytest-specific bits:

#. Run all the tests

You need to have Python 3.8 or later available in your system. Now
You need to have Python 3.9 or later available in your system. Now
running tests is as simple as issuing this command::

$ tox -e linting,py39
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Features
- Can run `unittest <https://docs.pytest.org/en/stable/how-to/unittest.html>`_ (or trial)
test suites out of the box

- Python 3.8+ or PyPy3
- Python 3.9+ or PyPy3

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

Expand Down
1 change: 1 addition & 0 deletions changelog/10839.deprecation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Requesting an asynchronous fixture without a `pytest_fixture_setup` hook that resolves it will now give a DeprecationWarning. This most commonly happens if a sync test requests an async fixture. This should have no effect on a majority of users with async tests or fixtures using async pytest plugins, but may affect non-standard hook setups or ``autouse=True``. For guidance on how to work around this warning see :ref:`sync-test-async-fixture`.
4 changes: 4 additions & 0 deletions changelog/12535.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
`This
example`<https://docs.pytest.org/en/latest/example/simple.html#making-test-result-information-available-in-fixtures>
showed ``print`` statements that do not exactly reflect what the
different branches actually do. The fix makes the example more precise.
1 change: 1 addition & 0 deletions changelog/12849.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ANSI escape codes for colored output now handled correctly in :func:`pytest.fail` with `pytrace=False`.
1 change: 1 addition & 0 deletions changelog/12874.breaking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
We dropped support for Python 3.8 following its end of life (2024-10-07).
1 change: 1 addition & 0 deletions changelog/12943.improvement.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
If a test fails with an exceptiongroup with a single exception, the contained exception will now be displayed in the short test summary info.
3 changes: 3 additions & 0 deletions changelog/12960.breaking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Test functions containing a yield now cause an explicit error. They have not been run since pytest 4.0, and were previously marked as an expected failure and deprecation warning.

See :ref:`the docs <yield tests deprecated>` for more information.
1 change: 1 addition & 0 deletions changelog/12966.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clarify :ref:`filterwarnings` docs on filter precedence/order when using multiple :ref:`@pytest.mark.filterwarnings <pytest.mark.filterwarnings ref>` marks.
1 change: 1 addition & 0 deletions changelog/12981.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Prevent exceptions in :func:`pytest.Config.add_cleanup` callbacks preventing further cleanups.
1 change: 1 addition & 0 deletions doc/en/backwards-compatibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ Released pytest versions support all Python versions that are actively maintaine
============== ===================
pytest version min. Python version
============== ===================
8.4+ 3.9+
8.0+ 3.8+
7.1+ 3.7+
6.2 - 7.0 3.6+
Expand Down
Loading

0 comments on commit 310b7d5

Please sign in to comment.