Selaa lähdekoodia

Remove dependency on the external module mock. Fixes #820

Matěj Cepl 4 vuotta sitten
vanhempi
commit
bcd6ac2c43
4 muutettua tiedostoa jossa 6 lisäystä ja 3 poistoa
  1. 3 0
      NEWS
  2. 1 1
      dulwich/contrib/test_swift.py
  3. 1 1
      dulwich/tests/test_archive.py
  4. 1 1
      setup.py

+ 3 - 0
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)

+ 1 - 1
dulwich/contrib/test_swift.py

@@ -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")
 

+ 1 - 1
dulwich/tests/test_archive.py

@@ -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
 

+ 1 - 1
setup.py

@@ -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 = [