Bug#1060094: python-thinc: remove usage of python3-mock

Alexandre Detiste alexandre.detiste at gmail.com
Fri Jan 5 20:16:28 GMT 2024


Source: python-thinc
Severity: normal


Please apply this patch to remove usage of old python3-mock
and use unittest.mock from the standard library instead.

Greetings


-- System Information:
Debian Release: trixie/sid
  APT prefers testing
  APT policy: (501, 'testing'), (450, 'unstable'), (400, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.5.0-5-amd64 (SMP w/2 CPU threads; PREEMPT)
Kernel taint flags: TAINT_USER
Locale: LANG=fr_BE.UTF-8, LC_CTYPE=fr_BE.UTF-8 (charmap=UTF-8), LANGUAGE=fr_BE:fr
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
-------------- next part --------------
diff --git a/debian/control b/debian/control
index 6b924ba..d5ba177 100644
--- a/debian/control
+++ b/debian/control
@@ -14,7 +14,6 @@ Build-Depends: cython3,
                python3-cytoolz,
                python3-dill,
                python3-hypothesis,
-               python3-mock,
                python3-msgpack,
                python3-msgpack-numpy,
                python3-murmurhash,
diff --git a/requirements.txt b/requirements.txt
index 112e535..a68b66e 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -22,7 +22,6 @@ hypothesis>=3.27.0,<7.0.0
 pytest>=5.2.0,!=7.1.0
 pytest-cov>=2.7.0,<5.0.0
 coverage>=5.0.0,<8.0.0
-mock>=2.0.0,<3.0.0
 flake8>=3.5.0,<3.6.0
 mypy>=0.990,<0.1000; python_version >= "3.7"
 types-mock>=0.1.1
diff --git a/thinc/tests/layers/test_linear.py b/thinc/tests/layers/test_linear.py
index 2362b55..2e5602f 100644
--- a/thinc/tests/layers/test_linear.py
+++ b/thinc/tests/layers/test_linear.py
@@ -1,5 +1,5 @@
 import pytest
-from mock import MagicMock
+from unittest.mock import MagicMock
 from hypothesis import given, settings
 import numpy
 from numpy.testing import assert_allclose
diff --git a/thinc/tests/layers/test_with_debug.py b/thinc/tests/layers/test_with_debug.py
index 679c1f2..d4bdbee 100644
--- a/thinc/tests/layers/test_with_debug.py
+++ b/thinc/tests/layers/test_with_debug.py
@@ -1,4 +1,4 @@
-from mock import MagicMock
+from unittest.mock import MagicMock
 from thinc.api import with_debug, Linear
 
 


More information about the debian-science-maintainers mailing list