[PR #965] [CLOSED] Bump mock from 2.0.0 to 5.0.2 #1096

Closed
opened 2026-02-28 00:03:36 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/spotipy-dev/spotipy/pull/965
Author: @dependabot[bot]
Created: 4/17/2023
Status: Closed

Base: masterHead: dependabot/pip/mock-5.0.2


📝 Commits (1)

  • 7048dc7 Bump mock from 2.0.0 to 5.0.2

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 setup.py (+1 -1)

📄 Description

Bumps mock from 2.0.0 to 5.0.2.

Changelog

Sourced from mock's changelog.

5.0.2

  • gh-102978: Fixes :func:unittest.mock.patch not enforcing function signatures for methods decorated with @classmethod or @staticmethod when patch is called with autospec=True.

  • gh-103329: Regression tests for the behaviour of unittest.mock.PropertyMock were added.

5.0.1

  • gh-100740: Fix unittest.mock.Mock not respecting the spec for attribute names prefixed with assert.

  • gh-100690: Mock objects which are not unsafe will now raise an AttributeError when accessing an attribute that matches the name of an assertion but without the prefix assert_, e.g. accessing called_once instead of assert_called_once. This is in addition to this already happening for accessing attributes with prefixes assert, assret, asert, aseert, and assrt.

  • gh-96127: inspect.signature was raising TypeError on call with mock objects. Now it correctly returns (*args, **kwargs) as infered signature.

5.0.0

  • gh-98624: Add a mutex to unittest.mock.NonCallableMock to protect concurrent access to mock attributes.

  • bpo-43478: Mocks can no longer be used as the specs for other Mocks. As a result, an already-mocked object cannot have an attribute mocked using autospec=True or be the subject of a create_autospec(...) call. This can uncover bugs in tests since these Mock-derived Mocks will always pass certain tests (e.g. isinstance) and builtin assert functions (e.g. assert_called_once_with) will unconditionally pass.

  • bpo-45156: Fixes infinite loop on :func:unittest.mock.seal of mocks created by :func:~unittest.create_autospec.

  • bpo-41403: Make :meth:mock.patch raise a :exc:TypeError with a relevant error message on invalid arg. Previously it allowed a cryptic :exc:AttributeError to escape.

  • gh-91803: Fix an error when using a method of objects mocked with :func:unittest.mock.create_autospec after it was sealed with :func:unittest.mock.seal function.

... (truncated)

Commits

Dependabot compatibility score

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 commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot 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)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/spotipy-dev/spotipy/pull/965 **Author:** [@dependabot[bot]](https://github.com/apps/dependabot) **Created:** 4/17/2023 **Status:** ❌ Closed **Base:** `master` ← **Head:** `dependabot/pip/mock-5.0.2` --- ### 📝 Commits (1) - [`7048dc7`](https://github.com/spotipy-dev/spotipy/commit/7048dc7971e5925fca1a5a2e796c0b2e28b2a8ce) Bump mock from 2.0.0 to 5.0.2 ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `setup.py` (+1 -1) </details> ### 📄 Description Bumps [mock](https://github.com/testing-cabal/mock) from 2.0.0 to 5.0.2. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/testing-cabal/mock/blob/master/CHANGELOG.rst">mock's changelog</a>.</em></p> <blockquote> <h2>5.0.2</h2> <ul> <li> <p><a href="https://redirect.github.com/testing-cabal/mock/issues/102978">gh-102978</a>: Fixes :func:<code>unittest.mock.patch</code> not enforcing function signatures for methods decorated with <code>@classmethod</code> or <code>@staticmethod</code> when patch is called with <code>autospec=True</code>.</p> </li> <li> <p><a href="https://redirect.github.com/testing-cabal/mock/issues/103329">gh-103329</a>: Regression tests for the behaviour of <code>unittest.mock.PropertyMock</code> were added.</p> </li> </ul> <h2>5.0.1</h2> <ul> <li> <p><a href="https://redirect.github.com/testing-cabal/mock/issues/100740">gh-100740</a>: Fix <code>unittest.mock.Mock</code> not respecting the spec for attribute names prefixed with <code>assert</code>.</p> </li> <li> <p><a href="https://redirect.github.com/testing-cabal/mock/issues/100690">gh-100690</a>: <code>Mock</code> objects which are not unsafe will now raise an <code>AttributeError</code> when accessing an attribute that matches the name of an assertion but without the prefix <code>assert_</code>, e.g. accessing <code>called_once</code> instead of <code>assert_called_once</code>. This is in addition to this already happening for accessing attributes with prefixes <code>assert</code>, <code>assret</code>, <code>asert</code>, <code>aseert</code>, and <code>assrt</code>.</p> </li> <li> <p><a href="https://redirect.github.com/testing-cabal/mock/issues/96127">gh-96127</a>: <code>inspect.signature</code> was raising <code>TypeError</code> on call with mock objects. Now it correctly returns <code>(*args, **kwargs)</code> as infered signature.</p> </li> </ul> <h2>5.0.0</h2> <ul> <li> <p><a href="https://redirect.github.com/testing-cabal/mock/issues/98624">gh-98624</a>: Add a mutex to unittest.mock.NonCallableMock to protect concurrent access to mock attributes.</p> </li> <li> <p>bpo-43478: Mocks can no longer be used as the specs for other Mocks. As a result, an already-mocked object cannot have an attribute mocked using <code>autospec=True</code> or be the subject of a <code>create_autospec(...)</code> call. This can uncover bugs in tests since these Mock-derived Mocks will always pass certain tests (e.g. isinstance) and builtin assert functions (e.g. assert_called_once_with) will unconditionally pass.</p> </li> <li> <p>bpo-45156: Fixes infinite loop on :func:<code>unittest.mock.seal</code> of mocks created by :func:<code>~unittest.create_autospec</code>.</p> </li> <li> <p>bpo-41403: Make :meth:<code>mock.patch</code> raise a :exc:<code>TypeError</code> with a relevant error message on invalid arg. Previously it allowed a cryptic :exc:<code>AttributeError</code> to escape.</p> </li> <li> <p><a href="https://redirect.github.com/testing-cabal/mock/issues/91803">gh-91803</a>: Fix an error when using a method of objects mocked with :func:<code>unittest.mock.create_autospec</code> after it was sealed with :func:<code>unittest.mock.seal</code> function.</p> </li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/testing-cabal/mock/commit/03a3f120594b93c641fed92c60f673edbfde1401"><code>03a3f12</code></a> Preparing for 5.0.2 release.</li> <li><a href="https://github.com/testing-cabal/mock/commit/b8a7dedd43e752ea96c9edf47f80e639e79ed41f"><code>b8a7ded</code></a> latest sync point</li> <li><a href="https://github.com/testing-cabal/mock/commit/079655cd9da2fd5fc22126b422ef3c100a3f96a2"><code>079655c</code></a> <a href="https://redirect.github.com/testing-cabal/mock/issues/102978">gh-102978</a>: Fix mock.patch function signatures for class and staticmethod deco...</li> <li><a href="https://github.com/testing-cabal/mock/commit/1c7bfeff6575a5fee073bb648126780e00923936"><code>1c7bfef</code></a> <a href="https://redirect.github.com/testing-cabal/mock/issues/103329">gh-103329</a>: Add regression test for PropertyMock with side effect (<a href="https://redirect.github.com/testing-cabal/mock/issues/103358">#103358</a>)</li> <li><a href="https://github.com/testing-cabal/mock/commit/09b0b2932e1e5722d5a24e058797131e50238081"><code>09b0b29</code></a> correct lastsync.txt revision</li> <li><a href="https://github.com/testing-cabal/mock/commit/4145e0fde584601cdb17a4c0229d58f05479c2db"><code>4145e0f</code></a> Additionally test on pypy 3.9 / 7.3.11</li> <li><a href="https://github.com/testing-cabal/mock/commit/e132217e92a65f4c69657f578d6802422777b3ca"><code>e132217</code></a> Actually use pypy to run pypy's CI</li> <li><a href="https://github.com/testing-cabal/mock/commit/921fad1bb3b781124bf27ee0187c6ce5d71652b0"><code>921fad1</code></a> Preparing for 5.0.1 release.</li> <li><a href="https://github.com/testing-cabal/mock/commit/696fb23e7279ee285df22f8f988e7ac18bb7b356"><code>696fb23</code></a> Backwards compatibility fix for 3.7 and earlier.</li> <li><a href="https://github.com/testing-cabal/mock/commit/296d856f36e218cabf79f76009650562528a0146"><code>296d856</code></a> latest sync point</li> <li>Additional commits viewable in <a href="https://github.com/testing-cabal/mock/compare/2.0.0...5.0.2">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=mock&package-manager=pip&previous-version=2.0.0&new-version=5.0.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot 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> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 00:03:36 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#1096
No description provided.