From 726143335742228d3a611448983979a50c8c29ac Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Fri, 24 Jun 2022 16:00:14 -0300 Subject: [PATCH] Fix regression due to 'mock' import Fix #298 --- CHANGELOG.rst | 6 ++++++ src/pytest_mock/plugin.py | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 616336c..acdec5a 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,12 @@ Releases ======== +3.8.1 (2022-06-24) +------------------ + +* Fix regression caused by an explicit ``mock`` dependency in the code (`#298`_). + +.. _#298: https://github.com/pytest-dev/pytest-mock/issues/298 3.8.0 (2022-06-24) ------------------ diff --git a/src/pytest_mock/plugin.py b/src/pytest_mock/plugin.py index 293e76e..0d2ac31 100644 --- a/src/pytest_mock/plugin.py +++ b/src/pytest_mock/plugin.py @@ -30,8 +30,7 @@ if sys.version_info[:2] > (3, 7): AsyncMockType = unittest.mock.AsyncMock else: - import mock - AsyncMockType = mock.AsyncMock + AsyncMockType = Any class PytestMockWarning(UserWarning):