iris-pex-embedded-python 3.4.3b2__py3-none-any.whl → 3.4.3b3__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.

@@ -15,7 +15,7 @@ Method OnMessage(
15
15
  try {
16
16
  set response = ..%class."_dispatch_on_message"(request)
17
17
  } catch ex {
18
- set tSC = ex.AsStatus()
18
+ set tSC = ..DisplayTraceback(ex)
19
19
  }
20
20
  quit tSC
21
21
  }
@@ -27,7 +27,7 @@ Method OnKeepalive(pStatus As %Status = {$$$OK}) As %Status
27
27
  $$$ThrowOnError(##super(pStatus))
28
28
  do ..%class."on_keepalive"()
29
29
  } catch ex {
30
- set tSC = ex.AsStatus()
30
+ set tSC = ..DisplayTraceback(ex)
31
31
  }
32
32
  quit tSC
33
33
  }
@@ -32,8 +32,13 @@ Method dispatchSendRequestAsync(
32
32
  completionKey,
33
33
  description)
34
34
  {
35
- set tSC = ..SendRequestAsync(target,request,responseRequired,completionKey,description)
36
- if $$$ISERR(tSC) throw ##class(%Exception.StatusException).CreateFromStatus(tSC)
35
+ Try {
36
+ $$$ThrowOnError(..SendRequestAsync(target,request,responseRequired,completionKey,description))
37
+ }
38
+ Catch ex {
39
+ set tSC = ..DisplayTraceback(ex)
40
+ }
41
+
37
42
  quit
38
43
  }
39
44
 
@@ -45,7 +50,7 @@ Method OnRequest(
45
50
  try {
46
51
  set response = ..%class."_dispatch_on_request"($this,request)
47
52
  } catch ex {
48
- set tSC = ex.AsStatus()
53
+ set tSC = ..DisplayTraceback(ex)
49
54
  }
50
55
  quit tSC
51
56
  }
@@ -62,7 +67,7 @@ Method OnResponse(
62
67
  try {
63
68
  set response = ..%class."_dispatch_on_response"($this,request,response,callRequest,callResponse,pCompletionKey)
64
69
  } catch ex {
65
- set tSC = ex.AsStatus()
70
+ set tSC = ..DisplayTraceback(ex)
66
71
  }
67
72
  quit tSC
68
73
  }
@@ -75,7 +80,7 @@ Method OnComplete(
75
80
  try {
76
81
  set response = ..%class."_dispatch_on_complete"($this,request,response)
77
82
  } catch ex {
78
- set tSC = ex.AsStatus()
83
+ set tSC = ..DisplayTraceback(ex)
79
84
  }
80
85
  quit tSC
81
86
  }
@@ -111,6 +116,21 @@ Storage Default
111
116
  <Value name="5">
112
117
  <Value>%class</Value>
113
118
  </Value>
119
+ <Value name="6">
120
+ <Value>%enable</Value>
121
+ </Value>
122
+ <Value name="7">
123
+ <Value>%timeout</Value>
124
+ </Value>
125
+ <Value name="8">
126
+ <Value>%port</Value>
127
+ </Value>
128
+ <Value name="9">
129
+ <Value>%PythonInterpreterPath</Value>
130
+ </Value>
131
+ <Value name="10">
132
+ <Value>%traceback</Value>
133
+ </Value>
114
134
  </Data>
115
135
  <Data name="persistentProperties">
116
136
  <Attribute>persistentProperties</Attribute>
@@ -9,8 +9,13 @@ Parameter SETTINGS = "%classname:Python BusinessService,%module:Python BusinessS
9
9
 
10
10
  Method dispatchProcessInput(pInput As %RegisteredObject) As %RegisteredObject
11
11
  {
12
-
13
- quit ..%class."on_process_input"(pInput)
12
+ try {
13
+ set response = ..%class."_dispatch_on_process_input"(pInput)
14
+ } catch ex {
15
+ set tSC = ..DisplayTraceback(ex)
16
+ throw ##class(%Exception.StatusException).CreateFromStatus(tSC)
17
+ }
18
+ quit response
14
19
  }
15
20
 
16
21
  Method OnProcessInput(
@@ -27,7 +32,7 @@ Method OnProcessInput(
27
32
  set ..%WaitForNextCallInterval = ..%class."_wait_for_next_call_interval"
28
33
  } catch {}
29
34
  } catch ex {
30
- set tSC = ex.AsStatus()
35
+ set tSC = ..DisplayTraceback(ex)
31
36
  }
32
37
  quit tSC
33
38
  }
iop/cls/IOP/Common.cls CHANGED
@@ -27,6 +27,8 @@ Property %port As %Numeric [ InitialExpression = 0 ];
27
27
 
28
28
  Property %PythonInterpreterPath As %String(MAXLEN = 255);
29
29
 
30
+ Property %traceback As %Boolean;
31
+
30
32
  /// Get Class
31
33
  Method GetClass() As %SYS.Python
32
34
  {
@@ -45,15 +47,45 @@ Method GetModule() As %String
45
47
  Return ..%module
46
48
  }
47
49
 
50
+ Method DisplayTraceback(ex) As %Status
51
+ {
52
+ set tSC = ex.AsStatus()
53
+ // Check if traceback is enabled
54
+ if ..%traceback {
55
+ // Import Modules
56
+ set sys = ##class(%SYS.Python).Import("sys")
57
+ set tracebackModule = ##class(%SYS.Python).Import("traceback")
58
+ set builtins = ##class(%SYS.Python).Import("builtins")
59
+ // Get the last traceback
60
+ set traceback = sys."last_traceback"
61
+ set exType = sys."last_type"."__name__"
62
+ set exValue = sys."last_value"."__str__"()
63
+ // Check if traceback is an object
64
+ if $isObject(traceback) {
65
+ // Format the traceback
66
+ set tb = tracebackModule."format_exception"(sys."last_type", sys."last_value", traceback)
67
+ set tbString = ""
68
+ for i=0:1:(tb."__len__"()-1) {
69
+ set tbString = tbString _ $c(10)_$c(13) _ tb."__getitem__"(i)
70
+ }
71
+ $$$LOGERROR(tbString)
72
+ set tSC = $$$ERROR($$$EnsErrGeneral,"Exception in Python class: "_..%classname_" - "_exType_" - "_exValue)
73
+ }
74
+ }
75
+ return tSC
76
+ }
77
+
48
78
  Method OnInit() As %Status
49
79
  {
50
80
  set tSC = $$$OK
51
81
  try {
82
+ do $system.Python.Debugging(..%traceback)
52
83
  $$$ThrowOnError(..Connect())
53
84
  do ..%class."_debugpy"($this)
54
85
  do ..%class."_dispatch_on_init"($this)
55
86
  } catch ex {
56
- set tSC = ex.AsStatus()
87
+
88
+ set tSC = ..DisplayTraceback(ex)
57
89
  }
58
90
  quit tSC
59
91
  }
@@ -154,13 +186,14 @@ Method SetPropertyValues()
154
186
  // First list all the properties of the current class
155
187
  set class = $CLASSNAME()
156
188
  set tSQL = "SELECT * FROM %Dictionary.PropertyDefinition WHERE parent = ?"
157
- set tSQL = tSQL _ " AND name <> 'timeout'"
158
- set tSQL = tSQL _ " and name <> 'enable'"
189
+ set tSQL = tSQL _ " AND name <> '%timeout'"
190
+ set tSQL = tSQL _ " and name <> '%enable'"
159
191
  set tSQL = tSQL _ " and name <> '%classpaths'"
160
192
  set tSQL = tSQL _ " and name <> '%classname'"
161
193
  set tSQL = tSQL _ " and name <> '%module'"
162
- set tSQL = tSQL _ " and name <> 'port'"
163
- set tSQL = tSQL _ " and name <> 'PythonInterpreterPath'"
194
+ set tSQL = tSQL _ " and name <> '%port'"
195
+ set tSQL = tSQL _ " and name <> '%PythonInterpreterPath'"
196
+ set tSQL = tSQL _ " and name <> '%traceback'"
164
197
 
165
198
  set tStmt = ##class(%SQL.Statement).%New()
166
199
 
@@ -14,7 +14,7 @@ Method OnTask() As %Status
14
14
  $$$ThrowOnError(..Connect())
15
15
  do ..%class."on_task"()
16
16
  } catch ex {
17
- set tSC = ex.AsStatus()
17
+ set tSC = ..DisplayTraceback(ex)
18
18
  }
19
19
  quit tSC
20
20
  }
@@ -28,7 +28,7 @@ Method OnKeepalive(pStatus As %Status = {$$$OK}) As %Status
28
28
  $$$ThrowOnError(##super(pStatus))
29
29
  do ..%class."on_keepalive"()
30
30
  } catch ex {
31
- set tSC = ex.AsStatus()
31
+ set tSC = ..DisplayTraceback(ex)
32
32
  }
33
33
  quit tSC
34
34
  }
iop/cls/IOP/Utils.cls CHANGED
@@ -226,7 +226,7 @@ ClassMethod GenerateProxyClass(
226
226
  }
227
227
 
228
228
  #; Do not display any of the connection settings
229
- #dim tSETTINGSParamValue As %String = "%classname:Python $type,%module:Python $type,%settings:Python $type,%classpaths:Python $type,%enable:Python Debug $type,%timeout:Python Debug $type,%port:Python Debug $type,%PythonInterpreterPath:Python Debug $type"
229
+ #dim tSETTINGSParamValue As %String = "%classname:Python $type,%module:Python $type,%settings:Python $type,%classpaths:Python $type,%enable:Python Debug $type,%timeout:Python Debug $type,%port:Python Debug $type,%PythonInterpreterPath:Python Debug $type,%traceback:Python Debug $type"
230
230
 
231
231
  #dim tPropClassname As %Dictionary.PropertyDefinition = ##class(%Dictionary.PropertyDefinition).%New()
232
232
  Set tPropClassname.Name = "%classname"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iris_pex_embedded_python
3
- Version: 3.4.3b2
3
+ Version: 3.4.3b3
4
4
  Summary: Iris Interoperability based on Embedded Python
5
5
  Author-email: grongier <guillaume.rongier@intersystems.com>
6
6
  License: MIT License
@@ -50,17 +50,17 @@ iop/_private_session_duplex.py,sha256=mzlFABh-ly51X1uSWw9YwQbktfMvuNdp2ALlRvlDow
50
50
  iop/_private_session_process.py,sha256=todprfYFSDr-h-BMvWL_IGC6wbQqkMy3mPHWEWCUSE0,1686
51
51
  iop/_serialization.py,sha256=lS5zHS14Olpw2i2s-cXMHV8CsjJLNmYdAhfZFvLfqe4,6652
52
52
  iop/_utils.py,sha256=zguWjvZQkzAScHXl4OomZr2ZtPljDqVAs1CFllQZn5g,20092
53
- iop/cls/IOP/BusinessOperation.cls,sha256=lrymqZ8wHl5kJjXwdjbQVs5sScV__yIWGh-oGbiB_X0,914
54
- iop/cls/IOP/BusinessProcess.cls,sha256=s3t38w1ykHqM26ETcbCYLt0ocjZyVVahm-_USZkuJ1E,2855
55
- iop/cls/IOP/BusinessService.cls,sha256=7ebn32J9PiZXUgXuh5Xxm_7X6zHBiqkJr9c_dWxbPO8,1021
56
- iop/cls/IOP/Common.cls,sha256=AQW6Hp_pwyQWPIGGzIFshswuMoW1kcv94g9QClzoo5U,12574
53
+ iop/cls/IOP/BusinessOperation.cls,sha256=E4rnujZi3QFd3uLtZ5YjLiMU_FWoN1gkBe19kxmYO34,932
54
+ iop/cls/IOP/BusinessProcess.cls,sha256=81B2ypqp4N3q2c943-hHw-Z6BIEWZqnDu-ZlHvhln6Q,3126
55
+ iop/cls/IOP/BusinessService.cls,sha256=fplKrbQgA7cQgjKIqDR2IK2iD1iNHmT-QvWrozhE4n4,1189
56
+ iop/cls/IOP/Common.cls,sha256=4CnDOE9IxCQgz9ysCHj_sXEzAZis3ViJzeQoGP77hFA,13808
57
57
  iop/cls/IOP/Director.cls,sha256=M43LoTb6lwSr0J81RFxi1YLW1mwda09wQ7Xqr3nBtxo,2008
58
- iop/cls/IOP/InboundAdapter.cls,sha256=GeoCm6q5HcLJ5e4VxgqXiErJXqolBbpKwpunaNzpvjU,610
58
+ iop/cls/IOP/InboundAdapter.cls,sha256=H-gZfUy8M9YxAZXfp5HVYl3uLo-7Xg9YgojioB_eYMY,619
59
59
  iop/cls/IOP/Message.cls,sha256=6_iZzQaY0cA9FjXg0qECYZC6We8soAIrUwRBrlerC4w,25373
60
- iop/cls/IOP/OutboundAdapter.cls,sha256=9eOwy5ojwcTzwrHs6LNrFQvUD8aqcoNCZrILN1ycdDM,958
60
+ iop/cls/IOP/OutboundAdapter.cls,sha256=OQoGFHUy2qV_kcsShTlWGOngDrdH5dhwux4eopZyIv4,967
61
61
  iop/cls/IOP/PickleMessage.cls,sha256=S3y7AClQ8mAILjxPuHdCjGosBZYzGbUQ5WTv4mYPNMQ,1673
62
62
  iop/cls/IOP/Test.cls,sha256=gAC9PEfMZsvAEWIa241-ug2FWAhITbN1SOispZzJPnI,2094
63
- iop/cls/IOP/Utils.cls,sha256=PGaEk0CKXobWrVM7UjQgZGVQ0MP4TkKr-TKJyGfj4Qg,15468
63
+ iop/cls/IOP/Utils.cls,sha256=-TM7KdpV27bCtvqc8NBYDKLKaXtcyNGMwY3fFKmgjX0,15498
64
64
  iop/cls/IOP/Duplex/Operation.cls,sha256=K_fmgeLjPZQbHgNrc0kd6DUQoW0fDn1VHQjJxHo95Zk,525
65
65
  iop/cls/IOP/Duplex/Process.cls,sha256=xbefZ4z84a_IUhavWN6P_gZBzqkdJ5XRTXxro6iDvAg,6986
66
66
  iop/cls/IOP/Duplex/Service.cls,sha256=sTMOQUCMBgVitmQkM8bbsrmrRtCdj91VlctJ3I7b8WU,161
@@ -72,9 +72,9 @@ iop/cls/IOP/PrivateSession/Message/Start.cls,sha256=uk-WTe66GicCshgmVy3F5ugHiAyP
72
72
  iop/cls/IOP/PrivateSession/Message/Stop.cls,sha256=7g3gKFUjNg0WXBLuWnj-VnCs5G6hSE09YTzGEp0zbGc,1390
73
73
  iop/cls/IOP/Service/WSGI.cls,sha256=VLNCXEwmHW9dBnE51uGE1nvGX6T4HjhqePT3LVhsjAE,10440
74
74
  iop/wsgi/handlers.py,sha256=NrFLo_YbAh-x_PlWhAiWkQnUUN2Ss9HoEm63dDWCBpQ,2947
75
- iris_pex_embedded_python-3.4.3b2.dist-info/licenses/LICENSE,sha256=rZSiBFId_sfbJ6RL0GjjPX-InNLkNS9ou7eQsikciI8,1089
76
- iris_pex_embedded_python-3.4.3b2.dist-info/METADATA,sha256=pWZI7p4AvXsPwmzwfi3-4v6xi6TZdXnykAztDSqZz2E,4449
77
- iris_pex_embedded_python-3.4.3b2.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
78
- iris_pex_embedded_python-3.4.3b2.dist-info/entry_points.txt,sha256=pj-i4LSDyiSP6xpHlVjMCbg1Pik7dC3_sdGY3Yp9Vhk,38
79
- iris_pex_embedded_python-3.4.3b2.dist-info/top_level.txt,sha256=4p0q6hCATmYIVMVi3I8hOUcJE1kwzyBeHygWv_rGvrU,13
80
- iris_pex_embedded_python-3.4.3b2.dist-info/RECORD,,
75
+ iris_pex_embedded_python-3.4.3b3.dist-info/licenses/LICENSE,sha256=rZSiBFId_sfbJ6RL0GjjPX-InNLkNS9ou7eQsikciI8,1089
76
+ iris_pex_embedded_python-3.4.3b3.dist-info/METADATA,sha256=4PJuMYHslUVVd-R3V4Km33jIzKEO8rsUzfE2zsCDpdk,4449
77
+ iris_pex_embedded_python-3.4.3b3.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
78
+ iris_pex_embedded_python-3.4.3b3.dist-info/entry_points.txt,sha256=pj-i4LSDyiSP6xpHlVjMCbg1Pik7dC3_sdGY3Yp9Vhk,38
79
+ iris_pex_embedded_python-3.4.3b3.dist-info/top_level.txt,sha256=4p0q6hCATmYIVMVi3I8hOUcJE1kwzyBeHygWv_rGvrU,13
80
+ iris_pex_embedded_python-3.4.3b3.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.4.0)
2
+ Generator: setuptools (80.8.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5