From cc70d78b1d324e619e5604a3d4493821f2bfbefd Mon Sep 17 00:00:00 2001 From: Tom White Date: Wed, 5 Sep 2018 16:17:33 +0100 Subject: [PATCH 1/2] Run on lambda --- numcodecs/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/numcodecs/__init__.py b/numcodecs/__init__.py index bd0a5461..ab7ae73d 100644 --- a/numcodecs/__init__.py +++ b/numcodecs/__init__.py @@ -44,7 +44,10 @@ from numcodecs.blosc import Blosc register_codec(Blosc) # initialize blosc - ncores = multiprocessing.cpu_count() + try: + ncores = multiprocessing.cpu_count() + except OSError: + ncores = 1 blosc.init() blosc.set_nthreads(min(8, ncores)) atexit.register(blosc.destroy) From 3ef5e576af21a1f455daf51696907fa4e107c801 Mon Sep 17 00:00:00 2001 From: Alistair Miles Date: Tue, 6 Nov 2018 11:03:41 -0500 Subject: [PATCH 2/2] release notes [ci skip] --- docs/release.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/release.rst b/docs/release.rst index 71a6c243..745205e7 100644 --- a/docs/release.rst +++ b/docs/release.rst @@ -18,8 +18,9 @@ Release notes * Updated the msgpack dependency (by :user:`Jerome Kelleher `; :issue:`74`, :issue:`75`). -* Allow :class:`Blosc` compressor to run on systems where locks are not present (by - :user:`Marcus Kinsella `; :issue:`#83`). +* Allow :class:`Blosc` compressor to run on systems where locks are not present (by + :user:`Marcus Kinsella `, :issue:`83`; and :user:`Tom White `, + :issue:`93`). * Drop Python 3.4 (by :user:`John Kirkham `; :issue:`89`). @@ -61,7 +62,7 @@ Release notes * Add support for encoding None values in VLen... codecs (:issue:`59`). - + .. _release_0.5.1: 0.5.1