File tree Expand file tree Collapse file tree 5 files changed +15
-21
lines changed Expand file tree Collapse file tree 5 files changed +15
-21
lines changed Original file line number Diff line number Diff line change 11import array
22import json as _json
33import os
4- from glob import glob
54import platform
65import sys
6+ from glob import glob
77
88import numpy as np
99import pytest
Original file line number Diff line number Diff line change 1212
1313
1414from numcodecs .tests .common import (
15- is_wasm ,
1615 check_backwards_compatibility ,
1716 check_config ,
1817 check_encode_decode ,
1918 check_encode_decode_partial ,
2019 check_err_decode_object_buffer ,
2120 check_err_encode_object_buffer ,
2221 check_max_buffer_size ,
22+ is_wasm ,
2323)
2424
2525codecs = [
@@ -226,11 +226,8 @@ def _decode_worker(enc):
226226 return data
227227
228228
229- @pytest .mark .skipif (
230- is_wasm ,
231- reason = "WASM/Pyodide does not support multiprocessing"
232- )
233- @pytest .mark .parametrize ('pool' , (Pool , ThreadPool ))
229+ @pytest .mark .skipif (is_wasm , reason = "WASM/Pyodide does not support multiprocessing" )
230+ @pytest .mark .parametrize ('pool' , [Pool , ThreadPool ])
234231def test_multiprocessing (use_threads , pool ):
235232 data = np .arange (1000000 )
236233 enc = _encode_worker (data )
Original file line number Diff line number Diff line change 1111
1212
1313from numcodecs .tests .common import (
14- is_wasm ,
1514 check_backwards_compatibility ,
1615 check_config ,
1716 check_encode_decode ,
17+ is_wasm ,
1818)
1919
2020codecs = [
@@ -90,11 +90,8 @@ def _decode_worker(enc):
9090 return data
9191
9292
93- @pytest .mark .skipif (
94- is_wasm ,
95- reason = "WASM/Pyodide does not support multiprocessing"
96- )
97- @pytest .mark .parametrize ('pool' , (Pool , ThreadPool ))
93+ @pytest .mark .skipif (is_wasm , reason = "WASM/Pyodide does not support multiprocessing" )
94+ @pytest .mark .parametrize ('pool' , [Pool , ThreadPool ])
9895def test_multiprocessing (pool ):
9996 data = np .arange (1000000 )
10097 enc = _encode_worker (data )
Original file line number Diff line number Diff line change @@ -17,18 +17,18 @@ index 3bfdc00..c6521b7 100644
1717+ mutex = None
1818 except OSError:
1919 mutex = None
20-
20+
2121diff --git a/c-blosc/blosc/blosc.h b/c-blosc/blosc/blosc.h
2222index 40857d0..8a1e969 100644
2323--- a/c-blosc/blosc/blosc.h
2424+++ b/c-blosc/blosc/blosc.h
2525@@ -50,7 +50,7 @@ extern "C" {
2626 ((INT_MAX - BLOSC_MAX_TYPESIZE * sizeof(int32_t)) / 3)
27-
27+
2828 /* The maximum number of threads (for some static arrays) */
2929- #define BLOSC_MAX_THREADS 256
3030+ #define BLOSC_MAX_THREADS 1
31-
31+
3232 /* Codes for shuffling (see blosc_compress) */
3333 #define BLOSC_NOSHUFFLE 0 /* no shuffle */
3434
@@ -37,11 +37,11 @@ index a5a5bd5..2a7797c 100644
3737--- a/c-blosc/blosc/blosc.c
3838+++ b/c-blosc/blosc/blosc.c
3939@@ -2236,6 +2236,7 @@ void blosc_atfork_child(void) {
40-
40+
4141 void blosc_init(void)
4242 {
4343+ g_initlib = 1;
4444 /* Return if we are already initialized */
4545 if (g_initlib) return;
46-
46+
4747
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ index fae202e..80606a6 100644
1616-
1717+ #include <unistd.h>
1818 #include "gzguts.h"
19-
19+
2020 #if defined(_WIN32) && !defined(__BORLANDC__)
2121
2222diff --git a/c-blosc/internal-complibs/zlib-1.2.13/gzread.c b/c-blosc/internal-complibs/zlib-1.2.13/gzread.c
@@ -30,7 +30,7 @@ index bf4538e..afe6acd 100644
3030-
3131+ #include <unistd.h>
3232 #include "gzguts.h"
33-
33+
3434 /* Local functions */
3535
3636
@@ -45,5 +45,5 @@ index aa767fb..a87676f 100644
4545-
4646+ #include <unistd.h>
4747 #include "gzguts.h"
48-
48+
4949 /* Local functions */
You can’t perform that action at this time.
0 commit comments