Repository navigation
Only show introspection for failures about the call arguments - #642
Merged
nicoddemus merged 1 commit intoOct 17, 2026
Merged
Conversation
The introspection compared the arguments of the mock's last call with the arguments given to the assertion, which is misleading for assertions that fail for another reason: * assert_called, assert_called_once, assert_not_called and their await counterparts take no arguments, and fail because of the call count. * assert_any_call and assert_any_await search all the calls, not only the last one. * assert_called_once_with and assert_awaited_once_with fail because of the call count when the mock was not called exactly once. These now keep only the traceback hiding. Also bind the arguments to the mock's spec signature before comparing them, like the mock does, so passing an argument by position or by keyword is not reported as a difference for autospecced mocks, and leave out the "Args:" and "Kwargs:" sections when they are empty because the plugin module is not assertion-rewritten. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nicoddemus
force-pushed
the
narrow-assert-introspection
branch
from
October 17, 2026 15:57
bf6fcb8 to
9270873
Compare
This was referenced Oct 17, 2026
Closed
Merged
tonyandrewmeyer
pushed a commit
to tonyandrewmeyer/cascade
that referenced
this pull request
Oct 21, 2026
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.16.0 to 3.17.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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/641">#641</a>: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/642">#642</a>: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/643">#643</a>: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>v3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/617">#617</a>: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/623">#623</a>: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/624">#624</a>: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/627">#627</a>: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/629">#629</a>: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/630">#630</a>: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/633">#633</a>: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#641](pytest-dev/pytest-mock#641) <https://github.com/pytest-dev/pytest-mock/pull/641></code>_: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><code>[#642](pytest-dev/pytest-mock#642) <https://github.com/pytest-dev/pytest-mock/pull/642></code>_: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><code>[#643](pytest-dev/pytest-mock#643) <https://github.com/pytest-dev/pytest-mock/pull/643></code>_: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#617](pytest-dev/pytest-mock#617) <https://github.com/pytest-dev/pytest-mock/pull/617></code>_: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><code>[#621](pytest-dev/pytest-mock#621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><code>[#621](pytest-dev/pytest-mock#621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><code>[#623](pytest-dev/pytest-mock#623) <https://github.com/pytest-dev/pytest-mock/pull/623></code>_: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><code>[#624](pytest-dev/pytest-mock#624) <https://github.com/pytest-dev/pytest-mock/pull/624></code>_: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><code>[#627](pytest-dev/pytest-mock#627) <https://github.com/pytest-dev/pytest-mock/pull/627></code>_: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><code>[#629](pytest-dev/pytest-mock#629) <https://github.com/pytest-dev/pytest-mock/pull/629></code>_: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><code>[#630](pytest-dev/pytest-mock#630) <https://github.com/pytest-dev/pytest-mock/pull/630></code>_: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><code>[#633](pytest-dev/pytest-mock#633) <https://github.com/pytest-dev/pytest-mock/pull/633></code>_: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5c2f207ca7098dde996f9bedd06e596e39b6246b"><code>5c2f207</code></a> Release 3.17.0</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/96252715fad4a0dfec1997103cc231bc1f133616"><code>9625271</code></a> Bump the minor version for releases that change existing behavior</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/34b87aeeef1d2a85be5ce4fadb0c6bc4a033c40a"><code>34b87ae</code></a> Drop introspection from assert_has_calls and assert_has_awaits (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/643">#643</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/866520f2d339c7649af56ac227ca67ed36b1e92e"><code>866520f</code></a> Only show introspection for failures about the call arguments (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/642">#642</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5ab41c143c57842456caad0029082e919fa6a95d"><code>5ab41c1</code></a> Do not chain the original mock error to wrapped assertion failures (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/641">#641</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/1916b14db224b893edf18251f26a38487eb0d6a6"><code>1916b14</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/635">#635</a> from nicoddemus/docs-contributing-resetall</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/212fcd903aeb685a3b39875be82fc84ff58ebc56"><code>212fcd9</code></a> Document resetall, the changelog format and running tests with tox</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/9374b2c3e38e3bbc2e04328f7026ae3680f0476f"><code>9374b2c</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/634">#634</a> from pytest-dev/release-3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/fab730daf4a4cfc260d8656b0467503131535a00"><code>fab730d</code></a> Release 3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/d26d41bb01e99de5c0b59156c667d46985b03470"><code>d26d41b</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/627">#627</a> from xiehuanyi/docs/async-stub-awaits-20261012-r2</li> <li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest-mock/compare/v3.16.0...v3.17.0">compare view</a></li> </ul> </details> <br /> [](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 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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
github-actions Bot
added a commit
to mikelane/reddit-get
that referenced
this pull request
Oct 21, 2026
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.16.0 to 3.17.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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/641">#641</a>: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/642">#642</a>: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/643">#643</a>: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>v3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/617">#617</a>: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/623">#623</a>: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/624">#624</a>: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/627">#627</a>: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/629">#629</a>: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/630">#630</a>: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/633">#633</a>: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#641](pytest-dev/pytest-mock#641) <https://github.com/pytest-dev/pytest-mock/pull/641></code>_: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><code>[#642](pytest-dev/pytest-mock#642) <https://github.com/pytest-dev/pytest-mock/pull/642></code>_: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><code>[#643](pytest-dev/pytest-mock#643) <https://github.com/pytest-dev/pytest-mock/pull/643></code>_: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#617](pytest-dev/pytest-mock#617) <https://github.com/pytest-dev/pytest-mock/pull/617></code>_: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><code>[#621](pytest-dev/pytest-mock#621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><code>[#621](pytest-dev/pytest-mock#621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><code>[#623](pytest-dev/pytest-mock#623) <https://github.com/pytest-dev/pytest-mock/pull/623></code>_: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><code>[#624](pytest-dev/pytest-mock#624) <https://github.com/pytest-dev/pytest-mock/pull/624></code>_: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><code>[#627](pytest-dev/pytest-mock#627) <https://github.com/pytest-dev/pytest-mock/pull/627></code>_: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><code>[#629](pytest-dev/pytest-mock#629) <https://github.com/pytest-dev/pytest-mock/pull/629></code>_: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><code>[#630](pytest-dev/pytest-mock#630) <https://github.com/pytest-dev/pytest-mock/pull/630></code>_: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><code>[#633](pytest-dev/pytest-mock#633) <https://github.com/pytest-dev/pytest-mock/pull/633></code>_: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5c2f207ca7098dde996f9bedd06e596e39b6246b"><code>5c2f207</code></a> Release 3.17.0</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/96252715fad4a0dfec1997103cc231bc1f133616"><code>9625271</code></a> Bump the minor version for releases that change existing behavior</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/34b87aeeef1d2a85be5ce4fadb0c6bc4a033c40a"><code>34b87ae</code></a> Drop introspection from assert_has_calls and assert_has_awaits (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/643">#643</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/866520f2d339c7649af56ac227ca67ed36b1e92e"><code>866520f</code></a> Only show introspection for failures about the call arguments (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/642">#642</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5ab41c143c57842456caad0029082e919fa6a95d"><code>5ab41c1</code></a> Do not chain the original mock error to wrapped assertion failures (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/641">#641</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/1916b14db224b893edf18251f26a38487eb0d6a6"><code>1916b14</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/635">#635</a> from nicoddemus/docs-contributing-resetall</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/212fcd903aeb685a3b39875be82fc84ff58ebc56"><code>212fcd9</code></a> Document resetall, the changelog format and running tests with tox</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/9374b2c3e38e3bbc2e04328f7026ae3680f0476f"><code>9374b2c</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/634">#634</a> from pytest-dev/release-3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/fab730daf4a4cfc260d8656b0467503131535a00"><code>fab730d</code></a> Release 3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/d26d41bb01e99de5c0b59156c667d46985b03470"><code>d26d41b</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/627">#627</a> from xiehuanyi/docs/async-stub-awaits-20261012-r2</li> <li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest-mock/compare/v3.16.0...v3.17.0">compare view</a></li> </ul> </details> <br /> [](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 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>
Eric-Arellano
pushed a commit
to IBM/qauvern
that referenced
this pull request
Oct 21, 2026
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.16.0 to 3.17.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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/641">#641</a>: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/642">#642</a>: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/643">#643</a>: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>v3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/617">#617</a>: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/623">#623</a>: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/624">#624</a>: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/627">#627</a>: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/629">#629</a>: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/630">#630</a>: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/633">#633</a>: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#641](pytest-dev/pytest-mock#641) <https://github.com/pytest-dev/pytest-mock/pull/641></code>_: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><code>[#642](pytest-dev/pytest-mock#642) <https://github.com/pytest-dev/pytest-mock/pull/642></code>_: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><code>[#643](pytest-dev/pytest-mock#643) <https://github.com/pytest-dev/pytest-mock/pull/643></code>_: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#617](pytest-dev/pytest-mock#617) <https://github.com/pytest-dev/pytest-mock/pull/617></code>_: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><code>[#621](pytest-dev/pytest-mock#621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><code>[#621](pytest-dev/pytest-mock#621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><code>[#623](pytest-dev/pytest-mock#623) <https://github.com/pytest-dev/pytest-mock/pull/623></code>_: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><code>[#624](pytest-dev/pytest-mock#624) <https://github.com/pytest-dev/pytest-mock/pull/624></code>_: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><code>[#627](pytest-dev/pytest-mock#627) <https://github.com/pytest-dev/pytest-mock/pull/627></code>_: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><code>[#629](pytest-dev/pytest-mock#629) <https://github.com/pytest-dev/pytest-mock/pull/629></code>_: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><code>[#630](pytest-dev/pytest-mock#630) <https://github.com/pytest-dev/pytest-mock/pull/630></code>_: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><code>[#633](pytest-dev/pytest-mock#633) <https://github.com/pytest-dev/pytest-mock/pull/633></code>_: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5c2f207ca7098dde996f9bedd06e596e39b6246b"><code>5c2f207</code></a> Release 3.17.0</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/96252715fad4a0dfec1997103cc231bc1f133616"><code>9625271</code></a> Bump the minor version for releases that change existing behavior</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/34b87aeeef1d2a85be5ce4fadb0c6bc4a033c40a"><code>34b87ae</code></a> Drop introspection from assert_has_calls and assert_has_awaits (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/643">#643</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/866520f2d339c7649af56ac227ca67ed36b1e92e"><code>866520f</code></a> Only show introspection for failures about the call arguments (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/642">#642</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5ab41c143c57842456caad0029082e919fa6a95d"><code>5ab41c1</code></a> Do not chain the original mock error to wrapped assertion failures (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/641">#641</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/1916b14db224b893edf18251f26a38487eb0d6a6"><code>1916b14</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/635">#635</a> from nicoddemus/docs-contributing-resetall</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/212fcd903aeb685a3b39875be82fc84ff58ebc56"><code>212fcd9</code></a> Document resetall, the changelog format and running tests with tox</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/9374b2c3e38e3bbc2e04328f7026ae3680f0476f"><code>9374b2c</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/634">#634</a> from pytest-dev/release-3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/fab730daf4a4cfc260d8656b0467503131535a00"><code>fab730d</code></a> Release 3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/d26d41bb01e99de5c0b59156c667d46985b03470"><code>d26d41b</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/627">#627</a> from xiehuanyi/docs/async-stub-awaits-20261012-r2</li> <li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest-mock/compare/v3.16.0...v3.17.0">compare view</a></li> </ul> </details> <br /> [](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 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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
github-actions Bot
pushed a commit
to aio-libs/aiohttp
that referenced
this pull request
Oct 21, 2026
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.16.0 to 3.17.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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/641">#641</a>: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/642">#642</a>: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/643">#643</a>: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>v3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/617">#617</a>: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/623">#623</a>: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/624">#624</a>: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/627">#627</a>: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/629">#629</a>: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/630">#630</a>: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/633">#633</a>: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#641](pytest-dev/pytest-mock#641) <https://github.com/pytest-dev/pytest-mock/pull/641></code>_: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><code>[#642](pytest-dev/pytest-mock#642) <https://github.com/pytest-dev/pytest-mock/pull/642></code>_: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><code>[#643](pytest-dev/pytest-mock#643) <https://github.com/pytest-dev/pytest-mock/pull/643></code>_: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#617](pytest-dev/pytest-mock#617) <https://github.com/pytest-dev/pytest-mock/pull/617></code>_: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><code>[#621](pytest-dev/pytest-mock#621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><code>[#621](pytest-dev/pytest-mock#621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><code>[#623](pytest-dev/pytest-mock#623) <https://github.com/pytest-dev/pytest-mock/pull/623></code>_: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><code>[#624](pytest-dev/pytest-mock#624) <https://github.com/pytest-dev/pytest-mock/pull/624></code>_: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><code>[#627](pytest-dev/pytest-mock#627) <https://github.com/pytest-dev/pytest-mock/pull/627></code>_: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><code>[#629](pytest-dev/pytest-mock#629) <https://github.com/pytest-dev/pytest-mock/pull/629></code>_: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><code>[#630](pytest-dev/pytest-mock#630) <https://github.com/pytest-dev/pytest-mock/pull/630></code>_: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><code>[#633](pytest-dev/pytest-mock#633) <https://github.com/pytest-dev/pytest-mock/pull/633></code>_: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5c2f207ca7098dde996f9bedd06e596e39b6246b"><code>5c2f207</code></a> Release 3.17.0</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/96252715fad4a0dfec1997103cc231bc1f133616"><code>9625271</code></a> Bump the minor version for releases that change existing behavior</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/34b87aeeef1d2a85be5ce4fadb0c6bc4a033c40a"><code>34b87ae</code></a> Drop introspection from assert_has_calls and assert_has_awaits (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/643">#643</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/866520f2d339c7649af56ac227ca67ed36b1e92e"><code>866520f</code></a> Only show introspection for failures about the call arguments (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/642">#642</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5ab41c143c57842456caad0029082e919fa6a95d"><code>5ab41c1</code></a> Do not chain the original mock error to wrapped assertion failures (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/641">#641</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/1916b14db224b893edf18251f26a38487eb0d6a6"><code>1916b14</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/635">#635</a> from nicoddemus/docs-contributing-resetall</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/212fcd903aeb685a3b39875be82fc84ff58ebc56"><code>212fcd9</code></a> Document resetall, the changelog format and running tests with tox</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/9374b2c3e38e3bbc2e04328f7026ae3680f0476f"><code>9374b2c</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/634">#634</a> from pytest-dev/release-3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/fab730daf4a4cfc260d8656b0467503131535a00"><code>fab730d</code></a> Release 3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/d26d41bb01e99de5c0b59156c667d46985b03470"><code>d26d41b</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/627">#627</a> from xiehuanyi/docs/async-stub-awaits-20261012-r2</li> <li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest-mock/compare/v3.16.0...v3.17.0">compare view</a></li> </ul> </details> <br /> [](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 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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
github-actions Bot
pushed a commit
to aio-libs/aiohttp
that referenced
this pull request
Oct 21, 2026
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.16.0 to 3.17.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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/641">#641</a>: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/642">#642</a>: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/643">#643</a>: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>v3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/617">#617</a>: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/623">#623</a>: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/624">#624</a>: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/627">#627</a>: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/629">#629</a>: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/630">#630</a>: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/633">#633</a>: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#641](pytest-dev/pytest-mock#641) <https://github.com/pytest-dev/pytest-mock/pull/641></code>_: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><code>[#642](pytest-dev/pytest-mock#642) <https://github.com/pytest-dev/pytest-mock/pull/642></code>_: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><code>[#643](pytest-dev/pytest-mock#643) <https://github.com/pytest-dev/pytest-mock/pull/643></code>_: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#617](pytest-dev/pytest-mock#617) <https://github.com/pytest-dev/pytest-mock/pull/617></code>_: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><code>[#621](pytest-dev/pytest-mock#621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><code>[#621](pytest-dev/pytest-mock#621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><code>[#623](pytest-dev/pytest-mock#623) <https://github.com/pytest-dev/pytest-mock/pull/623></code>_: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><code>[#624](pytest-dev/pytest-mock#624) <https://github.com/pytest-dev/pytest-mock/pull/624></code>_: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><code>[#627](pytest-dev/pytest-mock#627) <https://github.com/pytest-dev/pytest-mock/pull/627></code>_: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><code>[#629](pytest-dev/pytest-mock#629) <https://github.com/pytest-dev/pytest-mock/pull/629></code>_: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><code>[#630](pytest-dev/pytest-mock#630) <https://github.com/pytest-dev/pytest-mock/pull/630></code>_: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><code>[#633](pytest-dev/pytest-mock#633) <https://github.com/pytest-dev/pytest-mock/pull/633></code>_: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5c2f207ca7098dde996f9bedd06e596e39b6246b"><code>5c2f207</code></a> Release 3.17.0</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/96252715fad4a0dfec1997103cc231bc1f133616"><code>9625271</code></a> Bump the minor version for releases that change existing behavior</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/34b87aeeef1d2a85be5ce4fadb0c6bc4a033c40a"><code>34b87ae</code></a> Drop introspection from assert_has_calls and assert_has_awaits (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/643">#643</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/866520f2d339c7649af56ac227ca67ed36b1e92e"><code>866520f</code></a> Only show introspection for failures about the call arguments (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/642">#642</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5ab41c143c57842456caad0029082e919fa6a95d"><code>5ab41c1</code></a> Do not chain the original mock error to wrapped assertion failures (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/641">#641</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/1916b14db224b893edf18251f26a38487eb0d6a6"><code>1916b14</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/635">#635</a> from nicoddemus/docs-contributing-resetall</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/212fcd903aeb685a3b39875be82fc84ff58ebc56"><code>212fcd9</code></a> Document resetall, the changelog format and running tests with tox</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/9374b2c3e38e3bbc2e04328f7026ae3680f0476f"><code>9374b2c</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/634">#634</a> from pytest-dev/release-3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/fab730daf4a4cfc260d8656b0467503131535a00"><code>fab730d</code></a> Release 3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/d26d41bb01e99de5c0b59156c667d46985b03470"><code>d26d41b</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/627">#627</a> from xiehuanyi/docs/async-stub-awaits-20261012-r2</li> <li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest-mock/compare/v3.16.0...v3.17.0">compare view</a></li> </ul> </details> <br /> [](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 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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
github-merge-queue Bot
pushed a commit
to CDCgov/dibbs-text-to-code
that referenced
this pull request
Oct 21, 2026
Bumps [pytest-mock](https://github.com/pytest-dev/pytest-mock) from 3.15.1 to 3.17.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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/641">#641</a>: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/642">#642</a>: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/643">#643</a>: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>v3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/617">#617</a>: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/623">#623</a>: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/624">#624</a>: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/627">#627</a>: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/629">#629</a>: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/630">#630</a>: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/633">#633</a>: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</li> </ul> <h2>v3.16.0</h2> <p><em>2026-09-27</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/604">#604</a>: Fixed <code>duplicate_iterators=True</code> for async functions spied with <code>mocker.spy</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/611">#611</a>: Fixed async mock assertion introspection to use awaited arguments instead of the latest call's arguments.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/606">#606</a>: <code>mocker.resetall(return_value=True, side_effect=True)</code> now also applies to non-callable mocks, such as those returned by <code>mocker.create_autospec(SomeClass, instance=True)</code>. Previously both arguments were silently ignored for them.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/547">#547</a>: Added <code>SpyType</code> for annotating <code>mocker.spy</code> results.</li> <li>Dropped support for EOL Python 3.9.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/147">#147</a>: Removed handling of <code>RuntimeError: stop called on unstarted patcher</code>, which can no longer occur in the supported Python versions.</li> <li>Added support for Python 3.15.</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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#641](pytest-dev/pytest-mock#641) <https://github.com/pytest-dev/pytest-mock/pull/641></code>_: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><code>[#642](pytest-dev/pytest-mock#642) <https://github.com/pytest-dev/pytest-mock/pull/642></code>_: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><code>[#643](pytest-dev/pytest-mock#643) <https://github.com/pytest-dev/pytest-mock/pull/643></code>_: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#617](pytest-dev/pytest-mock#617) <https://github.com/pytest-dev/pytest-mock/pull/617></code>_: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><code>[#621](pytest-dev/pytest-mock#621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><code>[#621](pytest-dev/pytest-mock#621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><code>[#623](pytest-dev/pytest-mock#623) <https://github.com/pytest-dev/pytest-mock/pull/623></code>_: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><code>[#624](pytest-dev/pytest-mock#624) <https://github.com/pytest-dev/pytest-mock/pull/624></code>_: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><code>[#627](pytest-dev/pytest-mock#627) <https://github.com/pytest-dev/pytest-mock/pull/627></code>_: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><code>[#629](pytest-dev/pytest-mock#629) <https://github.com/pytest-dev/pytest-mock/pull/629></code>_: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><code>[#630](pytest-dev/pytest-mock#630) <https://github.com/pytest-dev/pytest-mock/pull/630></code>_: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><code>[#633](pytest-dev/pytest-mock#633) <https://github.com/pytest-dev/pytest-mock/pull/633></code>_: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</li> </ul> <h2>3.16.0</h2> <p><em>2026-09-27</em></p> <ul> <li><code>[#604](pytest-dev/pytest-mock#604) <https://github.com/pytest-dev/pytest-mock/pull/604></code>_: Fixed <code>duplicate_iterators=True</code> for async functions spied with <code>mocker.spy</code>.</li> <li><code>[#611](pytest-dev/pytest-mock#611) <https://github.com/pytest-dev/pytest-mock/pull/611></code>_: Fixed async mock assertion introspection to use awaited arguments instead of the latest call's arguments.</li> <li><code>[#606](pytest-dev/pytest-mock#606) <https://github.com/pytest-dev/pytest-mock/pull/606></code>_: <code>mocker.resetall(return_value=True, side_effect=True)</code> now also applies to non-callable mocks, such as those returned by <code>mocker.create_autospec(SomeClass, instance=True)</code>. Previously both arguments were silently ignored for them.</li> <li><code>[#547](pytest-dev/pytest-mock#547) <https://github.com/pytest-dev/pytest-mock/issues/547></code>_: Added <code>SpyType</code> for annotating <code>mocker.spy</code> results.</li> <li>Dropped support for EOL Python 3.9.</li> <li><code>[#147](pytest-dev/pytest-mock#147) <https://github.com/pytest-dev/pytest-mock/issues/147></code>_: Removed handling of <code>RuntimeError: stop called on unstarted patcher</code>, which can no longer occur in the supported Python versions.</li> <li>Added support for Python 3.15.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5c2f207ca7098dde996f9bedd06e596e39b6246b"><code>5c2f207</code></a> Release 3.17.0</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/96252715fad4a0dfec1997103cc231bc1f133616"><code>9625271</code></a> Bump the minor version for releases that change existing behavior</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/34b87aeeef1d2a85be5ce4fadb0c6bc4a033c40a"><code>34b87ae</code></a> Drop introspection from assert_has_calls and assert_has_awaits (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/643">#643</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/866520f2d339c7649af56ac227ca67ed36b1e92e"><code>866520f</code></a> Only show introspection for failures about the call arguments (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/642">#642</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5ab41c143c57842456caad0029082e919fa6a95d"><code>5ab41c1</code></a> Do not chain the original mock error to wrapped assertion failures (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/641">#641</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/1916b14db224b893edf18251f26a38487eb0d6a6"><code>1916b14</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/635">#635</a> from nicoddemus/docs-contributing-resetall</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/212fcd903aeb685a3b39875be82fc84ff58ebc56"><code>212fcd9</code></a> Document resetall, the changelog format and running tests with tox</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/9374b2c3e38e3bbc2e04328f7026ae3680f0476f"><code>9374b2c</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/634">#634</a> from pytest-dev/release-3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/fab730daf4a4cfc260d8656b0467503131535a00"><code>fab730d</code></a> Release 3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/d26d41bb01e99de5c0b59156c667d46985b03470"><code>d26d41b</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/627">#627</a> from xiehuanyi/docs/async-stub-awaits-20261012-r2</li> <li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest-mock/compare/v3.15.1...v3.17.0">compare view</a></li> </ul> </details> <br /> [](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 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] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
jkennedyvz
pushed a commit
to langchain-ai/langchain-litellm
that referenced
this pull request
Oct 23, 2026
…ates (#381) Bumps the python-deps group with 3 updates in the / directory: [pydantic](https://github.com/pydantic/pydantic), [pytest-mock](https://github.com/pytest-dev/pytest-mock) and [ruff](https://github.com/astral-sh/ruff). Updates `pydantic` from 2.14.0 to 2.14.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pydantic/pydantic/releases">pydantic's releases</a>.</em></p> <blockquote> <h2>v2.14.1 2026-10-11</h2> <h3>What's Changed</h3> <h4>Performance</h4> <ul> <li>Avoid Python tuple allocation during model fields validation by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/13955">#13955</a></li> <li>Avoid unnecessary extra dict allocation in model validation by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/13956">#13956</a></li> </ul> <h4>Fixes</h4> <ul> <li>Fix <code>arguments-v3</code> schema with variadic keywords by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/13954">#13954</a></li> <li>Fix <code>TypeError</code> on <code>ForwardRef</code> on Python 3.10.0 by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/13964">#13964</a></li> <li>Support <code>closed</code> and <code>extra_items</code> via inheritance in <code>TypedDict</code> by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/13967">#13967</a></li> <li>Enforce the <code>max_digits</code> whole-digits limit in the Python <code>Decimal</code> validator by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/13972">#13972</a></li> <li>Reject out-of-range int inputs for <code>timedelta</code> by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/13973">#13973</a></li> <li>Support named tuples in <code>Sequence</code> validation by <a href="https://github.com/Viicos"><code>@Viicos</code></a> in <a href="https://redirect.github.com/pydantic/pydantic/pull/13978">#13978</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/pydantic/pydantic/compare/v2.14.0...v2.14.1">https://github.com/pydantic/pydantic/compare/v2.14.0...v2.14.1</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pydantic/pydantic/blob/main/HISTORY.md">pydantic's changelog</a>.</em></p> <blockquote> <!-- raw HTML omitted --> <!-- raw HTML omitted --> <!-- raw HTML omitted --> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pydantic/pydantic/commit/b2212c787fb5c73386dc770681ec49cd09da8e73"><code>b2212c7</code></a> Prepare release v2.14.1</li> <li><a href="https://github.com/pydantic/pydantic/commit/968fb2b6eed196a3f17ca9a3aa4697b518614531"><code>968fb2b</code></a> Fix docs conversion table</li> <li><a href="https://github.com/pydantic/pydantic/commit/6adc8b3f6146cabf290bdefd51c87486dd659091"><code>6adc8b3</code></a> Support named tuples in <code>Sequence</code> validation</li> <li><a href="https://github.com/pydantic/pydantic/commit/7637fbc31c91f86870c3b34d220d5b7fd62c54db"><code>7637fbc</code></a> Reject out-of-range int inputs for <code>timedelta</code></li> <li><a href="https://github.com/pydantic/pydantic/commit/dfdbfcb5fa6cf0ae291cb8aebc5bf2153670fe9c"><code>dfdbfcb</code></a> Enforce the <code>max_digits</code> whole-digits limit in the Python <code>Decimal</code> validator</li> <li><a href="https://github.com/pydantic/pydantic/commit/e2456d3161d0969b917fc769b2e06b7e076cb886"><code>e2456d3</code></a> Support <code>closed</code> and <code>extra_items</code> via inheritance in <code>TypedDict</code></li> <li><a href="https://github.com/pydantic/pydantic/commit/317655dfe022ebfc818c8e8e744b671fe53d8c3f"><code>317655d</code></a> Harden CI security</li> <li><a href="https://github.com/pydantic/pydantic/commit/3ba1dd48939542a04748a9bcfd3248496fa0bcc5"><code>3ba1dd4</code></a> Fix <code>TypeError</code> on <code>ForwardRef</code> on Python 3.10.0</li> <li><a href="https://github.com/pydantic/pydantic/commit/43681abc488119808fcdae2f60cadd5520ceed26"><code>43681ab</code></a> Bump <code>samuelcolvin/check-python-version</code> action to v5.1</li> <li><a href="https://github.com/pydantic/pydantic/commit/d6bc53a8559d93814009eb2043db133a90f7f921"><code>d6bc53a</code></a> Avoid unnecessary extra dict allocation in model validation</li> <li>See full diff in <a href="https://github.com/pydantic/pydantic/compare/v2.14.0...v2.14.1">compare view</a></li> </ul> </details> <br /> Updates `pytest-mock` from 3.16.0 to 3.17.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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/641">#641</a>: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/642">#642</a>: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/643">#643</a>: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>v3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/617">#617</a>: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/623">#623</a>: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/624">#624</a>: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/627">#627</a>: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/629">#629</a>: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/630">#630</a>: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/633">#633</a>: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#641](pytest-dev/pytest-mock#641) <https://github.com/pytest-dev/pytest-mock/pull/641></code>_: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><code>[#642](pytest-dev/pytest-mock#642) <https://github.com/pytest-dev/pytest-mock/pull/642></code>_: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><code>[#643](pytest-dev/pytest-mock#643) <https://github.com/pytest-dev/pytest-mock/pull/643></code>_: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#617](pytest-dev/pytest-mock#617) <https://github.com/pytest-dev/pytest-mock/pull/617></code>_: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><code>[#621](pytest-dev/pytest-mock#621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><code>[#621](pytest-dev/pytest-mock#621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><code>[#623](pytest-dev/pytest-mock#623) <https://github.com/pytest-dev/pytest-mock/pull/623></code>_: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><code>[#624](pytest-dev/pytest-mock#624) <https://github.com/pytest-dev/pytest-mock/pull/624></code>_: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><code>[#627](pytest-dev/pytest-mock#627) <https://github.com/pytest-dev/pytest-mock/pull/627></code>_: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><code>[#629](pytest-dev/pytest-mock#629) <https://github.com/pytest-dev/pytest-mock/pull/629></code>_: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><code>[#630](pytest-dev/pytest-mock#630) <https://github.com/pytest-dev/pytest-mock/pull/630></code>_: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><code>[#633](pytest-dev/pytest-mock#633) <https://github.com/pytest-dev/pytest-mock/pull/633></code>_: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5c2f207ca7098dde996f9bedd06e596e39b6246b"><code>5c2f207</code></a> Release 3.17.0</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/96252715fad4a0dfec1997103cc231bc1f133616"><code>9625271</code></a> Bump the minor version for releases that change existing behavior</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/34b87aeeef1d2a85be5ce4fadb0c6bc4a033c40a"><code>34b87ae</code></a> Drop introspection from assert_has_calls and assert_has_awaits (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/643">#643</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/866520f2d339c7649af56ac227ca67ed36b1e92e"><code>866520f</code></a> Only show introspection for failures about the call arguments (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/642">#642</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5ab41c143c57842456caad0029082e919fa6a95d"><code>5ab41c1</code></a> Do not chain the original mock error to wrapped assertion failures (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/641">#641</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/1916b14db224b893edf18251f26a38487eb0d6a6"><code>1916b14</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/635">#635</a> from nicoddemus/docs-contributing-resetall</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/212fcd903aeb685a3b39875be82fc84ff58ebc56"><code>212fcd9</code></a> Document resetall, the changelog format and running tests with tox</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/9374b2c3e38e3bbc2e04328f7026ae3680f0476f"><code>9374b2c</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/634">#634</a> from pytest-dev/release-3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/fab730daf4a4cfc260d8656b0467503131535a00"><code>fab730d</code></a> Release 3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/d26d41bb01e99de5c0b59156c667d46985b03470"><code>d26d41b</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/627">#627</a> from xiehuanyi/docs/async-stub-awaits-20261012-r2</li> <li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest-mock/compare/v3.16.0...v3.17.0">compare view</a></li> </ul> </details> <br /> Updates `ruff` from 0.17.0 to 0.17.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/releases">ruff's releases</a>.</em></p> <blockquote> <h2>0.17.1</h2> <h2>Release Notes</h2> <p>Released on 2026-10-15.</p> <h3>Preview features</h3> <ul> <li>[<code>pycodestyle</code>] Don't treat <code>None</code>, <code>True</code>, or <code>False</code> as keywords (<code>E271</code>-<code>E274</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/29322">#29322</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>Fix dedent with multiple leading comments (<a href="https://redirect.github.com/astral-sh/ruff/pull/29382">#29382</a>)</li> <li>[<code>flake8-pyi</code>] Detect legacy positional-only parameters in <code>__new__</code> methods (<code>PYI063</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/28502">#28502</a>)</li> <li>[<code>flake8-pyi</code>] Fix false positives on quoted annotations (<code>PYI036</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/29274">#29274</a>)</li> <li>[<code>perflint</code>] Avoid invalid comprehension suggestions (<code>PERF401</code>, <code>PERF403</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/29366">#29366</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>Treat more <code>collections</code> and <code>weakref</code> containers as mutable (<a href="https://redirect.github.com/astral-sh/ruff/pull/29213">#29213</a>)</li> </ul> <h3>Documentation</h3> <ul> <li>[<code>flake8-import-conventions</code>] Update default and example <code>aliases</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/29333">#29333</a>)</li> </ul> <h3>Contributors</h3> <ul> <li><a href="https://github.com/fixfon"><code>@fixfon</code></a></li> <li><a href="https://github.com/mmaxjr"><code>@mmaxjr</code></a></li> <li><a href="https://github.com/joshuavetos"><code>@joshuavetos</code></a></li> <li><a href="https://github.com/nekomario28"><code>@nekomario28</code></a></li> <li><a href="https://github.com/ntBre"><code>@ntBre</code></a></li> <li><a href="https://github.com/shan3520"><code>@shan3520</code></a></li> </ul> <h2>Install ruff 0.17.1</h2> <h3>Install prebuilt binaries via shell script</h3> <pre lang="sh"><code>curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.17.1/ruff-installer.sh | sh </code></pre> <h3>Install prebuilt binaries via powershell script</h3> <pre lang="sh"><code>powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.17.1/ruff-installer.ps1 | iex" </code></pre> <h2>Download ruff 0.17.1</h2> <p>| File | Platform | Checksum |</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's changelog</a>.</em></p> <blockquote> <h2>0.17.1</h2> <p>Released on 2026-10-15.</p> <h3>Preview features</h3> <ul> <li>[<code>pycodestyle</code>] Don't treat <code>None</code>, <code>True</code>, or <code>False</code> as keywords (<code>E271</code>-<code>E274</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/29322">#29322</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>Fix dedent with multiple leading comments (<a href="https://redirect.github.com/astral-sh/ruff/pull/29382">#29382</a>)</li> <li>[<code>flake8-pyi</code>] Detect legacy positional-only parameters in <code>__new__</code> methods (<code>PYI063</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/28502">#28502</a>)</li> <li>[<code>flake8-pyi</code>] Fix false positives on quoted annotations (<code>PYI036</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/29274">#29274</a>)</li> <li>[<code>perflint</code>] Avoid invalid comprehension suggestions (<code>PERF401</code>, <code>PERF403</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/29366">#29366</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>Treat more <code>collections</code> and <code>weakref</code> containers as mutable (<a href="https://redirect.github.com/astral-sh/ruff/pull/29213">#29213</a>)</li> </ul> <h3>Documentation</h3> <ul> <li>[<code>flake8-import-conventions</code>] Update default and example <code>aliases</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/29333">#29333</a>)</li> </ul> <h3>Contributors</h3> <ul> <li><a href="https://github.com/fixfon"><code>@fixfon</code></a></li> <li><a href="https://github.com/mmaxjr"><code>@mmaxjr</code></a></li> <li><a href="https://github.com/joshuavetos"><code>@joshuavetos</code></a></li> <li><a href="https://github.com/nekomario28"><code>@nekomario28</code></a></li> <li><a href="https://github.com/ntBre"><code>@ntBre</code></a></li> <li><a href="https://github.com/shan3520"><code>@shan3520</code></a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/astral-sh/ruff/commit/4683270c69cbdaf6ad64d3f983fc458d5a43b41f"><code>4683270</code></a> Bump version to 0.17.1 (<a href="https://redirect.github.com/astral-sh/ruff/issues/29420">#29420</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/3514027edb659bbc3c787d355be9d130e5587f15"><code>3514027</code></a> [ty] Update typing conformance suite pin (<a href="https://redirect.github.com/astral-sh/ruff/issues/29417">#29417</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/829455624d78f2e89669e4b4b14af2b96abdb1ae"><code>8294556</code></a> Update referenced PR security-review workflow (<a href="https://redirect.github.com/astral-sh/ruff/issues/29237">#29237</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/d1e1b1f69b511df4385f64b510eeec4da01c1a0e"><code>d1e1b1f</code></a> [ty] Preserve recursive aliases when rebuilding intersections (<a href="https://redirect.github.com/astral-sh/ruff/issues/29057">#29057</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/93526150df078af7dd8fc4226cdcc469539d2001"><code>9352615</code></a> [<code>perflint</code>] Avoid invalid comprehension suggestions (<code>PERF401</code>, <code>PERF403</code>) (...</li> <li><a href="https://github.com/astral-sh/ruff/commit/83a3afc3156d73ae4296f3fa74ede28e4c72bfcd"><code>83a3afc</code></a> Fix dedent with multiple leading comments (<a href="https://redirect.github.com/astral-sh/ruff/issues/29382">#29382</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/b42a8734410230f4529151782cae951b99bed858"><code>b42a873</code></a> [ty] Clarify object attribute write-contract rationale (<a href="https://redirect.github.com/astral-sh/ruff/issues/29384">#29384</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/d01678ebf594c97a7767d4372061c1f80ae5b5bb"><code>d01678e</code></a> [ty] Clarify object attribute write-contract rationale (<a href="https://redirect.github.com/astral-sh/ruff/issues/29384">#29384</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/355b42a7719d8a555e3ee50c89848b42d8a11eb5"><code>355b42a</code></a> [ty] Avoid writable override contracts from object (<a href="https://redirect.github.com/astral-sh/ruff/issues/29373">#29373</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/e26e6d2a54ac2c5e1f5b1945042de3ff3885bf8e"><code>e26e6d2</code></a> [ty] Collect intersection inference through constraint relations (<a href="https://redirect.github.com/astral-sh/ruff/issues/28677">#28677</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ruff/compare/0.17.0...0.17.1">compare view</a></li> </ul> </details> <br /> 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 show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
jkennedyvz
pushed a commit
to langchain-ai/langchain-sema4
that referenced
this pull request
Oct 23, 2026
…ectory with 2 updates (#34) Bumps the development-dependencies group with 2 updates in the /libs/sema4 directory: [pytest-mock](https://github.com/pytest-dev/pytest-mock) and [ruff](https://github.com/astral-sh/ruff). Updates `pytest-mock` from 3.16.0 to 3.17.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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/641">#641</a>: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/642">#642</a>: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/643">#643</a>: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>v3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/617">#617</a>: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/623">#623</a>: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/624">#624</a>: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/627">#627</a>: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/629">#629</a>: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/630">#630</a>: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/633">#633</a>: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#641](pytest-dev/pytest-mock#641) <https://github.com/pytest-dev/pytest-mock/pull/641></code>_: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><code>[#642](pytest-dev/pytest-mock#642) <https://github.com/pytest-dev/pytest-mock/pull/642></code>_: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><code>[#643](pytest-dev/pytest-mock#643) <https://github.com/pytest-dev/pytest-mock/pull/643></code>_: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#617](pytest-dev/pytest-mock#617) <https://github.com/pytest-dev/pytest-mock/pull/617></code>_: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><code>[#621](pytest-dev/pytest-mock#621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><code>[#621](pytest-dev/pytest-mock#621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><code>[#623](pytest-dev/pytest-mock#623) <https://github.com/pytest-dev/pytest-mock/pull/623></code>_: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><code>[#624](pytest-dev/pytest-mock#624) <https://github.com/pytest-dev/pytest-mock/pull/624></code>_: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><code>[#627](pytest-dev/pytest-mock#627) <https://github.com/pytest-dev/pytest-mock/pull/627></code>_: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><code>[#629](pytest-dev/pytest-mock#629) <https://github.com/pytest-dev/pytest-mock/pull/629></code>_: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><code>[#630](pytest-dev/pytest-mock#630) <https://github.com/pytest-dev/pytest-mock/pull/630></code>_: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><code>[#633](pytest-dev/pytest-mock#633) <https://github.com/pytest-dev/pytest-mock/pull/633></code>_: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5c2f207ca7098dde996f9bedd06e596e39b6246b"><code>5c2f207</code></a> Release 3.17.0</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/96252715fad4a0dfec1997103cc231bc1f133616"><code>9625271</code></a> Bump the minor version for releases that change existing behavior</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/34b87aeeef1d2a85be5ce4fadb0c6bc4a033c40a"><code>34b87ae</code></a> Drop introspection from assert_has_calls and assert_has_awaits (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/643">#643</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/866520f2d339c7649af56ac227ca67ed36b1e92e"><code>866520f</code></a> Only show introspection for failures about the call arguments (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/642">#642</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5ab41c143c57842456caad0029082e919fa6a95d"><code>5ab41c1</code></a> Do not chain the original mock error to wrapped assertion failures (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/641">#641</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/1916b14db224b893edf18251f26a38487eb0d6a6"><code>1916b14</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/635">#635</a> from nicoddemus/docs-contributing-resetall</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/212fcd903aeb685a3b39875be82fc84ff58ebc56"><code>212fcd9</code></a> Document resetall, the changelog format and running tests with tox</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/9374b2c3e38e3bbc2e04328f7026ae3680f0476f"><code>9374b2c</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/634">#634</a> from pytest-dev/release-3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/fab730daf4a4cfc260d8656b0467503131535a00"><code>fab730d</code></a> Release 3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/d26d41bb01e99de5c0b59156c667d46985b03470"><code>d26d41b</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/627">#627</a> from xiehuanyi/docs/async-stub-awaits-20261012-r2</li> <li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest-mock/compare/v3.16.0...v3.17.0">compare view</a></li> </ul> </details> <br /> Updates `ruff` from 0.17.0 to 0.17.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/releases">ruff's releases</a>.</em></p> <blockquote> <h2>0.17.1</h2> <h2>Release Notes</h2> <p>Released on 2026-10-15.</p> <h3>Preview features</h3> <ul> <li>[<code>pycodestyle</code>] Don't treat <code>None</code>, <code>True</code>, or <code>False</code> as keywords (<code>E271</code>-<code>E274</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/29322">#29322</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>Fix dedent with multiple leading comments (<a href="https://redirect.github.com/astral-sh/ruff/pull/29382">#29382</a>)</li> <li>[<code>flake8-pyi</code>] Detect legacy positional-only parameters in <code>__new__</code> methods (<code>PYI063</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/28502">#28502</a>)</li> <li>[<code>flake8-pyi</code>] Fix false positives on quoted annotations (<code>PYI036</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/29274">#29274</a>)</li> <li>[<code>perflint</code>] Avoid invalid comprehension suggestions (<code>PERF401</code>, <code>PERF403</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/29366">#29366</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>Treat more <code>collections</code> and <code>weakref</code> containers as mutable (<a href="https://redirect.github.com/astral-sh/ruff/pull/29213">#29213</a>)</li> </ul> <h3>Documentation</h3> <ul> <li>[<code>flake8-import-conventions</code>] Update default and example <code>aliases</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/29333">#29333</a>)</li> </ul> <h3>Contributors</h3> <ul> <li><a href="https://github.com/fixfon"><code>@fixfon</code></a></li> <li><a href="https://github.com/mmaxjr"><code>@mmaxjr</code></a></li> <li><a href="https://github.com/joshuavetos"><code>@joshuavetos</code></a></li> <li><a href="https://github.com/nekomario28"><code>@nekomario28</code></a></li> <li><a href="https://github.com/ntBre"><code>@ntBre</code></a></li> <li><a href="https://github.com/shan3520"><code>@shan3520</code></a></li> </ul> <h2>Install ruff 0.17.1</h2> <h3>Install prebuilt binaries via shell script</h3> <pre lang="sh"><code>curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.17.1/ruff-installer.sh | sh </code></pre> <h3>Install prebuilt binaries via powershell script</h3> <pre lang="sh"><code>powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.17.1/ruff-installer.ps1 | iex" </code></pre> <h2>Download ruff 0.17.1</h2> <p>| File | Platform | Checksum |</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's changelog</a>.</em></p> <blockquote> <h2>0.17.1</h2> <p>Released on 2026-10-15.</p> <h3>Preview features</h3> <ul> <li>[<code>pycodestyle</code>] Don't treat <code>None</code>, <code>True</code>, or <code>False</code> as keywords (<code>E271</code>-<code>E274</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/29322">#29322</a>)</li> </ul> <h3>Bug fixes</h3> <ul> <li>Fix dedent with multiple leading comments (<a href="https://redirect.github.com/astral-sh/ruff/pull/29382">#29382</a>)</li> <li>[<code>flake8-pyi</code>] Detect legacy positional-only parameters in <code>__new__</code> methods (<code>PYI063</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/28502">#28502</a>)</li> <li>[<code>flake8-pyi</code>] Fix false positives on quoted annotations (<code>PYI036</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/29274">#29274</a>)</li> <li>[<code>perflint</code>] Avoid invalid comprehension suggestions (<code>PERF401</code>, <code>PERF403</code>) (<a href="https://redirect.github.com/astral-sh/ruff/pull/29366">#29366</a>)</li> </ul> <h3>Rule changes</h3> <ul> <li>Treat more <code>collections</code> and <code>weakref</code> containers as mutable (<a href="https://redirect.github.com/astral-sh/ruff/pull/29213">#29213</a>)</li> </ul> <h3>Documentation</h3> <ul> <li>[<code>flake8-import-conventions</code>] Update default and example <code>aliases</code> (<a href="https://redirect.github.com/astral-sh/ruff/pull/29333">#29333</a>)</li> </ul> <h3>Contributors</h3> <ul> <li><a href="https://github.com/fixfon"><code>@fixfon</code></a></li> <li><a href="https://github.com/mmaxjr"><code>@mmaxjr</code></a></li> <li><a href="https://github.com/joshuavetos"><code>@joshuavetos</code></a></li> <li><a href="https://github.com/nekomario28"><code>@nekomario28</code></a></li> <li><a href="https://github.com/ntBre"><code>@ntBre</code></a></li> <li><a href="https://github.com/shan3520"><code>@shan3520</code></a></li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/astral-sh/ruff/commit/4683270c69cbdaf6ad64d3f983fc458d5a43b41f"><code>4683270</code></a> Bump version to 0.17.1 (<a href="https://redirect.github.com/astral-sh/ruff/issues/29420">#29420</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/3514027edb659bbc3c787d355be9d130e5587f15"><code>3514027</code></a> [ty] Update typing conformance suite pin (<a href="https://redirect.github.com/astral-sh/ruff/issues/29417">#29417</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/829455624d78f2e89669e4b4b14af2b96abdb1ae"><code>8294556</code></a> Update referenced PR security-review workflow (<a href="https://redirect.github.com/astral-sh/ruff/issues/29237">#29237</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/d1e1b1f69b511df4385f64b510eeec4da01c1a0e"><code>d1e1b1f</code></a> [ty] Preserve recursive aliases when rebuilding intersections (<a href="https://redirect.github.com/astral-sh/ruff/issues/29057">#29057</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/93526150df078af7dd8fc4226cdcc469539d2001"><code>9352615</code></a> [<code>perflint</code>] Avoid invalid comprehension suggestions (<code>PERF401</code>, <code>PERF403</code>) (...</li> <li><a href="https://github.com/astral-sh/ruff/commit/83a3afc3156d73ae4296f3fa74ede28e4c72bfcd"><code>83a3afc</code></a> Fix dedent with multiple leading comments (<a href="https://redirect.github.com/astral-sh/ruff/issues/29382">#29382</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/b42a8734410230f4529151782cae951b99bed858"><code>b42a873</code></a> [ty] Clarify object attribute write-contract rationale (<a href="https://redirect.github.com/astral-sh/ruff/issues/29384">#29384</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/d01678ebf594c97a7767d4372061c1f80ae5b5bb"><code>d01678e</code></a> [ty] Clarify object attribute write-contract rationale (<a href="https://redirect.github.com/astral-sh/ruff/issues/29384">#29384</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/355b42a7719d8a555e3ee50c89848b42d8a11eb5"><code>355b42a</code></a> [ty] Avoid writable override contracts from object (<a href="https://redirect.github.com/astral-sh/ruff/issues/29373">#29373</a>)</li> <li><a href="https://github.com/astral-sh/ruff/commit/e26e6d2a54ac2c5e1f5b1945042de3ff3885bf8e"><code>e26e6d2</code></a> [ty] Collect intersection inference through constraint relations (<a href="https://redirect.github.com/astral-sh/ruff/issues/28677">#28677</a>)</li> <li>Additional commits viewable in <a href="https://github.com/astral-sh/ruff/compare/0.17.0...0.17.1">compare view</a></li> </ul> </details> <br /> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Mohammad-Tayyab-Frequenz
pushed a commit
to Mohammad-Tayyab-Frequenz/frequenz-lib-notebooks
that referenced
this pull request
Oct 23, 2026
…es (frequenz-floss#387) Bumps the minor group with 8 updates in the / directory: | Package | From | To | | --- | --- | --- | | [flake8](https://github.com/pycqa/flake8) | `7.3.0` | `7.4.1` | | [black](https://github.com/psf/black) | `26.5.1` | `26.10.1` | | [markdown](https://github.com/Python-Markdown/markdown) | `3.10.3` | `3.11.2` | | [mypy](https://github.com/python/mypy) | `2.3.1` | `2.4.0` | | [pylint](https://github.com/pylint-dev/pylint) | `4.0.7` | `4.1.3` | | [pytest-mock](https://github.com/pytest-dev/pytest-mock) | `3.15.1` | `3.17.0` | | [setuptools](https://github.com/pypa/setuptools) | `84.0.0` | `84.2.0` | | [setuptools-scm](https://github.com/pypa/setuptools-scm) | `10.2.1` | `10.3.4` | Updates `flake8` from 7.3.0 to 7.4.1 <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/PyCQA/flake8/commit/7eccf20b526fe4f2230bf9afeeef2fc9f97faf8d"><code>7eccf20</code></a> Release 7.4.1</li> <li><a href="https://github.com/PyCQA/flake8/commit/fe7311d78073c079468b03193c7cbfac5174776c"><code>fe7311d</code></a> Merge pull request <a href="https://redirect.github.com/pycqa/flake8/issues/2057">#2057</a> from PyCQA/fix-pyflakes-4</li> <li><a href="https://github.com/PyCQA/flake8/commit/819d5e6912003135e93cd466260922b8228a1fa3"><code>819d5e6</code></a> fix pyflakes 4.x --builtins integration</li> <li><a href="https://github.com/PyCQA/flake8/commit/31405090a83cade9350502e481dcd1f032cb50b9"><code>3140509</code></a> Release 7.4.0</li> <li><a href="https://github.com/PyCQA/flake8/commit/e12e23174f10cafd7cf046d0a750c2d59fe2d451"><code>e12e231</code></a> Merge pull request <a href="https://redirect.github.com/pycqa/flake8/issues/2055">#2055</a> from PyCQA/add-315-ci</li> <li><a href="https://github.com/PyCQA/flake8/commit/f0225365d819e55379044ce347077cba3ab9f202"><code>f022536</code></a> add python 3.15 to CI</li> <li><a href="https://github.com/PyCQA/flake8/commit/07eb8ae3f15ee6eeb4d0f748f1c54f7211267fd4"><code>07eb8ae</code></a> Merge pull request <a href="https://redirect.github.com/pycqa/flake8/issues/2054">#2054</a> from PyCQA/latest-pyflakes</li> <li><a href="https://github.com/PyCQA/flake8/commit/a9e6dc227342a5cfcf5df56909370ecbc87725a3"><code>a9e6dc2</code></a> update to latest pyflakes</li> <li><a href="https://github.com/PyCQA/flake8/commit/2436eabb34f69e8ac29bdbd3f452b4509bf78644"><code>2436eab</code></a> Merge pull request <a href="https://redirect.github.com/pycqa/flake8/issues/2053">#2053</a> from PyCQA/latest-pycodestyle</li> <li><a href="https://github.com/PyCQA/flake8/commit/b44ddd48986c5e2d20e4461084a38d9b233d66c3"><code>b44ddd4</code></a> update to latest pycodestyle</li> <li>Additional commits viewable in <a href="https://github.com/pycqa/flake8/compare/7.3.0...7.4.1">compare view</a></li> </ul> </details> <br /> Updates `black` from 26.5.1 to 26.10.1 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/psf/black/releases">black's releases</a>.</em></p> <blockquote> <h2>26.10.1</h2> <h3>Highlights</h3> <p>This release fixes a security issue in Black's bundled GitHub Action. Repositories that use the action are encouraged to update to the latest version of Black immediately. This update is received automatically when using <code>psf/black@stable</code>, and is independent of the version of Black installed by the action.</p> <p>When the GitHub Action reads version specifiers from <code>tool.black.required-version</code>, it now only accepts released versions of Black, as it already did for <code>black</code> requirements in dependency lists. Other values, such as URL references, are now rejected. This issue has been registered as <code>GHSA-cg8m-r9f2-5wm2</code>; a CVE identifier is pending.</p> <h3>Stable style</h3> <ul> <li>Fix a long Jupyter notebook assignment magic (for example <code>x = !ls -la</code>) being wrapped in parentheses, which IPython can no longer run; such cells are now left unchanged (<a href="https://redirect.github.com/psf/black/issues/5481">#5481</a>)</li> <li>Keep repeated lines outside the selected <code>--line-ranges</code> unchanged (<a href="https://redirect.github.com/psf/black/issues/5436">#5436</a>)</li> <li>Fix <code>--line-ranges</code> formatting lines that follow a statement when formatting joins or re-indents that statement (<a href="https://redirect.github.com/psf/black/issues/5484">#5484</a>)</li> <li>Fix <code>--line-ranges</code> crashing with an internal error when an unselected statement has a <code># fmt: skip</code> comment on the last line before a closing bracket (<a href="https://redirect.github.com/psf/black/issues/5477">#5477</a>)</li> <li>Prevent moving an encoding declaration (for example <code># -*- coding: latin-1 -*-</code>) onto the first two lines of a file (<a href="https://redirect.github.com/psf/black/issues/5487">#5487</a>)</li> <li>Fix adding an extra trailing blank line inside a multi-line module docstring when its last line is near the line length limit (<a href="https://redirect.github.com/psf/black/issues/5494">#5494</a>)</li> </ul> <h3>Preview style</h3> <ul> <li>Do not split short expressions on delimiters (such as binary operators, comparisons, or comprehensions) inside brackets when preceded by a standalone comment (<a href="https://redirect.github.com/psf/black/issues/5455">#5455</a>)</li> <li>Fix the unstable <code>string_processing</code> feature removing backslash-newline sequences from raw strings, which changed their value (<a href="https://redirect.github.com/psf/black/issues/5482">#5482</a>)</li> <li>Avoid adding unnecessary parentheses around unbreakable right-hand side expressions in assignments (such as annotated assignments or subscript targets) (<a href="https://redirect.github.com/psf/black/issues/5473">#5473</a>)</li> <li>Parenthesize expressions with parameter comments when they exceed the line length under <code>--preview</code> (<a href="https://redirect.github.com/psf/black/issues/5442">#5442</a>)</li> <li>Fix <code>wrap_long_dict_values_in_parens</code> dropping the parentheses around a right-hand side that contains a dictionary, leaving a line over the length limit (<a href="https://redirect.github.com/psf/black/issues/5492">#5492</a>)</li> <li>Fix the unstable <code>string_processing</code> feature adding a space after <code>*</code> or <code>**</code> in a PEP 695 type parameter (<code>* Ts = ...</code>) when it splits a string in the parameter's default (<a href="https://redirect.github.com/psf/black/issues/5504">#5504</a>)</li> <li>Avoid unnecessary line splits of trailers (such as indexing/subscripts) when an earlier bracket split exceeds the line length only due to a trailing comment (<a href="https://redirect.github.com/psf/black/issues/5498">#5498</a>)</li> </ul> <h3>Configuration</h3> <ul> <li>Add <code>--cache-dir</code> to configure the cache directory from the command line (<a href="https://redirect.github.com/psf/black/issues/5433">#5433</a>)</li> <li>Don't cache a file as formatted after formatting or checking it with <code>--line-ranges</code>,</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/psf/black/blob/main/CHANGES.md">black's changelog</a>.</em></p> <blockquote> <h2>Version 26.10.1</h2> <h3>Highlights</h3> <p>This release fixes a security issue in Black's bundled GitHub Action. Repositories that use the action are encouraged to update to the latest version of Black immediately. This update is received automatically when using <code>psf/black@stable</code>, and is independent of the version of Black installed by the action.</p> <p>When the GitHub Action reads version specifiers from <code>tool.black.required-version</code>, it now only accepts released versions of Black, as it already did for <code>black</code> requirements in dependency lists. Other values, such as URL references, are now rejected. This issue has been registered as <code>GHSA-cg8m-r9f2-5wm2</code>; a CVE identifier is pending.</p> <h3>Stable style</h3> <ul> <li>Fix a long Jupyter notebook assignment magic (for example <code>x = !ls -la</code>) being wrapped in parentheses, which IPython can no longer run; such cells are now left unchanged (<a href="https://redirect.github.com/psf/black/issues/5481">#5481</a>)</li> <li>Keep repeated lines outside the selected <code>--line-ranges</code> unchanged (<a href="https://redirect.github.com/psf/black/issues/5436">#5436</a>)</li> <li>Fix <code>--line-ranges</code> formatting lines that follow a statement when formatting joins or re-indents that statement (<a href="https://redirect.github.com/psf/black/issues/5484">#5484</a>)</li> <li>Fix <code>--line-ranges</code> crashing with an internal error when an unselected statement has a <code># fmt: skip</code> comment on the last line before a closing bracket (<a href="https://redirect.github.com/psf/black/issues/5477">#5477</a>)</li> <li>Prevent moving an encoding declaration (for example <code># -*- coding: latin-1 -*-</code>) onto the first two lines of a file (<a href="https://redirect.github.com/psf/black/issues/5487">#5487</a>)</li> <li>Fix adding an extra trailing blank line inside a multi-line module docstring when its last line is near the line length limit (<a href="https://redirect.github.com/psf/black/issues/5494">#5494</a>)</li> <li>Keep the parentheses around a walrus that is the only item in a set (for example <code>{(x := f())}</code>) when targeting Python 3.9 or older, since Python 3.8 and 3.9.0 can't parse it without them (<a href="https://redirect.github.com/psf/black/issues/5502">#5502</a>)</li> </ul> <h3>Preview style</h3> <ul> <li>Do not split short expressions on delimiters (such as binary operators, comparisons, or comprehensions) inside brackets when preceded by a standalone comment (<a href="https://redirect.github.com/psf/black/issues/5455">#5455</a>)</li> <li>Fix the unstable <code>string_processing</code> feature removing backslash-newline sequences from raw strings, which changed their value (<a href="https://redirect.github.com/psf/black/issues/5482">#5482</a>)</li> <li>Avoid adding unnecessary parentheses around unbreakable right-hand side expressions in assignments (such as annotated assignments or subscript targets) (<a href="https://redirect.github.com/psf/black/issues/5473">#5473</a>)</li> <li>Parenthesize expressions with parameter comments when they exceed the line length under <code>--preview</code> (<a href="https://redirect.github.com/psf/black/issues/5442">#5442</a>)</li> <li>Fix <code>wrap_long_dict_values_in_parens</code> dropping the parentheses around a right-hand side that contains a dictionary, leaving a line over the length limit (<a href="https://redirect.github.com/psf/black/issues/5492">#5492</a>)</li> <li>Fix the unstable <code>string_processing</code> feature adding a space after <code>*</code> or <code>**</code> in a PEP 695 type parameter (<code>* Ts = ...</code>) when it splits a string in the parameter's default (<a href="https://redirect.github.com/psf/black/issues/5504">#5504</a>)</li> <li>Avoid unnecessary line splits of trailers (such as indexing/subscripts) when an earlier bracket split exceeds the line length only due to a trailing comment (<a href="https://redirect.github.com/psf/black/issues/5498">#5498</a>)</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/psf/black/commit/258e7dbf348bc23cb70b8cdf693481c04634ebcc"><code>258e7db</code></a> Prepare release 26.10.1 (<a href="https://redirect.github.com/psf/black/issues/5511">#5511</a>)</li> <li><a href="https://github.com/psf/black/commit/ac1f71563aeccf73cf13ece00f231d9d6c66a514"><code>ac1f715</code></a> Action: validate required-version better (<a href="https://redirect.github.com/psf/black/issues/5510">#5510</a>)</li> <li><a href="https://github.com/psf/black/commit/fe241ccc443acbabbd75c8240d2fbc06ba4e52d6"><code>fe241cc</code></a> Avoid splitting trailers when earlier bracket split exceeds length due to com...</li> <li><a href="https://github.com/psf/black/commit/4fb2897a7ac539cc14d993e3697469e2529a265e"><code>4fb2897</code></a> Bump actions/upload-artifact from 7.0.1 to 7.0.2 (<a href="https://redirect.github.com/psf/black/issues/5500">#5500</a>)</li> <li><a href="https://github.com/psf/black/commit/6d0f5575575dfc5d51e88a3b114816640e933388"><code>6d0f557</code></a> Bump actions/download-artifact from 8.0.1 to 8.0.2 (<a href="https://redirect.github.com/psf/black/issues/5501">#5501</a>)</li> <li><a href="https://github.com/psf/black/commit/c45f21d0399747189eedcc6c9a1614b3cf49dc0f"><code>c45f21d</code></a> Handle PEP 695 type parameter whitespace in whitespace() (<a href="https://redirect.github.com/psf/black/issues/5504">#5504</a>)</li> <li><a href="https://github.com/psf/black/commit/8ec61a7fb6f1961377afd28bbe71f8a2095916ac"><code>8ec61a7</code></a> Skip UTF-8 BOM when reading .gitignore (<a href="https://redirect.github.com/psf/black/issues/5497">#5497</a>)</li> <li><a href="https://github.com/psf/black/commit/c9b1148b5b8799758756cbec7c0d1ac187d37f1a"><code>c9b1148</code></a> Fix module docstring last_line_length when docstring ends with newline (<a href="https://redirect.github.com/psf/black/issues/5494">#5494</a>)</li> <li><a href="https://github.com/psf/black/commit/eb8835829969f82c2567119f528b188769f3ac6d"><code>eb88358</code></a> Parenthesize expressions with parameter comments in preview (<a href="https://redirect.github.com/psf/black/issues/3113">#3113</a>) (<a href="https://redirect.github.com/psf/black/issues/5442">#5442</a>)</li> <li><a href="https://github.com/psf/black/commit/939fa93a1327d2a5f2829e6c1d7e4bd25a17b0f7"><code>939fa93</code></a> Keep the parentheses around a right-hand side when a dict value's parentheses...</li> <li>Additional commits viewable in <a href="https://github.com/psf/black/compare/26.5.1...26.10.1">compare view</a></li> </ul> </details> <br /> Updates `markdown` from 3.10.3 to 3.11.2 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/Python-Markdown/markdown/releases">markdown's releases</a>.</em></p> <blockquote> <h2>Release 3.11.2</h2> <h3>Fixed</h3> <ul> <li>Sanitize attribute names in the <code>fenced_code</code> and <code>legacy_attrs</code> extensions so an attribute name cannot break out of its tag and inject markup (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1663">#1663</a>).</li> <li>For backwards compatibility, revert the enforcement of CommonMark style punctuation rules (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1657">#1657</a>).</li> </ul> <h2>Release 3.11.1</h2> <h3>Fixed</h3> <ul> <li>Update serializer to be non-recursive (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1644">#1644</a>).</li> <li>Improve ancestor handling in the inline <code>Treeprocessor</code> (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1646">#1646</a>).</li> <li>Keep a raw HTML comment inside an inline HTML element that closes in the same paragraph, instead of splitting the paragraph around it (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1643">#1643</a>).</li> <li>Fix issue where inline HTML attributes were rejected if they had <code><</code> or <code>></code> in the attribute (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1647">#1647</a>).</li> <li>Fix issue where an unterminated end tag (<code></foo</code>) could cause all remaining content to be dropped (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1651">#1651</a>).</li> <li>Complete rework of emphasis handling to improve nested emphasis handling better (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1632">#1632</a>).</li> </ul> <h2>Release 3.11.0</h2> <h3>Changed</h3> <ul> <li>Inline processors now resume searching after the previous match, improving performance for repeated inline patterns (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1619">#1619</a>).</li> <li>Officially support Python 3.15 and drop support for Python 3.10</li> <li>Walk backtick runs in <code>BacktickInlineProcessor</code> without a regex (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1620">#1620</a>).</li> <li>Switch static site generator for documentation from MkDocs to Zensical (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1627">#1627</a>, <a href="https://redirect.github.com/Python-Markdown/markdown/issues/1635">#1635</a>, <a href="https://redirect.github.com/Python-Markdown/markdown/issues/1637">#1637</a>, and <a href="https://redirect.github.com/Python-Markdown/markdown/issues/1638">#1638</a>).</li> </ul> <h3>Fixed</h3> <ul> <li>Ensure removing Abbreviations does not raise an error (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1634">#1634</a>).</li> <li>Fix an issue with excessive backtracking when matching inline code blocks (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1617">#1617</a>).</li> <li><code>md_in_html</code> now honors tags added to <code>Markdown.block_level_elements</code> after the extension is loaded (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1246">#1246</a>).</li> <li>Fix quadratic-time regex backtracking in <code>ReferenceProcessor</code> when a link reference definition has no URL, e.g. a line consisting only of <code>[id]:</code> followed by many trailing spaces (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/798">#798</a>).</li> <li>Document <code>attr_list</code> usage for <code>def_list</code> (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1123">#1123</a>).</li> </ul> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/Python-Markdown/markdown/blob/master/docs/changelog.md">markdown's changelog</a>.</em></p> <blockquote> <h2>[3.11.2] - 2026-10-19</h2> <h3>Fixed</h3> <ul> <li>Sanitize attribute names in the <code>fenced_code</code> and <code>legacy_attrs</code> extensions so an attribute name cannot break out of its tag and inject markup (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1663">#1663</a>).</li> <li>For backwards compatibility, revert the enforcement of CommonMark style punctuation rules (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1657">#1657</a>).</li> </ul> <h2>[3.11.1] - 2026-10-13</h2> <h3>Fixed</h3> <ul> <li>Update serializer to be non-recursive (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1644">#1644</a>).</li> <li>Improve ancestor handling in the inline <code>Treeprocessor</code> (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1646">#1646</a>).</li> <li>Keep a raw HTML comment inside an inline HTML element that closes in the same paragraph, instead of splitting the paragraph around it (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1643">#1643</a>).</li> <li>Fix issue where inline HTML attributes were rejected if they had <code><</code> or <code>></code> in the attribute (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1647">#1647</a>).</li> <li>Fix issue where an unterminated end tag (<code></foo</code>) could cause all remaining content to be dropped (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1651">#1651</a>).</li> <li>Complete rework of emphasis handling to improve nested emphasis handling better (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1632">#1632</a>).</li> </ul> <h2>[3.11.0] - 2026-09-25</h2> <h3>Changed</h3> <ul> <li>Inline processors now resume searching after the previous match, improving performance for repeated inline patterns (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1619">#1619</a>).</li> <li>Officially support Python 3.15 and drop support for Python 3.10</li> <li>Walk backtick runs in <code>BacktickInlineProcessor</code> without a regex (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1620">#1620</a>).</li> <li>Switch static site generator for documentation from MkDocs to Zensical (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1627">#1627</a>, <a href="https://redirect.github.com/Python-Markdown/markdown/issues/1635">#1635</a>, <a href="https://redirect.github.com/Python-Markdown/markdown/issues/1637">#1637</a>, and <a href="https://redirect.github.com/Python-Markdown/markdown/issues/1638">#1638</a>).</li> </ul> <h3>Fixed</h3> <ul> <li>Ensure removing Abbreviations does not raise an error (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1634">#1634</a>).</li> <li>Fix an issue with excessive backtracking when matching inline code blocks (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1617">#1617</a>).</li> <li><code>md_in_html</code> now honors tags added to <code>Markdown.block_level_elements</code> after the extension is loaded (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1246">#1246</a>).</li> <li>Fix quadratic-time regex backtracking in <code>ReferenceProcessor</code> when a link reference definition has no URL, e.g. a line consisting only of <code>[id]:</code> followed by many trailing spaces (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/798">#798</a>).</li> <li>Document <code>attr_list</code> usage for <code>def_list</code> (<a href="https://redirect.github.com/Python-Markdown/markdown/issues/1123">#1123</a>).</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/Python-Markdown/markdown/commit/b41e0aaf1181f1a8cb200cf5a815aad7c0020d23"><code>b41e0aa</code></a> Bump version to 3.11.2</li> <li><a href="https://github.com/Python-Markdown/markdown/commit/934c53e43774af0a24c566f4b484e4f46d2d2f0d"><code>934c53e</code></a> Add checklist of parts to PR template</li> <li><a href="https://github.com/Python-Markdown/markdown/commit/2249ffdfc9dbc2fd814456ad354777ad216a20a2"><code>2249ffd</code></a> Update AI Policy</li> <li><a href="https://github.com/Python-Markdown/markdown/commit/a27428b6f6cc74662fdd471293438eedcdf0079f"><code>a27428b</code></a> Sanitize attribute names in fenced_code and legacy_attrs</li> <li><a href="https://github.com/Python-Markdown/markdown/commit/90cdcf5f5388ceb1d58c5e22dd81cab93983d938"><code>90cdcf5</code></a> Add fixed category to changelog</li> <li><a href="https://github.com/Python-Markdown/markdown/commit/97233efa01b888ee0fa84b60ab2601bc72182277"><code>97233ef</code></a> Revert enforcement of CommonMark punctuation rules</li> <li><a href="https://github.com/Python-Markdown/markdown/commit/2258b48e551d0df7b149ea9c33969bea7c7a0a2b"><code>2258b48</code></a> Bump version to 3.11.1</li> <li><a href="https://github.com/Python-Markdown/markdown/commit/6f825aa753d672ec2d8ec5bc7b70d14b919d2fe1"><code>6f825aa</code></a> Rewrite emphasis handling</li> <li><a href="https://github.com/Python-Markdown/markdown/commit/0bf535bc406c95dad66050f07c8402af03fe07d5"><code>0bf535b</code></a> Keep a comment inside raw inline HTML in the same paragraph</li> <li><a href="https://github.com/Python-Markdown/markdown/commit/3ade80d7c2cad90c8961c80d9640d80a09afd33f"><code>3ade80d</code></a> Add playground to docs</li> <li>Additional commits viewable in <a href="https://github.com/Python-Markdown/markdown/compare/3.10.3...3.11.2">compare view</a></li> </ul> </details> <br /> Updates `mypy` from 2.3.1 to 2.4.0 <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/python/mypy/blob/master/CHANGELOG.md">mypy's changelog</a>.</em></p> <blockquote> <h1>Mypy Release Notes</h1> <h2>Next Release</h2> <h2>Mypy 2.4</h2> <p>We've just uploaded mypy 2.4.0 to the Python Package Index (<a href="https://pypi.org/project/mypy/">PyPI</a>). Mypy is a static type checker for Python. This release includes new features, performance improvements and bug fixes. You can install it as follows:</p> <pre><code>python3 -m pip install -U mypy </code></pre> <p>You can read the full documentation for this release on <a href="http://mypy.readthedocs.io">Read the Docs</a>.</p> <h3>Python 3.15 Support</h3> <p>Mypy 2.4 supports running on Python 3.15 and type checking most Python 3.15 features. This includes the new builtin <code>sentinel</code> type for sentinel values (PEP 661), which mypy now supports (see below for details). Lazy imports (PEP 810) and unpacking in comprehensions (PEP 798) are also supported. Closed TypedDicts (PEP 728) have been supported since mypy 2.2, but the <code>extra_items</code> TypedDict argument, also introduced in PEP 728, is still unsupported. Support for <code>extra_items</code> will be added in a future mypy release.</p> <h3>Native Parser Enabled by Default</h3> <p>Mypy now uses the new native parser by default. It's based on the Ruff parser, and it's significantly faster than the legacy parser, which uses the stdlib <code>ast</code> module. The native parser also has other benefits:</p> <ul> <li>You can target newer Python versions and use recent Python syntax even when running mypy on an older Python version. For example, you can use <code>--python-version 3.15</code> when running mypy on Python 3.14.</li> <li>Stub files can use syntax that is newer than the target Python version. For example, stubs can use the PEP 695 generic class syntax (<code>class Box[T]: ...</code>) when running on or targeting Python 3.10.</li> <li>Parallel type checking requires the native parser.</li> </ul> <p>The legacy parser is still available through <code>--no-native-parser</code>, or <code>native_parser = False</code> in the config file (<code>native_parser = false</code> under <code>[tool.mypy]</code> in pyproject.toml). We are planning to remove the legacy parser in early 2027. If you run into a problem with the native parser, please report it on the <a href="https://github.com/python/mypy/issues">issue tracker</a>.</p> <p>Unlike the legacy parser, the native parser doesn't support type comments for variables defined by <code>for</code> and <code>with</code> statements. These type comments are silently ignored, and the types of the variables are</p> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/python/mypy/commit/935ba8afba7ceacca0651579450c74339f343016"><code>935ba8a</code></a> Bump version to 2.4.0</li> <li><a href="https://github.com/python/mypy/commit/334a678967dc6bcda3d3f8cb82e253dd61fa2be9"><code>334a678</code></a> Add link for PR 22066 in mypy 2.4 changelog (<a href="https://redirect.github.com/python/mypy/issues/22082">#22082</a>)</li> <li><a href="https://github.com/python/mypy/commit/fe69660bcdaa76cccb1aedbb4b9c1c7627215571"><code>fe69660</code></a> Finalize mypy 2.4 changelog (<a href="https://redirect.github.com/python/mypy/issues/22080">#22080</a>)</li> <li><a href="https://github.com/python/mypy/commit/541fd87ac53581fb3c511b277fd780ec4e869c95"><code>541fd87</code></a> Various mypy 2.4 changelog updates (<a href="https://redirect.github.com/python/mypy/issues/22077">#22077</a>)</li> <li><a href="https://github.com/python/mypy/commit/b231182c0b2993918f74594236bda7d3ec6fcbe5"><code>b231182</code></a> Update native parser docs (<a href="https://redirect.github.com/python/mypy/issues/22078">#22078</a>)</li> <li><a href="https://github.com/python/mypy/commit/04fe42ce217f120a4de2c1fd62b71ef77452d699"><code>04fe42c</code></a> Initial Changelog for Mypy 2.4 (<a href="https://redirect.github.com/python/mypy/issues/22071">#22071</a>)</li> <li><a href="https://github.com/python/mypy/commit/06174941bca0e88567441ee3cb0ffaef0dd22e2c"><code>0617494</code></a> Quick fix for non UTF-8 encodings with new parser (<a href="https://redirect.github.com/python/mypy/issues/22066">#22066</a>)</li> <li><a href="https://github.com/python/mypy/commit/b2f9b60eae5ac7cd9c6a60650b128815bb703daf"><code>b2f9b60</code></a> Bump librt to 0.16.0 (<a href="https://redirect.github.com/python/mypy/issues/22067">#22067</a>)</li> <li><a href="https://github.com/python/mypy/commit/9d798dcb9589f9bd62e625a97d8db23ad9a678fa"><code>9d798dc</code></a> Sync typeshed (<a href="https://redirect.github.com/python/mypy/issues/22054">#22054</a>)</li> <li><a href="https://github.com/python/mypy/commit/0861bb6450d6d3658e44dbca9cd2ba478faf3c1d"><code>0861bb6</code></a> Reduce max protocol stack size to 20 (<a href="https://redirect.github.com/python/mypy/issues/22053">#22053</a>)</li> <li>Additional commits viewable in <a href="https://github.com/python/mypy/compare/v2.3.1...v2.4.0">compare view</a></li> </ul> </details> <br /> Updates `pylint` from 4.0.7 to 4.1.3 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pylint-dev/pylint/releases">pylint's releases</a>.</em></p> <blockquote> <h2>v4.1.3</h2> <h2>What's new in Pylint 4.1.3?</h2> <p>Release date: 2026-10-11</p> <h2>False Positives Fixed</h2> <ul> <li> <p>Fixed a false positive for <code>attribute-defined-outside-init</code> when an attribute is assigned inside the setter of an old-style, non-decorator <code>property(fget, fset)</code> call. The decorator form (<code>@property</code> / <code>@x.setter</code>) was already exempted by the fix for <a href="https://redirect.github.com/pylint-dev/pylint/issues/409">#409</a>; the classic call form was not.</p> <p>Closes <a href="https://redirect.github.com/pylint-dev/pylint/issues/3325">#3325</a></p> </li> <li> <p>Fix a false positive for <code>used-before-assignment</code> when a name bound by an earlier target of the same assignment is used by a later target, as in <code>a = b[a] = 0</code>.</p> <p>Closes <a href="https://redirect.github.com/pylint-dev/pylint/issues/5955">#5955</a></p> </li> <li> <p>Fix a <code>no-member</code> false positive in a comprehension inside a branch that cannot run, such as <code>if sys.platform == "win32":</code> on Linux. Like the rest of the branch, the comprehension is no longer checked for missing members.</p> <p>Closes <a href="https://redirect.github.com/pylint-dev/pylint/issues/7240">#7240</a></p> </li> <li> <p>Fix a false positive for <code>used-before-assignment</code> when a name bound by a tuple or list target of a <code>with</code> item is used by a later item of the same <code>with</code> statement.</p> <p>Closes <a href="https://redirect.github.com/pylint-dev/pylint/issues/7545">#7545</a></p> </li> <li> <p>Fix false positives such as <code>not-callable</code>, <code>not-an-iterable</code>, <code>unpacking-non-sequence</code> and <code>no-member</code> on the result of a function whose body is only <code>...</code>, like <code>@overload</code> and <code>.pyi</code> stubs. Such calls were inferred as returning <code>None</code>. This affected <code>sqlalchemy.func</code>, <code>pydantic.Field</code>, and the <code>torch</code> functions wrapped by <code>_add_docstr</code>, such as <code>torch.linalg.qr</code>.</p> <p>Closes <a href="https://redirect.github.com/pylint-dev/pylint/issues/8138">#8138</a> Closes <a href="https://redirect.github.com/pylint-dev/pylint/issues/9218">#9218</a> Closes <a href="https://redirect.github.com/pylint-dev/pylint/issues/9354">#9354</a> Closes <a href="https://redirect.github.com/pylint-dev/pylint/issues/10087">#10087</a></p> </li> <li> <p>Fix a false positive for <code>protected-access</code> when a subclass of a subscripted generic base, such as <code>class Child(Parent[T])</code>, accesses a protected member through that base, such as <code>Parent._foo(self)</code>.</p> <p>Closes <a href="https://redirect.github.com/pylint-dev/pylint/issues/8600">#8600</a></p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pylint-dev/pylint/commit/e75de10c69103381c875601f638d4b977ff0fcaf"><code>e75de10</code></a> Bump pylint to 4.1.3, update changelog (<a href="https://redirect.github.com/pylint-dev/pylint/issues/11637">#11637</a>)</li> <li><a href="https://github.com/pylint-dev/pylint/commit/591f6e2b9a258f3a069df9b9af56eb730bcea825"><code>591f6e2</code></a> [Backport maintenance/4.1.x] Fix protected-access false positive through a su...</li> <li><a href="https://github.com/pylint-dev/pylint/commit/a537920085b9d92abd54000b674d941063e52030"><code>a537920</code></a> [Backport maintenance/4.1.x] Ignore discard variable type redefinitions (<a href="https://redirect.github.com/pylint-dev/pylint/issues/11635">#11635</a>)</li> <li><a href="https://github.com/pylint-dev/pylint/commit/4a8f61ca7c216f8cde5b98faca5590154487eb00"><code>4a8f61c</code></a> [Backport maintenance/4.1.x] Fix duplicate-code crash when min-similarity-lin...</li> <li><a href="https://github.com/pylint-dev/pylint/commit/41fa1c4ccf7f24ff7e653846a76305500df9ae66"><code>41fa1c4</code></a> [Backport maintenance/4.1.x] [pyreverse] Fix hang/RecursionError with --all-a...</li> <li><a href="https://github.com/pylint-dev/pylint/commit/a05e2f340808daab0fa775cbc39c3ce00e89f576"><code>a05e2f3</code></a> [Backport maintenance/4.1.x] Fix <code>used-before-assignment</code> false positive for ...</li> <li><a href="https://github.com/pylint-dev/pylint/commit/ea7996b00280e3b8e5fcd9dc4e8e122466abff6a"><code>ea7996b</code></a> [Backport maintenance/4.1.x] Error when several output formats write to stdou...</li> <li><a href="https://github.com/pylint-dev/pylint/commit/479c0379366e482cda6d842b5d4cca0a52370939"><code>479c037</code></a> [Backport maintenance/4.1.x] Fix IndexError when Enum <strong>init</strong> has no argumen...</li> <li><a href="https://github.com/pylint-dev/pylint/commit/e6aa780ba6e393a517556000cc81961996585cad"><code>e6aa780</code></a> [Backport maintenance/4.1.x] Fix unreachable false positive for raising gener...</li> <li><a href="https://github.com/pylint-dev/pylint/commit/fc58d0b4aa48eedc03776416998d70dda61dfe48"><code>fc58d0b</code></a> [Backport maintenance/4.1.x] Fix pyreverse crash on classes with EmptyNode in...</li> <li>Additional commits viewable in <a href="https://github.com/pylint-dev/pylint/compare/v4.0.7...v4.1.3">compare view</a></li> </ul> </details> <br /> Updates `pytest-mock` from 3.15.1 to 3.17.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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/641">#641</a>: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/642">#642</a>: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/643">#643</a>: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>v3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/617">#617</a>: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/621">#621</a>: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/623">#623</a>: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/624">#624</a>: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/627">#627</a>: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/629">#629</a>: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/630">#630</a>: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/633">#633</a>: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</li> </ul> <h2>v3.16.0</h2> <p><em>2026-09-27</em></p> <ul> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/604">#604</a>: Fixed <code>duplicate_iterators=True</code> for async functions spied with <code>mocker.spy</code>.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/611">#611</a>: Fixed async mock assertion introspection to use awaited arguments instead of the latest call's arguments.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/pull/606">#606</a>: <code>mocker.resetall(return_value=True, side_effect=True)</code> now also applies to non-callable mocks, such as those returned by <code>mocker.create_autospec(SomeClass, instance=True)</code>. Previously both arguments were silently ignored for them.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/547">#547</a>: Added <code>SpyType</code> for annotating <code>mocker.spy</code> results.</li> <li>Dropped support for EOL Python 3.9.</li> <li><a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/147">#147</a>: Removed handling of <code>RuntimeError: stop called on unstarted patcher</code>, which can no longer occur in the supported Python versions.</li> <li>Added support for Python 3.15.</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.17.0</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#641](https://github.com/pytest-dev/pytest-mock/issues/641) <https://github.com/pytest-dev/pytest-mock/pull/641></code>_: Failures of mock assertions such as <code>assert_called_with</code> are again reported only once, instead of two or three times with the original error from the <code>mock</code> module chained before them.</li> <li><code>[#642](https://github.com/pytest-dev/pytest-mock/issues/642) <https://github.com/pytest-dev/pytest-mock/pull/642></code>_: Mock assertion failures no longer show misleading introspection when they are not about the arguments of the last call: <code>assert_called</code>, <code>assert_called_once</code>, <code>assert_not_called</code>, <code>assert_any_call</code>, their <code>await</code> counterparts, and <code>assert_called_once_with</code>/<code>assert_awaited_once_with</code> when the mock was not called (awaited) exactly once. The introspection also no longer reports arguments passed by position versus by keyword as different for autospecced mocks, and no longer shows empty <code>Args:</code>/<code>Kwargs:</code> sections when assertion rewriting is not available.</li> <li><code>[#643](https://github.com/pytest-dev/pytest-mock/issues/643) <https://github.com/pytest-dev/pytest-mock/pull/643></code>_: <code>assert_has_calls</code> and <code>assert_has_awaits</code> failures no longer show pytest introspection, which compared the expected and actual calls position by position and so reported differences between unrelated calls. The mock's own message, listing the expected and actual calls, is still shown.</li> </ul> <h2>3.16.1</h2> <p><em>2026-10-17</em></p> <ul> <li><code>[#617](https://github.com/pytest-dev/pytest-mock/issues/617) <https://github.com/pytest-dev/pytest-mock/pull/617></code>_: Fixed <code>assert_has_calls</code> raising <code>ValueError</code> instead of <code>AssertionError</code> (or showing misleading introspection) when the expected calls are plain tuples rather than <code>call(...)</code> objects, such as <code>(args, kwargs)</code> entries of another mock's <code>call_args_list</code>, <code>(args,)</code>, <code>(kwargs,)</code>, <code>(name, args)</code> or <code>(name, kwargs)</code>.</li> <li><code>[#621](https://github.com/pytest-dev/pytest-mock/issues/621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: Fixed <code>mocker.stop()</code> sometimes stopping the wrong mock, for example with mocks from <code>mocker.create_autospec</code>.</li> <li><code>[#621](https://github.com/pytest-dev/pytest-mock/issues/621) <https://github.com/pytest-dev/pytest-mock/pull/621></code>_: <code>mocker.stop()</code> now undoes the most recent patch first when the same object is used in several patches.</li> <li><code>[#623](https://github.com/pytest-dev/pytest-mock/issues/623) <https://github.com/pytest-dev/pytest-mock/pull/623></code>_: Fixed misleading introspection in <code>assert_has_awaits</code> failures, and <code>assert_has_calls</code>/<code>assert_has_awaits</code> raising <code>IndexError</code> instead of <code>AssertionError</code> when <code>calls</code> is passed by keyword.</li> <li><code>[#624](https://github.com/pytest-dev/pytest-mock/issues/624) <https://github.com/pytest-dev/pytest-mock/pull/624></code>_: Clear <code>spy_return_iter</code> after a spied synchronous or asynchronous function raises, matching <code>spy_return</code>.</li> <li><code>[#627](https://github.com/pytest-dev/pytest-mock/issues/627) <https://github.com/pytest-dev/pytest-mock/pull/627></code>_: Document <code>async_stub</code> await assertions and the distinction between call and await tracking.</li> <li><code>[#629](https://github.com/pytest-dev/pytest-mock/issues/629) <https://github.com/pytest-dev/pytest-mock/pull/629></code>_: Fixed <code>mocker.resetall()</code> skipping the mocks patched with <code>mocker.patch.multiple()</code>, both the ones it creates and the ones passed explicitly.</li> <li><code>[#630](https://github.com/pytest-dev/pytest-mock/issues/630) <https://github.com/pytest-dev/pytest-mock/pull/630></code>_: <code>mocker.resetall()</code> now also resets <code>spy_return</code> and <code>spy_exception</code> of spies, like it already did for <code>spy_return_list</code> and <code>spy_return_iter</code>, and no longer overwrites attributes with these names on mocks that are not spies.</li> <li><code>[#633](https://github.com/pytest-dev/pytest-mock/issues/633) <https://github.com/pytest-dev/pytest-mock/pull/633></code>_: Fixed spies on <code>classmethod</code>, <code>staticmethod</code>, builtins and classes returning a <code>MagicMock</code> instead of calling the spied code after <code>mocker.resetall(side_effect=True)</code>. Resetting a spy's <code>side_effect</code> now goes back to calling the spied code, also clearing any <code>side_effect</code> set on the spy.</li> </ul> <h2>3.16.0</h2> <p><em>2026-09-27</em></p> <ul> <li><code>[#604](https://github.com/pytest-dev/pytest-mock/issues/604) <https://github.com/pytest-dev/pytest-mock/pull/604></code>_: Fixed <code>duplicate_iterators=True</code> for async functions spied with <code>mocker.spy</code>.</li> <li><code>[#611](https://github.com/pytest-dev/pytest-mock/issues/611) <https://github.com/pytest-dev/pytest-mock/pull/611></code>_: Fixed async mock assertion introspection to use awaited arguments instead of the latest call's arguments.</li> <li><code>[#606](https://github.com/pytest-dev/pytest-mock/issues/606) <https://github.com/pytest-dev/pytest-mock/pull/606></code>_: <code>mocker.resetall(return_value=True, side_effect=True)</code> now also applies to non-callable mocks, such as those returned by <code>mocker.create_autospec(SomeClass, instance=True)</code>. Previously both arguments were silently ignored for them.</li> <li><code>[#547](https://github.com/pytest-dev/pytest-mock/issues/547) <https://github.com/pytest-dev/pytest-mock/issues/547></code>_: Added <code>SpyType</code> for annotating <code>mocker.spy</code> results.</li> <li>Dropped support for EOL Python 3.9.</li> <li><code>[#147](https://github.com/pytest-dev/pytest-mock/issues/147) <https://github.com/pytest-dev/pytest-mock/issues/147></code>_: Removed handling of <code>RuntimeError: stop called on unstarted patcher</code>, which can no longer occur in the supported Python versions.</li> <li>Added support for Python 3.15.</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5c2f207ca7098dde996f9bedd06e596e39b6246b"><code>5c2f207</code></a> Release 3.17.0</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/96252715fad4a0dfec1997103cc231bc1f133616"><code>9625271</code></a> Bump the minor version for releases that change existing behavior</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/34b87aeeef1d2a85be5ce4fadb0c6bc4a033c40a"><code>34b87ae</code></a> Drop introspection from assert_has_calls and assert_has_awaits (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/643">#643</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/866520f2d339c7649af56ac227ca67ed36b1e92e"><code>866520f</code></a> Only show introspection for failures about the call arguments (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/642">#642</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/5ab41c143c57842456caad0029082e919fa6a95d"><code>5ab41c1</code></a> Do not chain the original mock error to wrapped assertion failures (<a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/641">#641</a>)</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/1916b14db224b893edf18251f26a38487eb0d6a6"><code>1916b14</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/635">#635</a> from nicoddemus/docs-contributing-resetall</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/212fcd903aeb685a3b39875be82fc84ff58ebc56"><code>212fcd9</code></a> Document resetall, the changelog format and running tests with tox</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/9374b2c3e38e3bbc2e04328f7026ae3680f0476f"><code>9374b2c</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/634">#634</a> from pytest-dev/release-3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/fab730daf4a4cfc260d8656b0467503131535a00"><code>fab730d</code></a> Release 3.16.1</li> <li><a href="https://github.com/pytest-dev/pytest-mock/commit/d26d41bb01e99de5c0b59156c667d46985b03470"><code>d26d41b</code></a> Merge pull request <a href="https://redirect.github.com/pytest-dev/pytest-mock/issues/627">#627</a> from xiehuanyi/docs/async-stub-awaits-20261012-r2</li> <li>Additional commits viewable in <a href="https://github.com/pytest-dev/pytest-mock/compare/v3.15.1...v3.17.0">compare view</a></li> </ul> </details> <br /> Updates `setuptools` from 84.0.0 to 84.2.0 <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/pypa/setuptools/blob/main/NEWS.rst">setuptools's changelog</a>.</em></p> <blockquote> <h1>v84.2.0</h1> <h2>Features</h2> <ul> <li>Added support for building abi3t extensions and abi3.abi3t wheels on Python 3.15 and newer. See :pep:<code>803</code> and the <code>Python 3.15 "What's New" entry <https://docs.python.org/3.15/whatsnew/3.15.html#pep-803-abi3t-stable-abi-for-free-threaded-builds></code>_ for more details. (<a href="https://redirect.github.com/pypa/setuptools/issues/5193">#5193</a>)</li> <li>Updated vendored packaging version to 26.3, which adds support for the <code>abi3t</code> tag from :pep:<code>803</code>. (<a href="https://redirect.github.com/pypa/setuptools/issues/5361">#5361</a>)</li> </ul> <h2>Bugfixes</h2> <ul> <li>Use target sysconfig data for stable-ABI extension filenames. (<a href="https://redirect.github.com/pypa/setuptools/issues/5351">#5351</a>)</li> </ul> <h1>v84.1.0</h1> <h2>Features</h2> <ul> <li><code>setuptools.archive_util</code> now raises the new <code>UnsafeMember</code> exception when an archive member would be extracted outside of the extraction directory, where previously such a member was silently skipped. Aborting makes a malicious or malformed archive visible to the caller instead of yielding a quietly incomplete extraction, and matches the behavior of the standard library's <code>tarfile</code> extraction filters.</li> </ul> <h2>Bugfixes</h2> <ul> <li> <p><code>Wheel.install_as_egg</code> no longer creates namespace package directories outside of the destination egg directory. Entries in a wheel's <code>namespace_packages.txt</code> were split on <code>.</code> and passed straight to <code>os.path.join</code>, so an entry that was absolute, drive-qualified, or UNC discarded the destination and placed an <code>__init__.py</code> at a path chosen by the wheel. Namespace entries are now validated as dotted module names on every platform -- see GHSA-xmj3-9gf7-h52w.</p> <p>This code path is reached only by the deprecated <code>setup_requires</code> mechanism when <code>setup()</code> is invoked outside a PEP 517 frontend; the setuptools build backend never reaches it.</p> </li> <li> <p><code>setuptools.archive_util</code> no longer extracts archive members outside of the requested extraction directory. Both the tar and zip formats specify <code>/</code> as</p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pypa/setuptools/commit/301e27a484f17e175acf6b692fccc634f9a20c49"><code>301e27a</code></a> Bump version: 84.1.0 → 84.2.0</li> <li><a href="https://github.com/pypa/setuptools/commit/39a7c2ecd80bb1c393b3867d9673027d490322cb"><code>39a7c2e</code></a> Merge pull request <a href="https://redirect.github.com/pypa/setuptools/issues/5193">#5193</a> from ngoldbaum/abi3.abi3t</li> <li><a href="https://github.com/pypa/setuptools/commit/7b5dea7c3372f0958f5cf689ba918f0ebcc5a698"><code>7b5dea7</code></a> Merge branch 'main' into abi3.abi3t</li> <li><a href="https://github.com/pypa/setuptools/commit/b3985b6d08f595de4bd123e86f83d1680c2e3e0b"><code>b3985b6</code></a> Merge pull request <a href="https://redirect.github.com/pypa/setuptools/issues/5352">#5352</a> from jameshilliard/fix/abi3-target-platform</li> <li><a href="https://github.com/pypa/setuptools/commit/0c3f3c44592ba8273ffd649d70d5a64220a3d1cc"><code>0c3f3c4</code></a> Merge pull request <a href="https://redirect.github.com/pypa/setuptools/issues/5361">#5361</a> from pypa/feature/vendor-packaging-26.3</li> <li><a href="https://github.com/pypa/setuptools/commit/77b7ace0aaf660beeb9b3f9da4aabf21cbcf3fa9"><code>77b7ace</code></a> Bump version: 84.0.0 → 84.1.0</li> <li><a href="https://github.com/pypa/setuptools/commit/97b75e6e66b446f23886fe409ab19fc805ee42fb"><code>97b75e6</code></a> Use target sysconfig for platform-qualified stable-ABI suffixes</li> <li><a href="https://github.com/pypa/setuptools/commit/4b0293987b195aa9f7a7222148fdba0d15d461f2"><code>4b02939</code></a> Add news fragment.</li> <li><a href="https://github.com/pypa/setuptools/commit/56bc40e36874fb22c4da66dc25c145ce9e9bbfcd"><code>56bc40e</code></a> Update vendored packaging version to 26.3</li> <li><a href="https://github.com/pypa/setuptools/commit/e66004c64eaf6cf2f8c53ccdfac75cf7abce7ccf"><code>e66004c</code></a> Merge pull request <a href="https://redirect.github.com/pypa/setuptools/issues/5329">#5329</a> from pypa/fix/wheel-namespace-path-escape</li> <li>Additional commits viewable in <a href="https://github.com/pypa/setuptools/compare/v84.0.0...v84.2.0">compare view</a></li> </ul> </details> <br /> Updates `setuptools-scm` from 10.2.1 to 10.3.4 <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/pypa/setuptools-scm/releases">setuptools-scm's releases</a>.</em></p> <blockquote> <h2>setuptools-scm v10.3.4</h2> <h3>Fixed</h3> <ul> <li> <p>Ship the tracked files of projects whose <code>pyproject.toml</code> sits in a subdirectory of the checkout. <code>root</code> defaults to the project directory, so version inference correctly finds no SCM there and answers from <code>SETUPTOOLS_SCM_PRETEND_VERSION</code> or <code>fallback_version</code> -- but that says nothing about which files git tracks, and the sdist and wheel came out with none of them. This was the 10.3.0 regression fixed in 10.3.3, surviving in the subdirectory layout.</p> <p>File discovery now follows the checkout the project sits in, independently of the <code>root</code> that scopes versioning, and records <code>scm_file_list.json</code> in the egg-info as a root-level project already did. (<a href="https://redirect.github.com/pypa/setuptools-scm/issues/1543">#1543</a>)</p> </li> <li> <p>Require <code>vcs-versioning>=2.5.0</code>. The subdirectory file-discovery fix (<a href="https://redirect.github.com/pypa/setuptools-scm/issues/1543">#1543</a>) imports <code>discover_file_workdir</code>, which no earlier release has, while the declared floor still named 2.4.0 -- an install against a published vcs-versioning raised <code>ImportError</code> during the build. (<a href="https://redirect.github.com/pypa/setuptools-scm/issues/1546">#1546</a>)</p> </li> </ul> <h2>setuptools-scm v10.3.3</h2> <h3>Fixed</h3> <ul> <li> <p>Keep file discovery working when the version is pretended. <code>SETUPTOOLS_SCM_PRETEND_VERSION</code> and its scoped <code>_FOR_<DIST></code> form made version inference return before discovering a workdir, and the <code>egg_info</code> mixin read the absent workdir as "searched, found no checkout" -- the signal it acts on by suppressing the <code>setuptools.file_finders</code> chain. Every SCM-tracked file that setuptools' own package discovery does not find was then dropped from the sdist and the wheel, silently, since the build succeeded and the version was correct.</p> <p>A pretended version still skips discovery, because most builds only want a version and probing for a checkout nobody asks about costs subprocesses for nothing. What no longer happens is passing that off as an answer: "nobody looked yet" is now distinct from "looked and found nothing", and the workdir is discovered on demand the first time a consumer needs a file list.</p> <p><code>scm_file_list.json</code> is now written to the egg-info for pretended builds as well. It describes which files the checkout tracks, which a pretended version says nothing about. <code>scm_version.json</code> stays absent there, because a pretended version must not be recorded as what the SCM said. (<a href="https://redirect.github.com/pypa/setuptools-scm/issues/1540">#1540</a>)</p> </li> </ul> <h2>setuptools-scm v10.3.2</h2> <h3>Fixed</h3> <ul> <li>Stop the command mixins from reordering a project's own <code>build_py</code>, <code>egg_info</code> or <code>bdist_wheel</code> MRO. <code>ScmVersionFileMixin</code> and friends inherited from the corresponding setuptools command, so wrapping a project class built on a disjoint hierarchy -- <code>distutils.command.build_py</code>, or the standalone <code>wheel</code> package's <code>bdist_wheel</code> -- placed setuptools' command <em>ahead</em> of the project's class. <code>setuptools.build_py.run()</code> does not delegate any further, so the project's</li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/pypa/setuptools-scm/commit/b27f5973c4e24cdbca08f8c003e431e220f52a40"><code>b27f597</code></a> Merge pull request <a href="https://redirect.github.com/pypa/setuptools-scm/issues/1545">#1545</a> from pypa/release/main</li> <li><a href="https://github.com/pypa/setuptools-scm/commit/aa18322a0c2e3bcefeafd39280b60ce7fe6dabec"><code>aa18322</code></a> Prepare release: setuptools-scm v10.3.4, vcs-versioning v2.5.0</li> <li><a href="https://github.com/pypa/setuptools-scm/commit/e40176e1b6f34d988199b231b4b1c2e71abf60b7"><code>e40176e</code></a> Merge pull request <a href="https://redirect.github.com/pypa/setuptools-scm/issues/1551">#1551</a> from RonnyPfannschmidt/fix/version-missing-accepts-tool</li> <li><a href="https://github.com/pypa/setuptools-scm/commit/873d4b3413bf0175c81039d2ca380a62d70f0dc9"><code>873d4b3</code></a> fix(vcs-versioning): accept tool= in _version_missing again</li> <li><a href="https://github.com/pypa/setuptools-scm/commit/5173a1eea5c3629b8e4d343ee3a022b8c8d211d0"><code>5173a1e</code></a> Merge pull request <a href="https://redirect.github.com/pypa/setuptools-scm/issues/1546">#1546</a> from RonnyPfannschmidt/fix/dependency-floor-runs-the...</li> <li><a href="https://github.com/pypa/setuptools-scm/commit/cbcd429aa99b79baf04e10fa6126a1d66ff5d6ff"><code>cbcd429</code></a> fix(deps): require vcs-versioning>=2.5.0.dev0</li> <li><a href="https://github.com/pypa/setuptools-scm/commit/5f95612828577d251164c0fa0e629505966db8ab"><code>5f95612</code></a> ci(dependency-floor): run the testsuite, not just the imports</li> <li><a href="https://github.com/pypa/setuptools-scm/commit/e377730840d11c528cd2267444c74b0d75ba3335"><code>e377730</code></a> Merge pull request <a href="https://redirect.github.com/pypa/setuptools-scm/issues/1544">#1544</a> from RonnyPfannschmidt/fix/file-discovery-follows-th...</li> <li><a href="https://github.com/pypa/setuptools-scm/commit/98fa24da93d567336146f96cbfc3f2516dbd3c20"><code>98fa24d</code></a> fix(file-discovery): follow the checkout, not the versioning root</li> <li><a href="https://github.com/pypa/setuptools-scm/commit/41edffeffccf7aee6e2e2fe4917c8876f4549a8c"><code>41edffe</code></a> Merge pull request <a href="https://redirect.github.com/pypa/setuptools-scm/issues/1538">#1538</a> from pypa/release/main</li> <li>Additional commits viewable in <a href="https://github.com/pypa/setuptools-scm/compare/setuptools-scm-v10.2.1...setuptools-scm-v10.3.4">compare view</a></li> </ul> </details> <br /> 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 show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </details>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #640.
The introspection pytest-mock adds to failed mock assertions compares the arguments of the mock's last call with the arguments given to the assertion. That only makes sense when the assertion failed because of those arguments. This PR keeps the traceback hiding for all the wrapped assertions, but only adds introspection where it is meaningful.
No introspection anymore for:
assert_called,assert_called_once,assert_not_calledandassert_awaited,assert_awaited_once,assert_not_awaited: they take no arguments and fail because of the call count. Before,m(1); m(2); m.assert_called_once()showedassert (2,) == ().assert_any_callandassert_any_await: they search all calls, so comparing only the last one was misleading.m(1); m(2); m(3); m.assert_any_call(4)showedassert (3,) == (4,).assert_called_once_withandassert_awaited_once_withwhen the mock was not called (awaited) exactly once: the failure is about the count, not the arguments of the last call.The mock's own message, which lists the calls, is still shown in all these cases.
Other fixes:
create_autospec(f)withdef f(a, b, c=0), callingm(1, b=2, c=3)and assertingm.assert_called_once_with(1, 2, c=4)used to show differences in bothArgs((1,) != (1, 2)) andKwargs({'b': 2, 'c': 3} != {'c': 4}); now it shows onlyassert (1, 2, 3) == (1, 2, 4).--assert=plain, editable installs, read-only installs), the message no longer ends with emptyArgs:andKwargs:sections.The docs section about the feature is updated to say which assertions get introspection, and its example output now matches current mock and pytest versions.
assert_has_calls/assert_has_awaitsare unchanged here (#639).🤖 Generated with Claude Code