# HG changeset patch # User Matěj Cepl # Date 1607724922 0 # Fri Dec 11 22:15:22 2020 +0000 # Node ID ff6b3099d7215fa0f65a428ffc9c3900648e5985 # Parent 1bc64e169fd07ac17254ab81f911de321ea475ca Remove dependency on the external module mock. Fixes #820 diff --git a/NEWS b/NEWS --- a/NEWS +++ b/NEWS @@ -6,6 +6,9 @@ * Add ``no_verify`` flag to ``porcelain.commit`` and ``Repo.do_commit``. (Peter Rowlands) + * Remove dependency on external mock module. + (Matěj Cepl, #820) + 0.20.14 2020-11-26 * Fix some stash functions on Python 3. (Peter Rowlands) diff --git a/dulwich/contrib/test_swift.py b/dulwich/contrib/test_swift.py --- a/dulwich/contrib/test_swift.py +++ b/dulwich/contrib/test_swift.py @@ -58,7 +58,7 @@ missing_libs.append("geventhttpclient") try: - from mock import patch + from unittest.mock import patch except ImportError: missing_libs.append("mock") diff --git a/dulwich/tests/test_archive.py b/dulwich/tests/test_archive.py --- a/dulwich/tests/test_archive.py +++ b/dulwich/tests/test_archive.py @@ -41,7 +41,7 @@ ) try: - from mock import patch + from unittest.mock import patch except ImportError: patch = None # type: ignore diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -62,7 +62,7 @@ if '__pypy__' not in sys.modules and not sys.platform == 'win32': tests_require.extend([ - 'gevent', 'geventhttpclient', 'mock', 'setuptools>=17.1']) + 'gevent', 'geventhttpclient', 'setuptools>=17.1']) ext_modules = [