iris-pex-embedded-python 3.1.1b6__py3-none-any.whl → 3.1.2__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/_director.py CHANGED
@@ -258,7 +258,7 @@ class _Director():
258
258
  message = iris.cls("IOP.Message")._New()
259
259
  message.classname = classname
260
260
  if body:
261
- message.json = _Utils.string_to_stream(body)
261
+ message.json = body
262
262
  else:
263
263
  message.json = _Utils.string_to_stream("{}")
264
264
  # serialize the message
iop/_utils.py CHANGED
@@ -216,8 +216,6 @@ class _Utils():
216
216
  except AttributeError:
217
217
  print("No productions to register")
218
218
  try:
219
- # remove the path from the system path (with or without the trailing slash)
220
- sys.path.remove(path+'/')
221
219
  sys.path.remove(path)
222
220
  except ValueError:
223
221
  pass
iop/cls/IOP/Director.cls CHANGED
@@ -9,6 +9,8 @@ Class IOP.Director [ Inheritance = right, ProcedureBlock, System = 4 ]
9
9
 
10
10
  ClassMethod dispatchCreateBusinessService(pTargetDispatchName As %String) As Ens.BusinessService
11
11
  {
12
+ // Hack to prevent job to be registered in the production
13
+ do ##class(Ens.Job).UnRegister(pTargetDispatchName,$JOB)
12
14
  set tSC = ##class(Ens.Director).CreateBusinessService(pTargetDispatchName,.service)
13
15
  if $$$ISERR(tSC) throw ##class(%Exception.StatusException).CreateFromStatus(tSC)
14
16
  quit service
iop/cls/IOP/Utils.cls CHANGED
@@ -125,16 +125,24 @@ ClassMethod GetRemoteClassInfo(
125
125
  set importlib = ##class(%SYS.Python).Import("importlib")
126
126
  set builtins = ##class(%SYS.Python).Import("builtins")
127
127
  set sys = ##class(%SYS.Python).Import("sys")
128
+ set os = ##class(%SYS.Python).Import("os")
128
129
  // Load the module form a specific path
129
- set spec = importlib.util."spec_from_file_location"(pModule, onePath_pModule_".py")
130
- set module = importlib.util."module_from_spec"(spec)
131
- do sys.modules."__setitem__"(pModule, module)
132
- do spec.loader."exec_module"(module)
130
+ // Guess the full path to the module
131
+ set path = ..GuessFullPath(pModule, onePath)
132
+ Try {
133
+ set spec = importlib.util."spec_from_file_location"(pModule, path)
134
+ set module = importlib.util."module_from_spec"(spec)
135
+ do sys.modules."__setitem__"(pModule, module)
136
+ do spec.loader."exec_module"(module)
137
+ }
138
+ Catch ex {
139
+ set module = importlib."import_module"(pModule)
140
+ }
141
+
133
142
  // Get the class
134
143
  set class = builtins.getattr(module, pRemoteClassname)
135
144
  set tClass = class."__new__"(class)
136
145
 
137
-
138
146
  If $IsObject(tClass) {
139
147
  #; List of information about the class as a whole - $lb(SuperClass, Description, InfoURL, IconURL, Adapter)
140
148
  Set pClassDetails = tClass."_get_info"()
@@ -152,13 +160,21 @@ ClassMethod GetRemoteClassInfo(
152
160
  Quit tSC
153
161
  }
154
162
 
155
- /// Set tConnectionSettings("Classpaths") = pCLASSPATHS
156
- /// Set tConnectionSettings("Module") = pModule
157
- /// Set tConnectionSettings("Classname") = pRemoteClassname
158
- /// Set:(""=pProxyClassname) pProxyClassname = pRemoteClassname
159
- ///
160
- /// Set tSC = ..GenerateProxyClass(pProxyClassname,.tConnectionSettings,tClassDetails,tRemoteSettings,pOverwrite)
161
- /// "bo","Duplex","/irisdev/app/src/python/demo/duplex/",1,"Duplex.Duplex"
163
+ ClassMethod GuessFullPath(
164
+ module As %String,
165
+ path As %String) As %String
166
+ {
167
+ If $Find(module, ".") {
168
+ Set module = $Piece(module, ".", *)
169
+ }
170
+ If $Find(path, module) {
171
+ Set path = $Piece(path, module, 1)
172
+ }
173
+ // append the module to the path
174
+ Set path = path _ module _ ".py"
175
+ Return path
176
+ }
177
+
162
178
  ClassMethod GenerateProxyClass(
163
179
  pClassname As %String,
164
180
  ByRef pConnectionSettings,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iris_pex_embedded_python
3
- Version: 3.1.1b6
3
+ Version: 3.1.2
4
4
  Summary: Iris Interoperability based on Embedded Python
5
5
  Author-email: grongier <guillaume.rongier@intersystems.com>
6
6
  License: MIT License
@@ -115,6 +115,7 @@ This proof of concept aims to show how the **iris interoperability framework** c
115
115
  - [7.11. version](#711-version)
116
116
  - [7.12. log](#712-log)
117
117
  - [8. Credits](#8-credits)
118
+ - [9. Benchmarks](#9-benchmarks)
118
119
 
119
120
  ## 1.2. Example
120
121
 
@@ -1383,3 +1384,20 @@ output :
1383
1384
  Most of the code came from PEX for Python by Mo Cheng and Summer Gerry.
1384
1385
 
1385
1386
  Works only on IRIS 2021.2 +
1387
+
1388
+ # 9. Benchmarks
1389
+
1390
+ 8 senarios with thoses parameters :
1391
+ - 100 messages
1392
+ - body : simple string `test`
1393
+
1394
+ | Scenario | Time (s) |
1395
+ | --- | --- |
1396
+ | Python BP to Python BO with Iris Message | 0.739 |
1397
+ | Python BP to Python BO with Python Message | 0.732 |
1398
+ | ObjetScript BP to Python BO with Iris Message | 0.594 |
1399
+ | ObjetScript BP to Python BO with Python Message | 0.642 |
1400
+ | Python BP to ObjetScript BO with Iris Message | 0.642 |
1401
+ | Python BP to ObjetScript BO with Python Message | 0.675 |
1402
+ | ObjetScript BP to ObjetScript BO with Iris Message | 0.159 |
1403
+ | ObjetScript BP to ObjetScript BO with Python Message | 0.182 |
@@ -98,25 +98,25 @@ iop/_business_process.py,sha256=F4NIQcwQ5u8yiAPpaN14OAXxbKJsRAGm5S4lrbgA3oI,1329
98
98
  iop/_business_service.py,sha256=sX8J-2-0Go6uIuPYa0A5N9Nn9rY5lV6a05v4q78qDC8,3726
99
99
  iop/_cli.py,sha256=yg4wv1FkhgjmoZuTMUr61Ff21PegJDH_cpZeHcF8hQE,6207
100
100
  iop/_common.py,sha256=uKJdfCSPOjVQOg8GVuUj4ywfAn_2sPB3C82HbWw_5bI,15384
101
- iop/_director.py,sha256=t4hBkYRUFwkNFNK6pCmrVVsPELlGYqvSsSNBPIJe1e8,11041
101
+ iop/_director.py,sha256=TFkhci40zgq271zB9SYGK24TZtOcYZCTNzWFkA4I2IM,11016
102
102
  iop/_inbound_adapter.py,sha256=PS5ToqhrYcXq9ZdLbCBqAfVp8kCeRACm_KF66pwBO9U,1652
103
103
  iop/_message.py,sha256=BmwBXriykU66bwAgRbdkMpjfJRVWoNRX2eDc9TXfXzA,325
104
104
  iop/_outbound_adapter.py,sha256=YTAhLrRf9chEAd53mV6KKbpaHOKNOKJHoGgj5wakRR0,726
105
105
  iop/_pickle_message.py,sha256=noKfc2VkXufV3fqjKvNHN_oANQ1YN9ffCaSV0XSTAIE,331
106
106
  iop/_private_session_duplex.py,sha256=klzWKwRRBoKUSz85D3DNYuCpDcZe_kWLNCWq5JtR0yc,5044
107
107
  iop/_private_session_process.py,sha256=pGjWFOQhWpQxUVpTtvNKTPvDxgzjfw0VC4Aqj3KUq8w,1704
108
- iop/_utils.py,sha256=-s1i_bZlmrcXm732A3VjzRNaZWf6vVT31v04-gMmNDQ,17291
108
+ iop/_utils.py,sha256=UYfBINcrwK9Uh3sfd8xA46RzGE8N5rmGz6wLhHnxExE,17165
109
109
  iop/cls/IOP/BusinessOperation.cls,sha256=lrymqZ8wHl5kJjXwdjbQVs5sScV__yIWGh-oGbiB_X0,914
110
110
  iop/cls/IOP/BusinessProcess.cls,sha256=s3t38w1ykHqM26ETcbCYLt0ocjZyVVahm-_USZkuJ1E,2855
111
111
  iop/cls/IOP/BusinessService.cls,sha256=7ebn32J9PiZXUgXuh5Xxm_7X6zHBiqkJr9c_dWxbPO8,1021
112
112
  iop/cls/IOP/Common.cls,sha256=vYTnsL-ch-vTjpigBtwOHgrnOQMmuTkqXT9F-vWE650,11068
113
- iop/cls/IOP/Director.cls,sha256=DlxyFvsJjB1FVImFVNkRpQy7XXIMRoDZOLpEdMlwgOU,1885
113
+ iop/cls/IOP/Director.cls,sha256=Wd5iwiRd9XSt7G18Ga3XAIPSuIrPYVumbCEjYrkZHBs,2002
114
114
  iop/cls/IOP/InboundAdapter.cls,sha256=GeoCm6q5HcLJ5e4VxgqXiErJXqolBbpKwpunaNzpvjU,610
115
115
  iop/cls/IOP/Message.cls,sha256=n0r0FslXdDfPcHIiAlW7n596DDsDSNlTX8UTPaMnSV8,9911
116
116
  iop/cls/IOP/OutboundAdapter.cls,sha256=9eOwy5ojwcTzwrHs6LNrFQvUD8aqcoNCZrILN1ycdDM,958
117
117
  iop/cls/IOP/PickleMessage.cls,sha256=S3y7AClQ8mAILjxPuHdCjGosBZYzGbUQ5WTv4mYPNMQ,1673
118
118
  iop/cls/IOP/Test.cls,sha256=gAC9PEfMZsvAEWIa241-ug2FWAhITbN1SOispZzJPnI,2094
119
- iop/cls/IOP/Utils.cls,sha256=UgSEH2gqiNKYK_NAc2QUXF0A0VXHK-vbwWsHplHV2T8,13994
119
+ iop/cls/IOP/Utils.cls,sha256=1fkb3ff-FhRRx5nIqPUzj7sndlo0ptHfOvMoC4bw0eY,14073
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
122
122
  iop/cls/IOP/Duplex/Service.cls,sha256=sTMOQUCMBgVitmQkM8bbsrmrRtCdj91VlctJ3I7b8WU,161
@@ -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.1b6.dist-info/LICENSE,sha256=rZSiBFId_sfbJ6RL0GjjPX-InNLkNS9ou7eQsikciI8,1089
139
- iris_pex_embedded_python-3.1.1b6.dist-info/METADATA,sha256=XIjDGYcjx0NTMnGjgqBFuPBfw2YwPo-gWdsJzvwC0bs,49479
140
- iris_pex_embedded_python-3.1.1b6.dist-info/WHEEL,sha256=UvcQYKBHoFqaQd6LKyqHw9fxEolWLQnlzP0h_LgJAfI,91
141
- iris_pex_embedded_python-3.1.1b6.dist-info/entry_points.txt,sha256=pj-i4LSDyiSP6xpHlVjMCbg1Pik7dC3_sdGY3Yp9Vhk,38
142
- iris_pex_embedded_python-3.1.1b6.dist-info/top_level.txt,sha256=jkWtvFKOp1Q-uO_VpGpfx5TcW7DS39z1liOAVp6zLig,47
143
- iris_pex_embedded_python-3.1.1b6.dist-info/RECORD,,
138
+ iris_pex_embedded_python-3.1.2.dist-info/LICENSE,sha256=rZSiBFId_sfbJ6RL0GjjPX-InNLkNS9ou7eQsikciI8,1089
139
+ iris_pex_embedded_python-3.1.2.dist-info/METADATA,sha256=Kx_H2-6EMcf6mzT3B-eHL2uI3VByXxlssESfquC7u1M,50120
140
+ iris_pex_embedded_python-3.1.2.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
141
+ iris_pex_embedded_python-3.1.2.dist-info/entry_points.txt,sha256=pj-i4LSDyiSP6xpHlVjMCbg1Pik7dC3_sdGY3Yp9Vhk,38
142
+ iris_pex_embedded_python-3.1.2.dist-info/top_level.txt,sha256=jkWtvFKOp1Q-uO_VpGpfx5TcW7DS39z1liOAVp6zLig,47
143
+ iris_pex_embedded_python-3.1.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (74.0.0)
2
+ Generator: setuptools (74.1.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5