Skip to content

Commit 401c70f

Browse files
author
Dorian Birraux
committed
Merge branch 'master' into docs/fix-serialization
2 parents 6537f41 + 9ac4285 commit 401c70f

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

PacletInfo.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Paclet[
22
Name -> "WolframClientForPython",
3-
Version -> "1.1.1",
3+
Version -> "1.1.2",
44
MathematicaVersion -> "11.3+",
55
Loading -> Automatic,
66
Extensions -> {}

wolframclient/about.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
__name__ = "wolframclient"
44
__description__ = "A Python library with various tools to interact with the Wolfram Language and the Wolfram Cloud."
5-
__version__ = "1.1.1"
5+
__version__ = "1.1.2"
66
__author__ = "Wolfram Research"
77
__author_email__ = "support@wolfram.com, dorianb@wolfram.com, riccardod@wolfram.com"

wolframclient/evaluation/kernel/initkernel.m

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ no matter the total size (tested with 80MB) *)
2121

2222
Begin["`Private`"];
2323

24+
2425
(*Define the most efficient pair of write bytearray and non-blocking read, for various WL versions. *)
25-
{SocketWriteByteArrayFunc, SocketReadByteArrayFuncNoWait} = If[
26+
{SocketWriteByteArrayFunc, SocketReadByteArrayFuncNoWait} = Which[
2627
$VersionNumber < 12,
2728
{
2829
Function[{socketOut, ba}, ZeroMQLink`Private`ZMQWriteInternal[socketOut, Normal[ba]]],
@@ -32,13 +33,23 @@ no matter the total size (tested with 80MB) *)
3233
If[Length[data] >= 3, Part[data,4;;], {}]
3334
]
3435
]
35-
}
36+
},
37+
$VersionNumber < 12.1,
38+
{
39+
Function[{socketOut, ba}, ZMQSocketWriteMessage[socketOut, ba]],
40+
Function[{socketIn},
41+
Block[
42+
{data = iRecvSingleMultipartBinaryMessageSocket[First@socketIn, 1(*Flag NOWAIT*)]},
43+
If[Length[data] >= 3, Part[data,4;;], {}]
44+
]
45+
]
46+
},
47+
True
3648
,
3749
{
3850
ZMQSocketWriteMessage,
3951
SocketReadMessage[#, "Blocking"->False] &
4052
}
41-
4253
];
4354

4455
$DEBUG=1;

0 commit comments

Comments
 (0)