mirror of https://github.com/pyodide/pyodide.git
116 lines
3.5 KiB
Diff
116 lines
3.5 KiB
Diff
commit cfd6c4b18c5f338842d2ee509bfb2d3a3c6f6439
|
|
Author: Roman Yurchak <rth.yurchak@pm.me>
|
|
Date: Mon Oct 15 15:40:48 2018 +0200
|
|
|
|
Use dummy_threading
|
|
|
|
diff --git a/scipy/interpolate/tests/test_gil.py b/scipy/interpolate/tests/test_gil.py
|
|
index df3ab3bc4..974b68ada 100644
|
|
--- a/scipy/interpolate/tests/test_gil.py
|
|
+++ b/scipy/interpolate/tests/test_gil.py
|
|
@@ -1,7 +1,7 @@
|
|
from __future__ import division, print_function, absolute_import
|
|
|
|
import itertools
|
|
-import threading
|
|
+import dummy_threading as threading
|
|
import time
|
|
|
|
import numpy as np
|
|
diff --git a/scipy/ndimage/tests/test_filters.py b/scipy/ndimage/tests/test_filters.py
|
|
index 8c56393a6..8ff85547c 100644
|
|
--- a/scipy/ndimage/tests/test_filters.py
|
|
+++ b/scipy/ndimage/tests/test_filters.py
|
|
@@ -129,7 +129,7 @@ def test_gaussian_truncate():
|
|
|
|
class TestThreading(TestCase):
|
|
def check_func_thread(self, n, fun, args, out):
|
|
- from threading import Thread
|
|
+ from dummy_threading import Thread
|
|
thrds = [Thread(target=fun, args=args, kwargs={'output': out[x]}) for x in range(n)]
|
|
[t.start() for t in thrds]
|
|
[t.join() for t in thrds]
|
|
diff --git a/scipy/signal/signaltools.py b/scipy/signal/signaltools.py
|
|
index df7107684..2b9a18422 100644
|
|
--- a/scipy/signal/signaltools.py
|
|
+++ b/scipy/signal/signaltools.py
|
|
@@ -4,7 +4,7 @@
|
|
from __future__ import division, print_function, absolute_import
|
|
|
|
import warnings
|
|
-import threading
|
|
+import dummy_threading as threading
|
|
|
|
from . import sigtools
|
|
from scipy._lib.six import callable
|
|
diff --git a/scipy/sparse/tests/test_sparsetools.py b/scipy/sparse/tests/test_sparsetools.py
|
|
index 7a3c903cc..cc495d500 100644
|
|
--- a/scipy/sparse/tests/test_sparsetools.py
|
|
+++ b/scipy/sparse/tests/test_sparsetools.py
|
|
@@ -4,7 +4,7 @@ import sys
|
|
import os
|
|
import gc
|
|
import re
|
|
-import threading
|
|
+import dummy_threading as threading
|
|
|
|
from nose import SkipTest
|
|
import numpy as np
|
|
diff --git a/scipy/spatial/ckdtree.pyx b/scipy/spatial/ckdtree.pyx
|
|
index 2f98613a7..c9f657cf3 100644
|
|
--- a/scipy/spatial/ckdtree.pyx
|
|
+++ b/scipy/spatial/ckdtree.pyx
|
|
@@ -17,8 +17,7 @@ from libc.string cimport memset, memcpy
|
|
|
|
cimport cython
|
|
|
|
-from multiprocessing import cpu_count
|
|
-import threading
|
|
+import dummy_threading as threading
|
|
|
|
cdef extern from "limits.h":
|
|
long LONG_MAX
|
|
@@ -26,7 +25,7 @@ cdef extern from "limits.h":
|
|
cdef extern from "ckdtree_methods.h":
|
|
int number_of_processors
|
|
|
|
-number_of_processors = cpu_count()
|
|
+number_of_processors = 1
|
|
|
|
from libcpp.vector cimport vector
|
|
from libc cimport string
|
|
@@ -91,7 +90,7 @@ cdef extern from "cpp_utils.h":
|
|
# coo_entry wrapper
|
|
# =================
|
|
|
|
-cdef class coo_entries:
|
|
+cdef class coo_entries(object):
|
|
|
|
cdef:
|
|
readonly object __array_interface__
|
|
diff --git a/scipy/spatial/qhull.pyx b/scipy/spatial/qhull.pyx
|
|
index ba33fadbe..644a57eaf 100644
|
|
--- a/scipy/spatial/qhull.pyx
|
|
+++ b/scipy/spatial/qhull.pyx
|
|
@@ -10,7 +10,7 @@ Wrappers for Qhull triangulation, plus some additional N-D geometry utilities
|
|
# Distributed under the same BSD license as Scipy.
|
|
#
|
|
|
|
-import threading
|
|
+import dummy_threading as threading
|
|
import numpy as np
|
|
cimport numpy as np
|
|
cimport cython
|
|
diff --git a/scipy/special/_ellip_harm.py b/scipy/special/_ellip_harm.py
|
|
index 62e50655e..61e9949cc 100644
|
|
--- a/scipy/special/_ellip_harm.py
|
|
+++ b/scipy/special/_ellip_harm.py
|
|
@@ -1,6 +1,6 @@
|
|
from __future__ import division, print_function, absolute_import
|
|
|
|
-import threading
|
|
+import dummy_threading as threading
|
|
import numpy as np
|
|
|
|
from ._ufuncs import _ellip_harm
|