From 0ce709c71dd83a04aa77d94089ac0be19b9177b2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 26 May 2025 22:12:51 +0200 Subject: [PATCH 01/22] [pre-commit.ci] pre-commit autoupdate (#506) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.10 → v0.11.11](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.10...v0.11.11) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index da96096..8e9197c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: language: python additional_dependencies: [pygments, restructuredtext_lint] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.10 + rev: v0.11.11 hooks: - id: ruff args: ["--fix"] From 86c8bff32b56c6afe5ede78ad8e2aa45d9156812 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 17:59:38 -0300 Subject: [PATCH 02/22] Merge pull request #507 from pytest-dev/pre-commit-ci-update-config [pre-commit.ci] pre-commit autoupdate --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8e9197c..2f5b5cc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,13 +9,13 @@ repos: language: python additional_dependencies: [pygments, restructuredtext_lint] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.11 + rev: v0.11.12 hooks: - id: ruff args: ["--fix"] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.15.0 + rev: v1.16.0 hooks: - id: mypy files: ^(src|tests) From 4d0321ff444ecd0f45726aad36d0202f87164d8c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 Jun 2025 22:23:36 +0200 Subject: [PATCH 03/22] [pre-commit.ci] pre-commit autoupdate (#508) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.12 → v0.11.13](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.12...v0.11.13) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2f5b5cc..2cc401a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: language: python additional_dependencies: [pygments, restructuredtext_lint] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.12 + rev: v0.11.13 hooks: - id: ruff args: ["--fix"] From 6cb603c4b4396fd9d48d4b3164f4482c34622b05 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 18:28:41 -0300 Subject: [PATCH 04/22] Bump hynek/build-and-inspect-python-package in the github-actions group (#509) Bumps the github-actions group with 1 update: [hynek/build-and-inspect-python-package](https://github.com/hynek/build-and-inspect-python-package). Updates `hynek/build-and-inspect-python-package` from 2.12.0 to 2.13.0 - [Release notes](https://github.com/hynek/build-and-inspect-python-package/releases) - [Changelog](https://github.com/hynek/build-and-inspect-python-package/blob/main/CHANGELOG.md) - [Commits](https://github.com/hynek/build-and-inspect-python-package/compare/v2.12.0...v2.13.0) --- updated-dependencies: - dependency-name: hynek/build-and-inspect-python-package dependency-version: 2.13.0 dependency-type: direct:production update-type: version-update:semver-minor dependency-group: github-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/deploy.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6b97052..4f66344 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v4 - name: Build and Check Package - uses: hynek/build-and-inspect-python-package@v2.12.0 + uses: hynek/build-and-inspect-python-package@v2.13.0 with: attest-build-provenance-github: 'true' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6443b3b..1a5c642 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Build and Check Package - uses: hynek/build-and-inspect-python-package@v2.12.0 + uses: hynek/build-and-inspect-python-package@v2.13.0 with: # Disabling because this is failing currently, see #466. attest-build-provenance-github: 'false' From 0f919def8297e47ae7234ae26e9dd1f1a7be57dc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 08:23:24 -0300 Subject: [PATCH 05/22] [pre-commit.ci] pre-commit autoupdate (#511) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.13 → v0.12.0](https://github.com/astral-sh/ruff-pre-commit/compare/v0.11.13...v0.12.0) - [github.com/pre-commit/mirrors-mypy: v1.16.0 → v1.16.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.16.0...v1.16.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2cc401a..5f98db6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,13 +9,13 @@ repos: language: python additional_dependencies: [pygments, restructuredtext_lint] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.11.13 + rev: v0.12.0 hooks: - id: ruff args: ["--fix"] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.16.0 + rev: v1.16.1 hooks: - id: mypy files: ^(src|tests) From f4c5c8591b0bc161cbc24d377d60763e75c1bec5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 30 Jun 2025 18:34:43 -0300 Subject: [PATCH 06/22] [pre-commit.ci] pre-commit autoupdate (#512) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.0 → v0.12.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.0...v0.12.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5f98db6..33f601f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: language: python additional_dependencies: [pygments, restructuredtext_lint] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.0 + rev: v0.12.1 hooks: - id: ruff args: ["--fix"] From 672e3a5f77c07b7a1ab9c06870fd34b415a0bfcb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 08:43:52 +0200 Subject: [PATCH 07/22] [pre-commit.ci] pre-commit autoupdate (#513) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.1 → v0.12.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.1...v0.12.2) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 33f601f..411c429 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: language: python additional_dependencies: [pygments, restructuredtext_lint] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.1 + rev: v0.12.2 hooks: - id: ruff args: ["--fix"] From 34226337f30d42967ba449ade0c95ccdf3ad65fb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 19:34:22 -0300 Subject: [PATCH 08/22] [pre-commit.ci] pre-commit autoupdate (#514) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.2 → v0.12.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.2...v0.12.3) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 411c429..7dface3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: language: python additional_dependencies: [pygments, restructuredtext_lint] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.2 + rev: v0.12.3 hooks: - id: ruff args: ["--fix"] From 37ce139f19a1d6eaa8ded96f9a70998e2ab4b193 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sat, 26 Jul 2025 19:27:00 -0700 Subject: [PATCH 09/22] Add asyncio fixture to test_instance_async_method_spy (#516) This ensures that this test executes and passes with pytest-8.4+. pytest now throws errors [for such functions](https://github.com/pytest-dev/pytest/issues/11372) which were skipped in older versions. --- tests/test_pytest_mock.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_pytest_mock.py b/tests/test_pytest_mock.py index 1a51636..14187c2 100644 --- a/tests/test_pytest_mock.py +++ b/tests/test_pytest_mock.py @@ -524,6 +524,7 @@ def __call__(self, x): assert spy.spy_return_list == [20] +@pytest.mark.asyncio async def test_instance_async_method_spy(mocker: MockerFixture) -> None: class Foo: async def bar(self, arg): From 73b6fa58d9969b163b317ed00ad47d20fd4f6b0c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 08:26:02 -0300 Subject: [PATCH 10/22] [pre-commit.ci] pre-commit autoupdate (#515) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.3 → v0.12.5](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.3...v0.12.5) - [github.com/pre-commit/mirrors-mypy: v1.16.1 → v1.17.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.16.1...v1.17.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7dface3..3f8c4a5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,13 +9,13 @@ repos: language: python additional_dependencies: [pygments, restructuredtext_lint] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.3 + rev: v0.12.5 hooks: - id: ruff args: ["--fix"] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.16.1 + rev: v1.17.0 hooks: - id: mypy files: ^(src|tests) From 1bbdf3fee5e0559ef8961377b9778f5b36605d51 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Fri, 1 Aug 2025 14:48:29 -0300 Subject: [PATCH 11/22] Fix formatting in RELEASING.rst --- RELEASING.rst | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/RELEASING.rst b/RELEASING.rst index 2c734f1..7269d56 100644 --- a/RELEASING.rst +++ b/RELEASING.rst @@ -3,10 +3,8 @@ Here are the steps on how to make a new release. 1. Create a ``release-VERSION`` branch from ``upstream/main``. 2. Update ``CHANGELOG.rst``. 3. Push the branch to ``upstream``. -4. Once all tests pass, start the ``deploy`` workflow manually or via: +4. Once all tests pass, start the ``deploy`` workflow manually or via:: - ``` - gh workflow run deploy.yml --repo pytest-dev/pytest-mock --ref release-VERSION -f version=VERSION - ``` + gh workflow run deploy.yml --repo pytest-dev/pytest-mock --ref release-VERSION -f version=VERSION 5. Merge the PR. From 7c5031fc7aacb63851c9fe56523071a11c300b64 Mon Sep 17 00:00:00 2001 From: Kees Hink Date: Mon, 4 Aug 2025 14:51:38 +0200 Subject: [PATCH 12/22] Change 3.14.1 release date from August to May 26 (#517) https://pytest-mock.readthedocs.io/en/latest/changelog.html#id1 currently shows "3.14.1 (2025-08-26)". It's only 2025-08-04 now, so that can't be right. https://pypi.org/project/pytest-mock/#history says May 26, 2025. --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a826133..6ecdab3 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,7 +1,7 @@ Releases ======== -3.14.1 (2025-08-26) +3.14.1 (2025-05-26) ------------------- * `#503 `_: Python 3.14 is now officially supported. From ba83a70ff9c15c0b8534e7f1a7c6ba5321aea046 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 06:36:47 +0200 Subject: [PATCH 13/22] [pre-commit.ci] pre-commit autoupdate (#518) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.5 → v0.12.7](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.5...v0.12.7) - [github.com/pre-commit/mirrors-mypy: v1.17.0 → v1.17.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.17.0...v1.17.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3f8c4a5..6da4352 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,13 +9,13 @@ repos: language: python additional_dependencies: [pygments, restructuredtext_lint] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.5 + rev: v0.12.7 hooks: - id: ruff args: ["--fix"] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.17.0 + rev: v1.17.1 hooks: - id: mypy files: ^(src|tests) From e09e5be3fcaa54102006b7c01add91ac33ebf9ed Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 08:25:35 +0200 Subject: [PATCH 14/22] [pre-commit.ci] pre-commit autoupdate (#520) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.7 → v0.12.8](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.7...v0.12.8) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6da4352..d39fae5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: language: python additional_dependencies: [pygments, restructuredtext_lint] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.7 + rev: v0.12.8 hooks: - id: ruff args: ["--fix"] From 3aec7677f47f6c4b89dbdee9e4a32a8fe047943f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 22:58:46 +0200 Subject: [PATCH 15/22] [pre-commit.ci] pre-commit autoupdate (#522) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.8 → v0.12.9](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.8...v0.12.9) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d39fae5..876680b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: language: python additional_dependencies: [pygments, restructuredtext_lint] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.8 + rev: v0.12.9 hooks: - id: ruff args: ["--fix"] From f9e47b6e1685169972488391d8c2ba1d10e0901d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 20:00:37 -0300 Subject: [PATCH 16/22] Bump the github-actions group with 2 updates (#521) Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [actions/download-artifact](https://github.com/actions/download-artifact). Updates `actions/checkout` from 4 to 5 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) Updates `actions/download-artifact` from 4 to 5 - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](https://github.com/actions/download-artifact/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/download-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/deploy.yml | 6 +++--- .github/workflows/test.yml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4f66344..e8a4fab 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,7 +20,7 @@ jobs: SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.inputs.version }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Build and Check Package uses: hynek/build-and-inspect-python-package@v2.13.0 @@ -37,10 +37,10 @@ jobs: contents: write # For tag and release notes. steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Download Package - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: Packages path: dist diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1a5c642..9f5aa1d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -21,7 +21,7 @@ jobs: id-token: write attestations: write steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Build and Check Package uses: hynek/build-and-inspect-python-package@v2.13.0 with: @@ -52,10 +52,10 @@ jobs: tox_env: "norewrite" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Download Package - uses: actions/download-artifact@v4 + uses: actions/download-artifact@v5 with: name: Packages path: dist From bd66c9cb8b1ffc59b4d9e42a1b413bafa3a16eac Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 19:40:07 -0300 Subject: [PATCH 17/22] [pre-commit.ci] pre-commit autoupdate (#523) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.9 → v0.12.10](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.9...v0.12.10) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 876680b..0c802fe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: language: python additional_dependencies: [pygments, restructuredtext_lint] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.9 + rev: v0.12.10 hooks: - id: ruff args: ["--fix"] From b977d83d051390c5efd91b02884236ea5eba8ae4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Sep 2025 07:14:22 +0200 Subject: [PATCH 18/22] [pre-commit.ci] pre-commit autoupdate (#525) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.10 → v0.12.11](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.10...v0.12.11) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0c802fe..f416f4b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,7 +9,7 @@ repos: language: python additional_dependencies: [pygments, restructuredtext_lint] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.10 + rev: v0.12.11 hooks: - id: ruff args: ["--fix"] From dc6df75a91aad4980af1a711e42a2ade19960f36 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 16:04:57 -0300 Subject: [PATCH 19/22] Bump pypa/gh-action-pypi-publish in /.github/workflows (#526) Bumps [pypa/gh-action-pypi-publish](https://github.com/pypa/gh-action-pypi-publish) from 1.12.4 to 1.13.0. - [Release notes](https://github.com/pypa/gh-action-pypi-publish/releases) - [Commits](https://github.com/pypa/gh-action-pypi-publish/compare/v1.12.4...v1.13.0) --- updated-dependencies: - dependency-name: pypa/gh-action-pypi-publish dependency-version: 1.13.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index e8a4fab..3cfe123 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -46,7 +46,7 @@ jobs: path: dist - name: Publish package to PyPI - uses: pypa/gh-action-pypi-publish@v1.12.4 + uses: pypa/gh-action-pypi-publish@v1.13.0 with: attestations: true From 5aa9e9cd7e0d25403c8d9d478bc3480bb5ca2456 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Vokr=C3=A1=C4=8Dko?= Date: Thu, 4 Sep 2025 22:42:27 +0200 Subject: [PATCH 20/22] Add `spy_return_iter` attribute to `spy` (#524) --------- Co-authored-by: Bruno Oliveira --- CHANGELOG.rst | 5 +++ docs/usage.rst | 1 + src/pytest_mock/plugin.py | 10 +++++ tests/test_pytest_mock.py | 78 +++++++++++++++++++++++++++++++++++++++ 4 files changed, 94 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6ecdab3..fbf0c52 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ Releases ======== +UNRELEASED +---------- + +* `#524 `_: Added ``spy_return_iter`` to ``mocker.spy``, which contains a duplicate of the return value of the spied method if it is an ``Iterator``. + 3.14.1 (2025-05-26) ------------------- diff --git a/docs/usage.rst b/docs/usage.rst index 339746a..587fcb3 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -81,6 +81,7 @@ are available (like ``assert_called_once_with`` or ``call_count`` in the example In addition, spy objects contain two extra attributes: * ``spy_return``: contains the last returned value of the spied function. +* ``spy_return_iter``: contains a duplicate of the last returned value of the spied function if the value was an iterator. Uses `tee `__) to duplicate the iterator. * ``spy_return_list``: contains a list of all returned values of the spied function (new in ``3.13``). * ``spy_exception``: contain the last exception value raised by the spied function/method when it was last called, or ``None`` if no exception was raised. diff --git a/src/pytest_mock/plugin.py b/src/pytest_mock/plugin.py index 50dc06a..e22abc3 100644 --- a/src/pytest_mock/plugin.py +++ b/src/pytest_mock/plugin.py @@ -1,6 +1,7 @@ import builtins import functools import inspect +import itertools import unittest.mock import warnings from dataclasses import dataclass @@ -137,6 +138,8 @@ def resetall( # NOTE: The mock may be a dictionary if hasattr(mock_item.mock, "spy_return_list"): mock_item.mock.spy_return_list = [] + if hasattr(mock_item.mock, "spy_return_iter"): + mock_item.mock.spy_return_iter = None if isinstance(mock_item.mock, supports_reset_mock_with_args): mock_item.mock.reset_mock( return_value=return_value, side_effect=side_effect @@ -178,6 +181,12 @@ def wrapper(*args, **kwargs): spy_obj.spy_exception = e raise else: + if isinstance(r, Iterator): + r, duplicated_iterator = itertools.tee(r, 2) + spy_obj.spy_return_iter = duplicated_iterator + else: + spy_obj.spy_return_iter = None + spy_obj.spy_return = r spy_obj.spy_return_list.append(r) return r @@ -204,6 +213,7 @@ async def async_wrapper(*args, **kwargs): spy_obj = self.patch.object(obj, name, side_effect=wrapped, autospec=autospec) spy_obj.spy_return = None + spy_obj.spy_return_iter = None spy_obj.spy_return_list = [] spy_obj.spy_exception = None return spy_obj diff --git a/tests/test_pytest_mock.py b/tests/test_pytest_mock.py index 14187c2..174a362 100644 --- a/tests/test_pytest_mock.py +++ b/tests/test_pytest_mock.py @@ -7,6 +7,8 @@ from typing import Any from typing import Callable from typing import Generator +from typing import Iterable +from typing import Iterator from typing import Tuple from typing import Type from unittest.mock import AsyncMock @@ -265,12 +267,14 @@ def bar(self, arg): assert other.bar(arg=10) == 20 foo.bar.assert_called_once_with(arg=10) # type:ignore[attr-defined] assert foo.bar.spy_return == 20 # type:ignore[attr-defined] + assert foo.bar.spy_return_iter is None # type:ignore[attr-defined] assert foo.bar.spy_return_list == [20] # type:ignore[attr-defined] spy.assert_called_once_with(arg=10) assert spy.spy_return == 20 assert foo.bar(arg=11) == 22 assert foo.bar(arg=12) == 24 assert spy.spy_return == 24 + assert spy.spy_return_iter is None assert spy.spy_return_list == [20, 22, 24] @@ -349,11 +353,13 @@ def bar(self, x): spy = mocker.spy(Foo, "bar") assert spy.spy_return is None + assert spy.spy_return_iter is None assert spy.spy_return_list == [] assert spy.spy_exception is None Foo().bar(10) assert spy.spy_return == 30 + assert spy.spy_return_iter is None assert spy.spy_return_list == [30] assert spy.spy_exception is None @@ -363,11 +369,13 @@ def bar(self, x): with pytest.raises(ValueError): Foo().bar(0) assert spy.spy_return is None + assert spy.spy_return_iter is None assert spy.spy_return_list == [] assert str(spy.spy_exception) == "invalid x" Foo().bar(15) assert spy.spy_return == 45 + assert spy.spy_return_iter is None assert spy.spy_return_list == [45] assert spy.spy_exception is None @@ -404,6 +412,7 @@ class Foo(Base): calls = [mocker.call(foo, arg=10), mocker.call(other, arg=10)] assert spy.call_args_list == calls assert spy.spy_return == 20 + assert spy.spy_return_iter is None assert spy.spy_return_list == [20, 20] @@ -418,9 +427,11 @@ def bar(cls, arg): assert Foo.bar(arg=10) == 20 Foo.bar.assert_called_once_with(arg=10) # type:ignore[attr-defined] assert Foo.bar.spy_return == 20 # type:ignore[attr-defined] + assert Foo.bar.spy_return_iter is None # type:ignore[attr-defined] assert Foo.bar.spy_return_list == [20] # type:ignore[attr-defined] spy.assert_called_once_with(arg=10) assert spy.spy_return == 20 + assert spy.spy_return_iter is None assert spy.spy_return_list == [20] @@ -438,9 +449,11 @@ class Foo(Base): assert Foo.bar(arg=10) == 20 Foo.bar.assert_called_once_with(arg=10) # type:ignore[attr-defined] assert Foo.bar.spy_return == 20 # type:ignore[attr-defined] + assert Foo.bar.spy_return_iter is None # type:ignore[attr-defined] assert Foo.bar.spy_return_list == [20] # type:ignore[attr-defined] spy.assert_called_once_with(arg=10) assert spy.spy_return == 20 + assert spy.spy_return_iter is None assert spy.spy_return_list == [20] @@ -460,9 +473,11 @@ def bar(cls, arg): assert Foo.bar(arg=10) == 20 Foo.bar.assert_called_once_with(arg=10) # type:ignore[attr-defined] assert Foo.bar.spy_return == 20 # type:ignore[attr-defined] + assert Foo.bar.spy_return_iter is None # type:ignore[attr-defined] assert Foo.bar.spy_return_list == [20] # type:ignore[attr-defined] spy.assert_called_once_with(arg=10) assert spy.spy_return == 20 + assert spy.spy_return_iter is None assert spy.spy_return_list == [20] @@ -477,9 +492,11 @@ def bar(arg): assert Foo.bar(arg=10) == 20 Foo.bar.assert_called_once_with(arg=10) # type:ignore[attr-defined] assert Foo.bar.spy_return == 20 # type:ignore[attr-defined] + assert Foo.bar.spy_return_iter is None # type:ignore[attr-defined] assert Foo.bar.spy_return_list == [20] # type:ignore[attr-defined] spy.assert_called_once_with(arg=10) assert spy.spy_return == 20 + assert spy.spy_return_iter is None assert spy.spy_return_list == [20] @@ -497,9 +514,11 @@ class Foo(Base): assert Foo.bar(arg=10) == 20 Foo.bar.assert_called_once_with(arg=10) # type:ignore[attr-defined] assert Foo.bar.spy_return == 20 # type:ignore[attr-defined] + assert Foo.bar.spy_return_iter is None # type:ignore[attr-defined] assert Foo.bar.spy_return_list == [20] # type:ignore[attr-defined] spy.assert_called_once_with(arg=10) assert spy.spy_return == 20 + assert spy.spy_return_iter is None assert spy.spy_return_list == [20] @@ -521,9 +540,68 @@ def __call__(self, x): uut.call_like(10) spy.assert_called_once_with(10) assert spy.spy_return == 20 + assert spy.spy_return_iter is None assert spy.spy_return_list == [20] +@pytest.mark.parametrize("iterator", [(i for i in range(3)), iter([0, 1, 2])]) +def test_spy_return_iter(mocker: MockerFixture, iterator: Iterator[int]) -> None: + class Foo: + def bar(self) -> Iterator[int]: + return iterator + + foo = Foo() + spy = mocker.spy(foo, "bar") + result = list(foo.bar()) + + assert result == [0, 1, 2] + assert spy.spy_return is not None + assert spy.spy_return_iter is not None + assert list(spy.spy_return_iter) == result + + [return_value] = spy.spy_return_list + assert isinstance(return_value, Iterator) + + +@pytest.mark.parametrize("iterable", [(0, 1, 2), [0, 1, 2], range(3)]) +def test_spy_return_iter_ignore_plain_iterable( + mocker: MockerFixture, iterable: Iterable[int] +) -> None: + class Foo: + def bar(self) -> Iterable[int]: + return iterable + + foo = Foo() + spy = mocker.spy(foo, "bar") + result = foo.bar() + + assert result == iterable + assert spy.spy_return == result + assert spy.spy_return_iter is None + assert spy.spy_return_list == [result] + + +def test_spy_return_iter_resets(mocker: MockerFixture) -> None: + class Foo: + iterables: Any = [ + (i for i in range(3)), + 99, + ] + + def bar(self) -> Any: + return self.iterables.pop(0) + + foo = Foo() + spy = mocker.spy(foo, "bar") + result_iterator = list(foo.bar()) + + assert result_iterator == [0, 1, 2] + assert list(spy.spy_return_iter) == result_iterator + + assert foo.bar() == 99 + assert spy.spy_return_iter is None + + @pytest.mark.asyncio async def test_instance_async_method_spy(mocker: MockerFixture) -> None: class Foo: From 53a6190b9c793f0b1801cd8b08afd58d3436bad6 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 4 Sep 2025 17:48:02 -0300 Subject: [PATCH 21/22] Drop support for Python 3.8 --- .github/workflows/test.yml | 3 ++- CHANGELOG.rst | 1 + pyproject.toml | 3 +-- src/pytest_mock/_util.py | 2 +- src/pytest_mock/plugin.py | 24 ++++++++++-------------- tests/test_pytest_mock.py | 21 ++++++++------------- tox.ini | 3 +-- 7 files changed, 24 insertions(+), 33 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9f5aa1d..a5682d4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: strategy: fail-fast: false matrix: - python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14-dev"] + python: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] os: [ubuntu-latest, windows-latest] tox_env: ["py"] include: @@ -64,6 +64,7 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} + allow-prereleases: true - name: Install tox run: | diff --git a/CHANGELOG.rst b/CHANGELOG.rst index fbf0c52..5af245e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,7 @@ Releases UNRELEASED ---------- +* Python 3.8 (EOL) is no longer supported. * `#524 `_: Added ``spy_return_iter`` to ``mocker.spy``, which contains a duplicate of the return value of the spied method if it is an ``Iterator``. 3.14.1 (2025-05-26) diff --git a/pyproject.toml b/pyproject.toml index f73f8ff..f00d66e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ dependencies = [ "pytest>=6.2.5", ] dynamic = ["version"] -requires-python = ">=3.8" +requires-python = ">=3.9" readme = "README.rst" license = {text = "MIT"} keywords = ["pytest", "mock"] @@ -27,7 +27,6 @@ classifiers = [ "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", diff --git a/src/pytest_mock/_util.py b/src/pytest_mock/_util.py index d3a732a..ad830ca 100644 --- a/src/pytest_mock/_util.py +++ b/src/pytest_mock/_util.py @@ -15,7 +15,7 @@ def get_mock_module(config): config.getini("mock_use_standalone_module") ) if use_standalone_module: - import mock + from unittest import mock _mock_module = mock else: diff --git a/src/pytest_mock/plugin.py b/src/pytest_mock/plugin.py index e22abc3..f4dbfc3 100644 --- a/src/pytest_mock/plugin.py +++ b/src/pytest_mock/plugin.py @@ -4,19 +4,15 @@ import itertools import unittest.mock import warnings +from collections.abc import Generator +from collections.abc import Iterable +from collections.abc import Iterator +from collections.abc import Mapping from dataclasses import dataclass from dataclasses import field from typing import Any from typing import Callable -from typing import Dict -from typing import Generator -from typing import Iterable -from typing import Iterator -from typing import List -from typing import Mapping from typing import Optional -from typing import Tuple -from typing import Type from typing import TypeVar from typing import Union from typing import cast @@ -53,7 +49,7 @@ class MockCache: Cache MagicMock and Patcher instances so we can undo them later. """ - cache: List[MockCacheItem] = field(default_factory=list) + cache: list[MockCacheItem] = field(default_factory=list) def _find(self, mock: MockType) -> MockCacheItem: for mock_item in self.cache: @@ -125,7 +121,7 @@ def resetall( :param bool return_value: Reset the return_value of mocks. :param bool side_effect: Reset the side_effect of mocks. """ - supports_reset_mock_with_args: Tuple[Type[Any], ...] + supports_reset_mock_with_args: tuple[type[Any], ...] if hasattr(self, "AsyncMock"): supports_reset_mock_with_args = (self.Mock, self.AsyncMock) else: @@ -348,7 +344,7 @@ def multiple( autospec: Optional[builtins.object] = None, new_callable: Optional[builtins.object] = None, **kwargs: Any, - ) -> Dict[str, MockType]: + ) -> dict[str, MockType]: """API to mock.patch.multiple""" return self._start_patch( self.mock_module.patch.multiple, @@ -365,7 +361,7 @@ def multiple( def dict( self, in_dict: Union[Mapping[Any, Any], str], - values: Union[Mapping[Any, Any], Iterable[Tuple[Any, Any]]] = (), + values: Union[Mapping[Any, Any], Iterable[tuple[Any, Any]]] = (), clear: bool = False, **kwargs: Any, ) -> Any: @@ -477,8 +473,8 @@ def _mocker(pytestconfig: Any) -> Generator[MockerFixture, None, None]: session_mocker = pytest.fixture(scope="session")(_mocker) -_mock_module_patches = [] # type: List[Any] -_mock_module_originals = {} # type: Dict[str, Any] +_mock_module_patches: list[Any] = [] +_mock_module_originals: dict[str, Any] = {} def assert_wrapper( diff --git a/tests/test_pytest_mock.py b/tests/test_pytest_mock.py index 174a362..e9b06c8 100644 --- a/tests/test_pytest_mock.py +++ b/tests/test_pytest_mock.py @@ -3,14 +3,12 @@ import re import sys import warnings +from collections.abc import Generator +from collections.abc import Iterable +from collections.abc import Iterator from contextlib import contextmanager from typing import Any from typing import Callable -from typing import Generator -from typing import Iterable -from typing import Iterator -from typing import Tuple -from typing import Type from unittest.mock import AsyncMock from unittest.mock import MagicMock @@ -102,15 +100,15 @@ def check(mocked_rm, mocked_ls): return check -def mock_using_patch_object(mocker: MockerFixture) -> Tuple[MagicMock, MagicMock]: +def mock_using_patch_object(mocker: MockerFixture) -> tuple[MagicMock, MagicMock]: return mocker.patch.object(os, "remove"), mocker.patch.object(os, "listdir") -def mock_using_patch(mocker: MockerFixture) -> Tuple[MagicMock, MagicMock]: +def mock_using_patch(mocker: MockerFixture) -> tuple[MagicMock, MagicMock]: return mocker.patch("os.remove"), mocker.patch("os.listdir") -def mock_using_patch_multiple(mocker: MockerFixture) -> Tuple[MagicMock, MagicMock]: +def mock_using_patch_multiple(mocker: MockerFixture) -> tuple[MagicMock, MagicMock]: r = mocker.patch.multiple("os", remove=mocker.DEFAULT, listdir=mocker.DEFAULT) return r["remove"], r["listdir"] @@ -212,10 +210,7 @@ def test_mocker_resetall(mocker: MockerFixture) -> None: assert isinstance(listdir.return_value, mocker.Mock) assert open.side_effect is None - if sys.version_info >= (3, 9): - # The reset on child mocks have been implemented in 3.9 - # https://bugs.python.org/issue38932 - assert mocked_object.run.return_value != "mocked" + assert mocked_object.run.return_value != "mocked" class TestMockerStub: @@ -291,7 +286,7 @@ def bar(self, arg): ), ) def test_instance_method_spy_exception( - exc_cls: Type[BaseException], + exc_cls: type[BaseException], mocker: MockerFixture, ) -> None: class Foo: diff --git a/tox.ini b/tox.ini index f1c0e98..92bcba7 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,10 @@ [tox] minversion = 3.5.3 -envlist = py{38,39,310,311,312,313,314}, norewrite, pytest6 +envlist = py{39,310,311,312,313,314}, norewrite, pytest6 [testenv] deps = coverage - mock pytest-asyncio pytest6: pytest==6.2.5 commands = From 90b29f89e2086c139a7b4fea89202faa192ee5a9 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Thu, 4 Sep 2025 17:52:32 -0300 Subject: [PATCH 22/22] Update CHANGELOG for 3.15.0 --- CHANGELOG.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5af245e..0cde5ad 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,8 +1,10 @@ Releases ======== -UNRELEASED ----------- +3.15.0 +------ + +*2025-09-04* * Python 3.8 (EOL) is no longer supported. * `#524 `_: Added ``spy_return_iter`` to ``mocker.spy``, which contains a duplicate of the return value of the spied method if it is an ``Iterator``.