Bump mock from 2.0.0 to 5.2.0
Bumps mock from 2.0.0 to 5.2.0.
Changelog
Sourced from mock's changelog.
5.2.0
This is release is
in memory of Michael Foord__, who originally authored themockpackage and passed away in January 2025.__ https://discuss.python.org/t/in-memoriam-michael-foord-1974-2025/78317
gh-65454: :func:
unittest.mock.Mock.attach_mockno longer triggers a call to aPropertyMockbeing attached.gh-117765: Improved documentation for :func:
unittest.mock.patch.dictgh-124176: Add support for :func:
dataclasses.dataclassin :func:unittest.mock.create_autospec. Nowcreate_autospecwill check for potential dataclasses and use :func:dataclasses.fieldsfunction to retrieve the spec information.gh-123934: Fix :class:
unittest.mock.MagicMockreseting magic methods return values after.reset_mock(return_value=True)was called.gh-90848: Fixed :func:
unittest.mock.create_autospecto configure parent mock with keyword arguments.gh-113569: Indicate if there were no actual calls in unittest :meth:
~unittest.mock.Mock.assert_has_callsfailure.gh-122858: Deprecate :func:
!asyncio.iscoroutinefunctionin favor of :func:inspect.iscoroutinefunction.gh-104745: Limit starting a patcher (from :func:
unittest.mock.patchor :func:unittest.mock.patch.object) more than once without stopping itgh-75988: Fixed :func:
unittest.mock.create_autospecto pass the call through to the wrapped object to return the real result.gh-119600: Fix :func:
unittest.mock.patchto not read attributes of the target whennew_callableis set. Patch by Robert Collins.gh-113407: Fix import of :mod:
unittest.mockwhen CPython is built without docstrings.gh-120732: Fix
namepassing to :class:unittest.mock.Mockobject when using :func:unittest.mock.create_autospec.5.1.0
- bpo-44185: :func:
unittest.mock.mock_openwill call the :func:closemethod of the file handle mock when it is exiting from the context
... (truncated)
Commits
0f5df82In memoriam: Michael Foord 1974-20253c737e2Preparing for 5.2.0 release.563f311latest sync point4fc238eunittest.mocktest and coverage fixup (#130787)aee44edBackport-specific code coverage fixes9081bbeFix bug in backporting docsfdacaa2Add set_event_loop_policy to backports4221c21Revert "gh-71339: Add additional assertion methods for unittest (GH-128707)"45d2d49gh-71339: Add additional assertion methods for unittest (GH-128707)9e3f49cgh-127949: deprecateasyncio.set_event_loop_policy(#128024)- Additional commits viewable in compare view
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 rebasewill rebase this PR -
@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it -
@dependabot mergewill merge this PR after your CI passes on it -
@dependabot squash and mergewill squash and merge this PR after your CI passes on it -
@dependabot cancel mergewill cancel a previously requested merge and block automerging -
@dependabot reopenwill reopen this PR if it is closed -
@dependabot closewill close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually -
@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency -
@dependabot ignore this major versionwill 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 versionwill 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 dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Dependabot tried to add @heitorsampaio as a reviewer to this PR, but received the following error from GitHub:
POST https://api.github.com/repos/segmentio/analytics-python/pulls/509/requested_reviewers: 422 - Reviews may only be requested from collaborators. One or more of the users or teams you specified is not a collaborator of the segmentio/analytics-python repository. // See: https://docs.github.com/rest/pulls/review-requests#request-reviewers-for-a-pull-request