iris-pex-embedded-python 3.1.1b1__py3-none-any.whl → 3.1.1b2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of iris-pex-embedded-python might be problematic. Click here for more details.
- iop/_business_host.py +9 -3
- iop/cls/IOP/Message.cls +79 -19
- iop/cls/IOP/Test.cls +11 -0
- {iris_pex_embedded_python-3.1.1b1.dist-info → iris_pex_embedded_python-3.1.1b2.dist-info}/METADATA +1 -1
- {iris_pex_embedded_python-3.1.1b1.dist-info → iris_pex_embedded_python-3.1.1b2.dist-info}/RECORD +9 -9
- {iris_pex_embedded_python-3.1.1b1.dist-info → iris_pex_embedded_python-3.1.1b2.dist-info}/WHEEL +1 -1
- {iris_pex_embedded_python-3.1.1b1.dist-info → iris_pex_embedded_python-3.1.1b2.dist-info}/LICENSE +0 -0
- {iris_pex_embedded_python-3.1.1b1.dist-info → iris_pex_embedded_python-3.1.1b2.dist-info}/entry_points.txt +0 -0
- {iris_pex_embedded_python-3.1.1b1.dist-info → iris_pex_embedded_python-3.1.1b2.dist-info}/top_level.txt +0 -0
iop/_business_host.py
CHANGED
|
@@ -265,8 +265,10 @@ class _BusinessHost(_Common):
|
|
|
265
265
|
msg = iris.cls('IOP.Message')._New()
|
|
266
266
|
msg.classname = module + "." + classname
|
|
267
267
|
|
|
268
|
-
|
|
269
|
-
|
|
268
|
+
if hasattr(message, 'buffer') and len(json_string) > msg.buffer:
|
|
269
|
+
msg.json = _Utils.string_to_stream(json_string)
|
|
270
|
+
else:
|
|
271
|
+
msg.json = json_string
|
|
270
272
|
|
|
271
273
|
return msg
|
|
272
274
|
|
|
@@ -321,7 +323,11 @@ class _BusinessHost(_Common):
|
|
|
321
323
|
except Exception:
|
|
322
324
|
raise ImportError("Class not found: " + classname)
|
|
323
325
|
|
|
324
|
-
string =
|
|
326
|
+
string = ""
|
|
327
|
+
if (serial.type == 'Stream'):
|
|
328
|
+
string = _Utils.stream_to_string(serial.json)
|
|
329
|
+
else:
|
|
330
|
+
string = serial.json
|
|
325
331
|
|
|
326
332
|
jdict = json.loads(string, cls=IrisJSONDecoder)
|
|
327
333
|
msg = self._dataclass_from_dict(msg,jdict)
|
iop/cls/IOP/Message.cls
CHANGED
|
@@ -7,54 +7,105 @@ Class IOP.Message Extends (Ens.MessageBody, %CSP.Page, %XML.Adaptor)
|
|
|
7
7
|
|
|
8
8
|
Parameter BUFFER = 64000;
|
|
9
9
|
|
|
10
|
+
Property buffer As %String(MAXLEN = "") [ Calculated, Transient ];
|
|
11
|
+
|
|
10
12
|
Property classname As %String(MAXLEN = "");
|
|
11
13
|
|
|
12
14
|
Property jsonObject As %DynamicObject(XMLPROJECTION = "None");
|
|
13
15
|
|
|
14
16
|
Property json As %String(MAXLEN = "");
|
|
15
17
|
|
|
18
|
+
Property jsonStream As %Stream.GlobalCharacter [ Internal, ReadOnly ];
|
|
19
|
+
|
|
20
|
+
Property jsonString As %String(MAXLEN = 64000) [ Internal, ReadOnly ];
|
|
21
|
+
|
|
16
22
|
Property jstr As %Stream.GlobalCharacter [ Internal, Private ];
|
|
17
23
|
|
|
24
|
+
// for retrocompatibility
|
|
25
|
+
|
|
26
|
+
Property type As %String(MAXLEN = 6) [ ReadOnly ];
|
|
27
|
+
|
|
28
|
+
Method bufferGet()
|
|
29
|
+
{
|
|
30
|
+
Quit ..#BUFFER
|
|
31
|
+
}
|
|
32
|
+
|
|
18
33
|
Method %OnNew(classname) As %Status [ Private, ServerOnly = 1 ]
|
|
19
34
|
{
|
|
20
35
|
set ..classname = $g(classname)
|
|
21
36
|
Quit $$$OK
|
|
22
37
|
}
|
|
23
38
|
|
|
24
|
-
Method
|
|
39
|
+
Method jstrGet()
|
|
25
40
|
{
|
|
26
|
-
|
|
41
|
+
set rsp = $$$NULLOREF
|
|
42
|
+
// Get as stream no matter what
|
|
43
|
+
if ..type="String" {
|
|
44
|
+
Set rsp = ##class(%Stream.GlobalCharacter).%New()
|
|
45
|
+
Set sc = rsp.Write(..jsonString)
|
|
46
|
+
}
|
|
47
|
+
elseif ..type="Stream" {
|
|
48
|
+
set rsp = ..jsonStream
|
|
49
|
+
}
|
|
50
|
+
Quit rsp
|
|
27
51
|
}
|
|
28
52
|
|
|
29
|
-
Method
|
|
53
|
+
Method jstrSet(pInput) As %Status
|
|
30
54
|
{
|
|
31
|
-
|
|
32
|
-
set
|
|
33
|
-
|
|
34
|
-
|
|
55
|
+
// Set as stream no matter what
|
|
56
|
+
set sc = ..jsonSet(pInput)
|
|
57
|
+
if $$$ISERR(sc) { Quit sc }
|
|
58
|
+
if ..type="String" {
|
|
59
|
+
set stream = ##class(%Stream.GlobalCharacter).%New()
|
|
60
|
+
Set sc = stream.Write(..jsonString)
|
|
61
|
+
set r%jsonStream = stream
|
|
62
|
+
set i%type = "Stream"
|
|
63
|
+
}
|
|
64
|
+
Quit sc
|
|
35
65
|
}
|
|
36
66
|
|
|
37
|
-
Method
|
|
67
|
+
Method jsonGet()
|
|
38
68
|
{
|
|
39
|
-
|
|
69
|
+
Quit $Case(..type
|
|
70
|
+
, "String":..jsonString
|
|
71
|
+
, "Stream":..jsonStream
|
|
72
|
+
, :$$$NULLOREF)
|
|
40
73
|
}
|
|
41
74
|
|
|
42
|
-
Method %
|
|
43
|
-
property As %String,
|
|
44
|
-
value)
|
|
75
|
+
Method jsonSet(pInput) As %Status
|
|
45
76
|
{
|
|
46
|
-
|
|
47
|
-
|
|
77
|
+
Set tOldStream=$Case(..type
|
|
78
|
+
, "String":..jsonString
|
|
79
|
+
, "Stream":..jsonStream
|
|
80
|
+
, :$$$NULLOREF)
|
|
81
|
+
Quit:tOldStream=pInput $$$OK
|
|
82
|
+
Do:..type'="" Clear() Set i%type=""
|
|
83
|
+
If $ISOBJECT(pInput) && pInput.%Extends("%Stream.GlobalCharacter") {
|
|
84
|
+
Set r%jsonStream=pInput, i%type="Stream"
|
|
85
|
+
}
|
|
86
|
+
If $IsObject(pInput) && 'pInput.%Extends("%Stream.GlobalCharacter") {
|
|
87
|
+
Throw ##class(%Exception.General).%New("Invalid input type, must be a %Stream.GlobalCharacter")
|
|
88
|
+
}
|
|
89
|
+
Else {
|
|
90
|
+
Set i%jsonString=pInput, i%type="String"
|
|
91
|
+
}
|
|
92
|
+
Quit $$$OK
|
|
93
|
+
Clear()
|
|
94
|
+
If ..type="String" { Set r%jsonString="" }
|
|
95
|
+
ElseIf ..type="Stream" { Set r%jsonStream=$$$NULLOREF }
|
|
96
|
+
Quit
|
|
48
97
|
}
|
|
49
98
|
|
|
50
99
|
Method GetObjectJson(ByRef atEnd)
|
|
51
100
|
{
|
|
52
101
|
set atEnd = 1
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
102
|
+
if ..type = "String" {
|
|
103
|
+
set json = ..jsonString
|
|
104
|
+
}
|
|
105
|
+
elseif ..type = "Stream" {
|
|
106
|
+
do ..jsonStream.Rewind()
|
|
107
|
+
set json = ..jsonStream.Read(..#BUFFER)
|
|
108
|
+
set atEnd = ..jsonStream.AtEnd
|
|
58
109
|
}
|
|
59
110
|
QUIT json
|
|
60
111
|
}
|
|
@@ -115,6 +166,15 @@ Storage Default
|
|
|
115
166
|
<Value name="3">
|
|
116
167
|
<Value>jstr</Value>
|
|
117
168
|
</Value>
|
|
169
|
+
<Value name="4">
|
|
170
|
+
<Value>jsonStream</Value>
|
|
171
|
+
</Value>
|
|
172
|
+
<Value name="5">
|
|
173
|
+
<Value>type</Value>
|
|
174
|
+
</Value>
|
|
175
|
+
<Value name="6">
|
|
176
|
+
<Value>jsonString</Value>
|
|
177
|
+
</Value>
|
|
118
178
|
</Data>
|
|
119
179
|
<Data name="jsonObject">
|
|
120
180
|
<Attribute>jsonObject</Attribute>
|
iop/cls/IOP/Test.cls
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
Class IOP.Test Extends %Persistent
|
|
3
3
|
{
|
|
4
4
|
|
|
5
|
+
/// Description
|
|
6
|
+
ClassMethod TEST() As %Status
|
|
7
|
+
{
|
|
8
|
+
set msg = ##class(IOP.Message).%New()
|
|
9
|
+
set msg.classname = "IOP.Message"
|
|
10
|
+
set msg.json = "{""name"":""John""}"
|
|
11
|
+
set tset = msg.json
|
|
12
|
+
set tst = msg.jstr
|
|
13
|
+
QUIT $$$OK
|
|
14
|
+
}
|
|
15
|
+
|
|
5
16
|
/// Register
|
|
6
17
|
ClassMethod Register() As %Status
|
|
7
18
|
{
|
{iris_pex_embedded_python-3.1.1b1.dist-info → iris_pex_embedded_python-3.1.1b2.dist-info}/RECORD
RENAMED
|
@@ -92,7 +92,7 @@ intersystems_iris/pex/_OutboundAdapter.py,sha256=ao2Ubbta2DcrQGdzDUD_j1Zsk8bvUfc
|
|
|
92
92
|
intersystems_iris/pex/__init__.py,sha256=l_I1dpnluWawbFrGMDC0GLHpuHwjbpd-nho8otFX6TE,1379
|
|
93
93
|
iop/__init__.py,sha256=zHFF0Znipx1fwHYUEBZjNOYoZH1ro7z4IgYDU32kdn0,1067
|
|
94
94
|
iop/__main__.py,sha256=pQzVtkDhAeI6dpNRC632dVk2SGZZIEDwDufdgZe8VWs,98
|
|
95
|
-
iop/_business_host.py,sha256=
|
|
95
|
+
iop/_business_host.py,sha256=Z0h9Yp-Q8u-Jh8n-h0R8M3tiDFPJdL2pDcgjeTEnvn4,28150
|
|
96
96
|
iop/_business_operation.py,sha256=P824IzO89LCKnoNHZk64OZBDHcomHpjhKmMT89bS6TI,3500
|
|
97
97
|
iop/_business_process.py,sha256=F4NIQcwQ5u8yiAPpaN14OAXxbKJsRAGm5S4lrbgA3oI,13296
|
|
98
98
|
iop/_business_service.py,sha256=sX8J-2-0Go6uIuPYa0A5N9Nn9rY5lV6a05v4q78qDC8,3726
|
|
@@ -112,10 +112,10 @@ iop/cls/IOP/BusinessService.cls,sha256=7ebn32J9PiZXUgXuh5Xxm_7X6zHBiqkJr9c_dWxbP
|
|
|
112
112
|
iop/cls/IOP/Common.cls,sha256=vYTnsL-ch-vTjpigBtwOHgrnOQMmuTkqXT9F-vWE650,11068
|
|
113
113
|
iop/cls/IOP/Director.cls,sha256=DlxyFvsJjB1FVImFVNkRpQy7XXIMRoDZOLpEdMlwgOU,1885
|
|
114
114
|
iop/cls/IOP/InboundAdapter.cls,sha256=GeoCm6q5HcLJ5e4VxgqXiErJXqolBbpKwpunaNzpvjU,610
|
|
115
|
-
iop/cls/IOP/Message.cls,sha256=
|
|
115
|
+
iop/cls/IOP/Message.cls,sha256=DXXYF57YS-IQAyru8MQiEBo9UE3vgn6518_yVl2BepE,9660
|
|
116
116
|
iop/cls/IOP/OutboundAdapter.cls,sha256=9eOwy5ojwcTzwrHs6LNrFQvUD8aqcoNCZrILN1ycdDM,958
|
|
117
117
|
iop/cls/IOP/PickleMessage.cls,sha256=S3y7AClQ8mAILjxPuHdCjGosBZYzGbUQ5WTv4mYPNMQ,1673
|
|
118
|
-
iop/cls/IOP/Test.cls,sha256=
|
|
118
|
+
iop/cls/IOP/Test.cls,sha256=I11dVr44_XKgg-i_JvgPq9AeHwNnlfD226bgM5MSx7E,1775
|
|
119
119
|
iop/cls/IOP/Utils.cls,sha256=VwIeWxbeC6LkoDuBN0vhias-pkeLp7mbcC_4MPnzQ8g,13757
|
|
120
120
|
iop/cls/IOP/Duplex/Operation.cls,sha256=K_fmgeLjPZQbHgNrc0kd6DUQoW0fDn1VHQjJxHo95Zk,525
|
|
121
121
|
iop/cls/IOP/Duplex/Process.cls,sha256=xbefZ4z84a_IUhavWN6P_gZBzqkdJ5XRTXxro6iDvAg,6986
|
|
@@ -135,9 +135,9 @@ iris/iris_ipm.pyi,sha256=j7CNUZcjeDu5sgeWUZJO_Qi4vQmHh6aD-jPWv8OdoUs,374
|
|
|
135
135
|
iris/iris_utils.py,sha256=kg80O3yRpHIutM-mCyr4xCeTvKWPE-Kai-b6Dxw4vQ4,9882
|
|
136
136
|
irisnative/_IRISNative.py,sha256=HQ4nBhc8t8_5OtxdMG-kx1aa-T1znf2I8obZOPLOPzg,665
|
|
137
137
|
irisnative/__init__.py,sha256=6YmvBLQSURsCPKaNg7LK-xpo4ipDjrlhKuwdfdNb3Kg,341
|
|
138
|
-
iris_pex_embedded_python-3.1.
|
|
139
|
-
iris_pex_embedded_python-3.1.
|
|
140
|
-
iris_pex_embedded_python-3.1.
|
|
141
|
-
iris_pex_embedded_python-3.1.
|
|
142
|
-
iris_pex_embedded_python-3.1.
|
|
143
|
-
iris_pex_embedded_python-3.1.
|
|
138
|
+
iris_pex_embedded_python-3.1.1b2.dist-info/LICENSE,sha256=rZSiBFId_sfbJ6RL0GjjPX-InNLkNS9ou7eQsikciI8,1089
|
|
139
|
+
iris_pex_embedded_python-3.1.1b2.dist-info/METADATA,sha256=ntJ_H35hi4dL3SLkXgSaAzRN_pAX4l2KMpccSzd1Scs,49482
|
|
140
|
+
iris_pex_embedded_python-3.1.1b2.dist-info/WHEEL,sha256=Rp8gFpivVLXx-k3U95ozHnQw8yDcPxmhOpn_Gx8d5nc,91
|
|
141
|
+
iris_pex_embedded_python-3.1.1b2.dist-info/entry_points.txt,sha256=pj-i4LSDyiSP6xpHlVjMCbg1Pik7dC3_sdGY3Yp9Vhk,38
|
|
142
|
+
iris_pex_embedded_python-3.1.1b2.dist-info/top_level.txt,sha256=jkWtvFKOp1Q-uO_VpGpfx5TcW7DS39z1liOAVp6zLig,47
|
|
143
|
+
iris_pex_embedded_python-3.1.1b2.dist-info/RECORD,,
|
{iris_pex_embedded_python-3.1.1b1.dist-info → iris_pex_embedded_python-3.1.1b2.dist-info}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|