Skip to content

Comments

Implement spy_return_list.#417

Merged
nicoddemus merged 5 commits intopytest-dev:mainfrom
frank-lenormand:feat-spy_return_list
Mar 21, 2024
Merged

Implement spy_return_list.#417
nicoddemus merged 5 commits intopytest-dev:mainfrom
frank-lenormand:feat-spy_return_list

Conversation

@frank-lenormand
Copy link
Contributor

Related to #378



@dataclass
class MockCache:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loved this refactoring. 👍

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @frank-lenormand!

I will merge and make a new release later!

@nicoddemus nicoddemus merged commit 6d5d6dc into pytest-dev:main Mar 21, 2024
nicoddemus added a commit that referenced this pull request Mar 21, 2024
The problem was introduced due to a bug in #417 which escaped review: we should always add a mock object to the cache, even if a similar one already exists.

Fix #420
github-merge-queue bot referenced this pull request in BSStudio/bss-web-file-api Mar 22, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [pytest-mock](https://togithub.com/pytest-dev/pytest-mock)
([changelog](https://pytest-mock.readthedocs.io/en/latest/changelog.html))
| `3.12.0` -> `3.14.0` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/pytest-mock/3.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/pytest-mock/3.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/pytest-mock/3.12.0/3.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/pytest-mock/3.12.0/3.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>pytest-dev/pytest-mock (pytest-mock)</summary>

###
[`v3.14.0`](https://togithub.com/pytest-dev/pytest-mock/blob/HEAD/CHANGELOG.rst#3140-2024-03-21)

[Compare
Source](https://togithub.com/pytest-dev/pytest-mock/compare/v3.13.0...v3.14.0)

- `#&#8203;415 <https://github.com/pytest-dev/pytest-mock/pull/415>`\_:
`MockType` and `AsyncMockType` can be imported from `pytest_mock` for
type annotation purposes.

- `#&#8203;420
<https://github.com/pytest-dev/pytest-mock/issues/420>`\_: Fixed a
regression which would cause `mocker.patch.object` to not being properly
cleared between tests.

###
[`v3.13.0`](https://togithub.com/pytest-dev/pytest-mock/blob/HEAD/CHANGELOG.rst#3130-2024-03-21)

[Compare
Source](https://togithub.com/pytest-dev/pytest-mock/compare/v3.12.0...v3.13.0)

- `#&#8203;417 <https://github.com/pytest-dev/pytest-mock/pull/417>`\_:
`spy` now has `spy_return_list`, which is a list containing all the
values returned by the spied function.
-   `pytest-mock` now requires `pytest>=6.2.5`.
- `#&#8203;410 <https://github.com/pytest-dev/pytest-mock/pull/410>`*:
pytest-mock's `setup.py` file is removed.
If you relied on this file, e.g. to install pytest using `setup.py
install`,
please see `Why you shouldn't invoke setup.py directly
<https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary>`*
for alternatives.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/BSStudio/bss-web-file-api).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjI2MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
github-actions bot added a commit to mikelane/reddit-get that referenced this pull request Mar 22, 2024
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from
3.12.0 to 3.14.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-mock/releases">pytest-mock's
releases</a>.</em></p>
<blockquote>
<h2>v3.14.0</h2>
<ul>
<li><a
href="https://redirect.github.com/pytest-dev/pytest-mock/pull/415">#415</a>:
<code>MockType</code> and <code>AsyncMockType</code> can be imported
from <code>pytest_mock</code> for type annotation purposes.</li>
<li><a
href="https://redirect.github.com/pytest-dev/pytest-mock/issues/420">#420</a>:
Fixed a regression which would cause <code>mocker.patch.object</code> to
not being properly cleared between tests.</li>
</ul>
<h2>v3.13.0</h2>
<ul>
<li><a
href="https://redirect.github.com/pytest-dev/pytest-mock/pull/417">#417</a>:
<code>spy</code> now has <code>spy_return_list</code>, which is a list
containing all the values returned by the spied function.</li>
<li><code>pytest-mock</code> now requires
<code>pytest&gt;=6.2.5</code>.</li>
<li><a
href="https://redirect.github.com/pytest-dev/pytest-mock/pull/410">#410</a>:
pytest-mock's <code>setup.py</code> file is removed.
If you relied on this file, e.g. to install pytest using <code>setup.py
install</code>,
please see <a
href="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary">Why
you shouldn't invoke setup.py directly</a> for alternatives.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst">pytest-mock's
changelog</a>.</em></p>
<blockquote>
<h2>3.14.0 (2024-03-21)</h2>
<ul>
<li>
<p><code>[#415](pytest-dev/pytest-mock#415)
&lt;https://github.com/pytest-dev/pytest-mock/pull/415&gt;</code>_:
<code>MockType</code> and <code>AsyncMockType</code> can be imported
from <code>pytest_mock</code> for type annotation purposes.</p>
</li>
<li>
<p><code>[#420](pytest-dev/pytest-mock#420)
&lt;https://github.com/pytest-dev/pytest-mock/issues/420&gt;</code>_:
Fixed a regression which would cause <code>mocker.patch.object</code> to
not being properly cleared between tests.</p>
</li>
</ul>
<h2>3.13.0 (2024-03-21)</h2>
<ul>
<li><code>[#417](pytest-dev/pytest-mock#417)
&lt;https://github.com/pytest-dev/pytest-mock/pull/417&gt;</code>_:
<code>spy</code> now has <code>spy_return_list</code>, which is a list
containing all the values returned by the spied function.</li>
<li><code>pytest-mock</code> now requires
<code>pytest&gt;=6.2.5</code>.</li>
<li><code>[#410](pytest-dev/pytest-mock#410)
&lt;https://github.com/pytest-dev/pytest-mock/pull/410&gt;</code><em>:
pytest-mock's <code>setup.py</code> file is removed.
If you relied on this file, e.g. to install pytest using <code>setup.py
install</code>,
please see <code>Why you shouldn't invoke setup.py directly
&lt;https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary&gt;</code></em>
for alternatives.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/8733134b6194395e9cd3c745adcc9a9c09b0279e"><code>8733134</code></a>
Update CHANGELOG for 3.14.0</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/5257e3c0df0a18bca4028daa9e6d2d91870ff576"><code>5257e3c</code></a>
Refactor MockCache to have a narrow interface</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/4faf92ae233afadac3831ab570531e540dc87830"><code>4faf92a</code></a>
Fix regression with mocker.patch not being undone correctly</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/6bd8712a14a1a11d348354318fdbad3fd9bbdb78"><code>6bd8712</code></a>
Drop pre-Python 3.8 support code</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/366966bff1e3ca2e1455d704dd59991da5593877"><code>366966b</code></a>
Export <code>MockType</code>/<code>AsyncMockType</code> for type
annotations (<a
href="https://redirect.github.com/pytest-dev/pytest-mock/issues/415">#415</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/852116b0af33db27fe595847c091631dcf059a1c"><code>852116b</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-mock/issues/418">#418</a>
from pytest-dev/release-3.13.0</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/ef9461b8b5bdcdd416841b986cf4e1d336c84266"><code>ef9461b</code></a>
Add instructions on how to start deploy from command-line</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/5b9d2858f507e04cc97a3c206f55d7d5505ae71c"><code>5b9d285</code></a>
Release 3.13.0</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/6d5d6dc2274cea96b6919a4a2a6dc7a3394ef11d"><code>6d5d6dc</code></a>
Implement <code>spy_return_list</code> (<a
href="https://redirect.github.com/pytest-dev/pytest-mock/issues/417">#417</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/dc28a0ec7b66372fbc6e0cf1bbe443ce7ca465cd"><code>dc28a0e</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/pytest-dev/pytest-mock/issues/416">#416</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest-mock/compare/v3.12.0...v3.14.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pytest-mock&package-manager=pip&previous-version=3.12.0&new-version=3.14.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
@frank-lenormand
Copy link
Contributor Author

Thank you!

github-actions bot pushed a commit to aio-libs/aiohttp that referenced this pull request Mar 22, 2024
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from
3.12.0 to 3.14.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-mock/releases">pytest-mock's
releases</a>.</em></p>
<blockquote>
<h2>v3.14.0</h2>
<ul>
<li><a
href="https://redirect.github.com/pytest-dev/pytest-mock/pull/415">#415</a>:
<code>MockType</code> and <code>AsyncMockType</code> can be imported
from <code>pytest_mock</code> for type annotation purposes.</li>
<li><a
href="https://redirect.github.com/pytest-dev/pytest-mock/issues/420">#420</a>:
Fixed a regression which would cause <code>mocker.patch.object</code> to
not being properly cleared between tests.</li>
</ul>
<h2>v3.13.0</h2>
<ul>
<li><a
href="https://redirect.github.com/pytest-dev/pytest-mock/pull/417">#417</a>:
<code>spy</code> now has <code>spy_return_list</code>, which is a list
containing all the values returned by the spied function.</li>
<li><code>pytest-mock</code> now requires
<code>pytest&gt;=6.2.5</code>.</li>
<li><a
href="https://redirect.github.com/pytest-dev/pytest-mock/pull/410">#410</a>:
pytest-mock's <code>setup.py</code> file is removed.
If you relied on this file, e.g. to install pytest using <code>setup.py
install</code>,
please see <a
href="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary">Why
you shouldn't invoke setup.py directly</a> for alternatives.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst">pytest-mock's
changelog</a>.</em></p>
<blockquote>
<h2>3.14.0 (2024-03-21)</h2>
<ul>
<li>
<p><code>[#415](pytest-dev/pytest-mock#415)
&lt;https://github.com/pytest-dev/pytest-mock/pull/415&gt;</code>_:
<code>MockType</code> and <code>AsyncMockType</code> can be imported
from <code>pytest_mock</code> for type annotation purposes.</p>
</li>
<li>
<p><code>[#420](pytest-dev/pytest-mock#420)
&lt;https://github.com/pytest-dev/pytest-mock/issues/420&gt;</code>_:
Fixed a regression which would cause <code>mocker.patch.object</code> to
not being properly cleared between tests.</p>
</li>
</ul>
<h2>3.13.0 (2024-03-21)</h2>
<ul>
<li><code>[#417](pytest-dev/pytest-mock#417)
&lt;https://github.com/pytest-dev/pytest-mock/pull/417&gt;</code>_:
<code>spy</code> now has <code>spy_return_list</code>, which is a list
containing all the values returned by the spied function.</li>
<li><code>pytest-mock</code> now requires
<code>pytest&gt;=6.2.5</code>.</li>
<li><code>[#410](pytest-dev/pytest-mock#410)
&lt;https://github.com/pytest-dev/pytest-mock/pull/410&gt;</code><em>:
pytest-mock's <code>setup.py</code> file is removed.
If you relied on this file, e.g. to install pytest using <code>setup.py
install</code>,
please see <code>Why you shouldn't invoke setup.py directly
&lt;https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary&gt;</code></em>
for alternatives.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/8733134b6194395e9cd3c745adcc9a9c09b0279e"><code>8733134</code></a>
Update CHANGELOG for 3.14.0</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/5257e3c0df0a18bca4028daa9e6d2d91870ff576"><code>5257e3c</code></a>
Refactor MockCache to have a narrow interface</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/4faf92ae233afadac3831ab570531e540dc87830"><code>4faf92a</code></a>
Fix regression with mocker.patch not being undone correctly</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/6bd8712a14a1a11d348354318fdbad3fd9bbdb78"><code>6bd8712</code></a>
Drop pre-Python 3.8 support code</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/366966bff1e3ca2e1455d704dd59991da5593877"><code>366966b</code></a>
Export <code>MockType</code>/<code>AsyncMockType</code> for type
annotations (<a
href="https://redirect.github.com/pytest-dev/pytest-mock/issues/415">#415</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/852116b0af33db27fe595847c091631dcf059a1c"><code>852116b</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-mock/issues/418">#418</a>
from pytest-dev/release-3.13.0</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/ef9461b8b5bdcdd416841b986cf4e1d336c84266"><code>ef9461b</code></a>
Add instructions on how to start deploy from command-line</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/5b9d2858f507e04cc97a3c206f55d7d5505ae71c"><code>5b9d285</code></a>
Release 3.13.0</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/6d5d6dc2274cea96b6919a4a2a6dc7a3394ef11d"><code>6d5d6dc</code></a>
Implement <code>spy_return_list</code> (<a
href="https://redirect.github.com/pytest-dev/pytest-mock/issues/417">#417</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/dc28a0ec7b66372fbc6e0cf1bbe443ce7ca465cd"><code>dc28a0e</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/pytest-dev/pytest-mock/issues/416">#416</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest-mock/compare/v3.12.0...v3.14.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pytest-mock&package-manager=pip&previous-version=3.12.0&new-version=3.14.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
JordoHeffernan pushed a commit to slalombuild/secureli that referenced this pull request Mar 22, 2024
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from
3.12.0 to 3.14.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-mock/releases">pytest-mock's
releases</a>.</em></p>
<blockquote>
<h2>v3.14.0</h2>
<ul>
<li><a
href="https://redirect.github.com/pytest-dev/pytest-mock/pull/415">#415</a>:
<code>MockType</code> and <code>AsyncMockType</code> can be imported
from <code>pytest_mock</code> for type annotation purposes.</li>
<li><a
href="https://redirect.github.com/pytest-dev/pytest-mock/issues/420">#420</a>:
Fixed a regression which would cause <code>mocker.patch.object</code> to
not being properly cleared between tests.</li>
</ul>
<h2>v3.13.0</h2>
<ul>
<li><a
href="https://redirect.github.com/pytest-dev/pytest-mock/pull/417">#417</a>:
<code>spy</code> now has <code>spy_return_list</code>, which is a list
containing all the values returned by the spied function.</li>
<li><code>pytest-mock</code> now requires
<code>pytest&gt;=6.2.5</code>.</li>
<li><a
href="https://redirect.github.com/pytest-dev/pytest-mock/pull/410">#410</a>:
pytest-mock's <code>setup.py</code> file is removed.
If you relied on this file, e.g. to install pytest using <code>setup.py
install</code>,
please see <a
href="https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary">Why
you shouldn't invoke setup.py directly</a> for alternatives.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-mock/blob/main/CHANGELOG.rst">pytest-mock's
changelog</a>.</em></p>
<blockquote>
<h2>3.14.0 (2024-03-21)</h2>
<ul>
<li>
<p><code>[#415](pytest-dev/pytest-mock#415)
&lt;https://github.com/pytest-dev/pytest-mock/pull/415&gt;</code>_:
<code>MockType</code> and <code>AsyncMockType</code> can be imported
from <code>pytest_mock</code> for type annotation purposes.</p>
</li>
<li>
<p><code>[#420](pytest-dev/pytest-mock#420)
&lt;https://github.com/pytest-dev/pytest-mock/issues/420&gt;</code>_:
Fixed a regression which would cause <code>mocker.patch.object</code> to
not being properly cleared between tests.</p>
</li>
</ul>
<h2>3.13.0 (2024-03-21)</h2>
<ul>
<li><code>[#417](pytest-dev/pytest-mock#417)
&lt;https://github.com/pytest-dev/pytest-mock/pull/417&gt;</code>_:
<code>spy</code> now has <code>spy_return_list</code>, which is a list
containing all the values returned by the spied function.</li>
<li><code>pytest-mock</code> now requires
<code>pytest&gt;=6.2.5</code>.</li>
<li><code>[#410](pytest-dev/pytest-mock#410)
&lt;https://github.com/pytest-dev/pytest-mock/pull/410&gt;</code><em>:
pytest-mock's <code>setup.py</code> file is removed.
If you relied on this file, e.g. to install pytest using <code>setup.py
install</code>,
please see <code>Why you shouldn't invoke setup.py directly
&lt;https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html#summary&gt;</code></em>
for alternatives.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/8733134b6194395e9cd3c745adcc9a9c09b0279e"><code>8733134</code></a>
Update CHANGELOG for 3.14.0</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/5257e3c0df0a18bca4028daa9e6d2d91870ff576"><code>5257e3c</code></a>
Refactor MockCache to have a narrow interface</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/4faf92ae233afadac3831ab570531e540dc87830"><code>4faf92a</code></a>
Fix regression with mocker.patch not being undone correctly</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/6bd8712a14a1a11d348354318fdbad3fd9bbdb78"><code>6bd8712</code></a>
Drop pre-Python 3.8 support code</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/366966bff1e3ca2e1455d704dd59991da5593877"><code>366966b</code></a>
Export <code>MockType</code>/<code>AsyncMockType</code> for type
annotations (<a
href="https://redirect.github.com/pytest-dev/pytest-mock/issues/415">#415</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/852116b0af33db27fe595847c091631dcf059a1c"><code>852116b</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest-mock/issues/418">#418</a>
from pytest-dev/release-3.13.0</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/ef9461b8b5bdcdd416841b986cf4e1d336c84266"><code>ef9461b</code></a>
Add instructions on how to start deploy from command-line</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/5b9d2858f507e04cc97a3c206f55d7d5505ae71c"><code>5b9d285</code></a>
Release 3.13.0</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/6d5d6dc2274cea96b6919a4a2a6dc7a3394ef11d"><code>6d5d6dc</code></a>
Implement <code>spy_return_list</code> (<a
href="https://redirect.github.com/pytest-dev/pytest-mock/issues/417">#417</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest-mock/commit/dc28a0ec7b66372fbc6e0cf1bbe443ce7ca465cd"><code>dc28a0e</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/pytest-dev/pytest-mock/issues/416">#416</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest-mock/compare/v3.12.0...v3.14.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pytest-mock&package-manager=pip&previous-version=3.12.0&new-version=3.14.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants