ff6b3099d721 draft — Matěj Cepl 3 years ago
Remove dependency on the external module mock. Fixes #820
4 files changed, 6 insertions(+), 3 deletions(-)

M NEWS
M dulwich/contrib/test_swift.py
M dulwich/tests/test_archive.py
M setup.py
M NEWS +3 -0
@@ 6,6 6,9 @@ 0.20.15	UNRELEASED
  * 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)

          
M dulwich/contrib/test_swift.py +1 -1
@@ 58,7 58,7 @@ except ImportError:
     missing_libs.append("geventhttpclient")
 
 try:
-    from mock import patch
+    from unittest.mock import patch
 except ImportError:
     missing_libs.append("mock")
 

          
M dulwich/tests/test_archive.py +1 -1
@@ 41,7 41,7 @@ from dulwich.tests.utils import (
     )
 
 try:
-    from mock import patch
+    from unittest.mock import patch
 except ImportError:
     patch = None   # type: ignore
 

          
M setup.py +1 -1
@@ 62,7 62,7 @@ tests_require = ['fastimport']
 
 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 = [