iris-pex-embedded-python 3.4.2b2__tar.gz → 3.4.3__tar.gz

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.

Files changed (86) hide show
  1. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/PKG-INFO +1 -1
  2. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/pyproject.toml +1 -1
  3. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_debugpy.py +6 -6
  4. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/BusinessOperation.cls +2 -2
  5. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/BusinessProcess.cls +25 -5
  6. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/BusinessService.cls +8 -3
  7. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/Common.cls +46 -5
  8. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/InboundAdapter.cls +1 -1
  9. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/Message.cls +11 -5
  10. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/OutboundAdapter.cls +1 -1
  11. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/Utils.cls +5 -55
  12. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iris_pex_embedded_python.egg-info/PKG-INFO +1 -1
  13. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/LICENSE +0 -0
  14. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/README.md +0 -0
  15. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/setup.cfg +0 -0
  16. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/setup.py +0 -0
  17. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/__init__.py +0 -0
  18. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/BusinessOperation.cls +0 -0
  19. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/BusinessProcess.cls +0 -0
  20. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/BusinessService.cls +0 -0
  21. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/Common.cls +0 -0
  22. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/Director.cls +0 -0
  23. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/Duplex/Operation.cls +0 -0
  24. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/Duplex/Process.cls +0 -0
  25. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/Duplex/Service.cls +0 -0
  26. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/InboundAdapter.cls +0 -0
  27. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/Message.cls +0 -0
  28. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/OutboundAdapter.cls +0 -0
  29. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/PickleMessage.cls +0 -0
  30. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/PrivateSession/Duplex.cls +0 -0
  31. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Ack.cls +0 -0
  32. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Poll.cls +0 -0
  33. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Start.cls +0 -0
  34. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Stop.cls +0 -0
  35. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/Test.cls +0 -0
  36. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/PEX/Utils.cls +0 -0
  37. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/cls/Grongier/Service/WSGI.cls +0 -0
  38. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/pex/__init__.py +0 -0
  39. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/pex/__main__.py +0 -0
  40. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/pex/_business_host.py +0 -0
  41. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/pex/_cli.py +0 -0
  42. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/pex/_common.py +0 -0
  43. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/pex/_director.py +0 -0
  44. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/pex/_utils.py +0 -0
  45. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/grongier/pex/wsgi/handlers.py +0 -0
  46. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/__init__.py +0 -0
  47. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/__main__.py +0 -0
  48. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_async_request.py +0 -0
  49. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_business_host.py +0 -0
  50. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_business_operation.py +0 -0
  51. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_business_process.py +0 -0
  52. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_business_service.py +0 -0
  53. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_cli.py +0 -0
  54. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_common.py +0 -0
  55. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_decorators.py +0 -0
  56. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_director.py +0 -0
  57. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_dispatch.py +0 -0
  58. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_inbound_adapter.py +0 -0
  59. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_iris.py +0 -0
  60. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_log_manager.py +0 -0
  61. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_message.py +0 -0
  62. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_message_validator.py +0 -0
  63. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_outbound_adapter.py +0 -0
  64. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_private_session_duplex.py +0 -0
  65. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_private_session_process.py +0 -0
  66. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_serialization.py +0 -0
  67. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/_utils.py +0 -0
  68. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/Director.cls +0 -0
  69. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/Duplex/Operation.cls +0 -0
  70. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/Duplex/Process.cls +0 -0
  71. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/Duplex/Service.cls +0 -0
  72. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/Message/JSONSchema.cls +0 -0
  73. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/PickleMessage.cls +0 -0
  74. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/PrivateSession/Duplex.cls +0 -0
  75. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/PrivateSession/Message/Ack.cls +0 -0
  76. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/PrivateSession/Message/Poll.cls +0 -0
  77. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/PrivateSession/Message/Start.cls +0 -0
  78. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/PrivateSession/Message/Stop.cls +0 -0
  79. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/Service/WSGI.cls +0 -0
  80. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/cls/IOP/Test.cls +0 -0
  81. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iop/wsgi/handlers.py +0 -0
  82. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iris_pex_embedded_python.egg-info/SOURCES.txt +0 -0
  83. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iris_pex_embedded_python.egg-info/dependency_links.txt +0 -0
  84. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iris_pex_embedded_python.egg-info/entry_points.txt +0 -0
  85. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iris_pex_embedded_python.egg-info/requires.txt +0 -0
  86. {iris_pex_embedded_python-3.4.2b2 → iris_pex_embedded_python-3.4.3}/src/iris_pex_embedded_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iris_pex_embedded_python
3
- Version: 3.4.2b2
3
+ Version: 3.4.3
4
4
  Summary: Iris Interoperability based on Embedded Python
5
5
  Author-email: grongier <guillaume.rongier@intersystems.com>
6
6
  License: MIT License
@@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]
3
3
 
4
4
  [project]
5
5
  name = "iris_pex_embedded_python"
6
- version = "3.4.2b2"
6
+ version = "3.4.3"
7
7
  description = "Iris Interoperability based on Embedded Python"
8
8
  readme = "README.md"
9
9
  authors = [
@@ -112,7 +112,7 @@ def debugpython(self, host_object: Any) -> None:
112
112
  self.log_alert("No host object found, cannot enable debugpy.")
113
113
  return
114
114
 
115
- if host_object.enable != 1:
115
+ if host_object._enable != 1:
116
116
  self.log_info("Debugpy is not enabled.")
117
117
  return
118
118
 
@@ -121,7 +121,7 @@ def debugpython(self, host_object: Any) -> None:
121
121
  return
122
122
 
123
123
  # Configure Python interpreter
124
- if host_object.PythonInterpreterPath != '':
124
+ if host_object._PythonInterpreterPath != '':
125
125
  success = configure_debugpy(self, host_object.PythonInterpreterPath)
126
126
  else:
127
127
  success = configure_debugpy(self)
@@ -130,16 +130,16 @@ def debugpython(self, host_object: Any) -> None:
130
130
  return
131
131
 
132
132
  # Setup debugging server
133
- port = host_object.port if host_object.port and host_object.port > 0 else find_free_port()
133
+ port = host_object._port if host_object._port and host_object._port > 0 else find_free_port()
134
134
 
135
135
  try:
136
136
  enable_debugpy(port=port)
137
137
  self.log_info(f"Debugpy enabled on port {port}")
138
138
 
139
- self.trace(f"Waiting {host_object.timeout} seconds for debugpy connection...")
140
- if wait_for_debugpy_connected(timeout=host_object.timeout, port=port):
139
+ self.trace(f"Waiting {host_object._timeout} seconds for debugpy connection...")
140
+ if wait_for_debugpy_connected(timeout=host_object._timeout, port=port):
141
141
  self.log_info("Debugpy connected successfully")
142
142
  else:
143
- self.log_alert(f"Debugpy connection timed out after {host_object.timeout} seconds")
143
+ self.log_alert(f"Debugpy connection timed out after {host_object._timeout} seconds")
144
144
  except Exception as e:
145
145
  self.log_alert(f"Error enabling debugpy: {e}")
@@ -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
  }
@@ -19,6 +19,16 @@ Property %settings As %String(MAXLEN = "");
19
19
  /// Instance of class
20
20
  Property %class As %SYS.Python;
21
21
 
22
+ Property %enable As %Boolean;
23
+
24
+ Property %timeout As %Numeric [ InitialExpression = 30 ];
25
+
26
+ Property %port As %Numeric [ InitialExpression = 0 ];
27
+
28
+ Property %PythonInterpreterPath As %String(MAXLEN = 255);
29
+
30
+ Property %traceback As %Boolean;
31
+
22
32
  /// Get Class
23
33
  Method GetClass() As %SYS.Python
24
34
  {
@@ -37,15 +47,45 @@ Method GetModule() As %String
37
47
  Return ..%module
38
48
  }
39
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
+
40
78
  Method OnInit() As %Status
41
79
  {
42
80
  set tSC = $$$OK
43
81
  try {
82
+ do $system.Python.Debugging(..%traceback)
44
83
  $$$ThrowOnError(..Connect())
45
84
  do ..%class."_debugpy"($this)
46
85
  do ..%class."_dispatch_on_init"($this)
47
86
  } catch ex {
48
- set tSC = ex.AsStatus()
87
+
88
+ set tSC = ..DisplayTraceback(ex)
49
89
  }
50
90
  quit tSC
51
91
  }
@@ -146,13 +186,14 @@ Method SetPropertyValues()
146
186
  // First list all the properties of the current class
147
187
  set class = $CLASSNAME()
148
188
  set tSQL = "SELECT * FROM %Dictionary.PropertyDefinition WHERE parent = ?"
149
- set tSQL = tSQL _ " AND name <> 'timeout'"
150
- set tSQL = tSQL _ " and name <> 'enable'"
189
+ set tSQL = tSQL _ " AND name <> '%timeout'"
190
+ set tSQL = tSQL _ " and name <> '%enable'"
151
191
  set tSQL = tSQL _ " and name <> '%classpaths'"
152
192
  set tSQL = tSQL _ " and name <> '%classname'"
153
193
  set tSQL = tSQL _ " and name <> '%module'"
154
- set tSQL = tSQL _ " and name <> 'port'"
155
- 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'"
156
197
 
157
198
  set tStmt = ##class(%SQL.Statement).%New()
158
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
  }
@@ -453,7 +453,7 @@ ClassMethod HandleProperty(
453
453
  {
454
454
  Set type = value.type
455
455
 
456
- If type = "string" || type = "number" || type = "boolean" {
456
+ If (type = "string") || (type = "number") || (type = "boolean") {
457
457
  Do ..HandlePrimitiveType(type, idx, .pContents)
458
458
  }
459
459
  ElseIf type = "array" {
@@ -465,6 +465,13 @@ ClassMethod HandleProperty(
465
465
  ElseIf $IsObject(value.allOf) {
466
466
  Do ..HandleAllOfType(value, key, idx, .pContents, schema)
467
467
  }
468
+ ElseIf value.%Get("$ref")'="" {
469
+ Set tDef = schema."$defs".%Get($Piece(value."$ref", "/", *))
470
+ Do ..HandleObjectType(tDef, idx, .pContents)
471
+ }
472
+ Else {
473
+ Set pContents(idx,"type") = type
474
+ }
468
475
 
469
476
  If type = "array" Set key = key_"()"
470
477
  Set pContents = idx
@@ -491,9 +498,8 @@ ClassMethod HandleArrayType(
491
498
  schema As %DynamicObject)
492
499
  {
493
500
  Set pContents(idx,"type") = "()"
494
- If $IsObject(value.items) && $IsObject(value.items.allOf) {
495
- Do ..HandleAllOfType(value.items, key, idx, .pContents, schema)
496
- }
501
+ // Handle array as a Handle Property
502
+ Do ..HandleProperty(value.items, key, idx, .pContents, schema)
497
503
  }
498
504
 
499
505
  ClassMethod HandleObjectType(
@@ -504,7 +510,7 @@ ClassMethod HandleObjectType(
504
510
  Set pContents(idx,"type") = "object"
505
511
  If $IsObject(value.properties) {
506
512
  Do ..SchemaToContents(value, .subContents)
507
- Merge @pContents(idx) = subContents
513
+ Merge pContents(idx) = subContents
508
514
  }
509
515
  }
510
516
 
@@ -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
  }
@@ -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"
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"
@@ -270,10 +270,6 @@ ClassMethod GenerateProxyClass(
270
270
  Quit:$$$ISERR(tSC)
271
271
  }
272
272
  }
273
-
274
- set type = ""
275
- set:($Case(tSuperClass,"IOP.InboundAdapter":1,"IOP.OutboundAdapter":1,:0)) type = "Adapter"
276
- set tSETTINGSParamValue = $REPLACE(tSETTINGSParamValue,"$type",type)
277
273
 
278
274
  #dim tCustomProp As %Dictionary.PropertyDefinition
279
275
  #dim tPropInfo,tPropName,tDataType,tDefault,tDesc,tPropCat,tContext As %String
@@ -310,60 +306,14 @@ ClassMethod GenerateProxyClass(
310
306
  Set tSC = tCOSClass.Properties.Insert(tCustomProp)
311
307
  Quit:$$$ISERR(tSC)
312
308
 
313
- Set tPropCat = "Python Attributes"
309
+ Set tPropCat = "Python Attributes $type"
314
310
  Set tSETTINGSParamValue = tSETTINGSParamValue_","_tPropName_":"_tPropCat
315
311
  }
316
312
  Quit:$$$ISERR(tSC)
317
313
 
318
- #; Add debug settings, three settings are always available debug a boolean, port an integer and a timeout an integer
319
- Set tPropCat = "Python Debug"
320
- #; Debug property
321
- Set tPropDebug = ##class(%Dictionary.PropertyDefinition).%New()
322
- Set tPropDebug.Name = "enable"
323
- Set tPropDebug.Type = "%Boolean"
324
- Set tPropDebug.InitialExpression = $$$quote(0)
325
- Set tPropDebug.Description = "Enable or disable debug"
326
-
327
- Set tSC = tCOSClass.Properties.Insert(tPropDebug)
328
- Quit:$$$ISERR(tSC)
329
-
330
- #; Add the settings parameter
331
- Set tSETTINGSParamValue = tSETTINGSParamValue_",enable:"_tPropCat
332
-
333
- #; Port property
334
- Set tPropPort = ##class(%Dictionary.PropertyDefinition).%New()
335
- Set tPropPort.Name = "port"
336
- Set tPropPort.Type = "%Integer"
337
- Set tPropPort.InitialExpression = $$$quote(0)
338
- Set tPropPort.Description = "Port to use for the debug connection, if 0 an random port will be used"
339
- Set tSC = tCOSClass.Properties.Insert(tPropPort)
340
- Quit:$$$ISERR(tSC)
341
-
342
- #; Add the settings parameter
343
- Set tSETTINGSParamValue = tSETTINGSParamValue_",port:"_tPropCat
344
-
345
- #; Timeout property
346
- Set tPropTimeout = ##class(%Dictionary.PropertyDefinition).%New()
347
- Set tPropTimeout.Name = "timeout"
348
- Set tPropTimeout.Type = "%Integer"
349
- Set tPropTimeout.InitialExpression = $$$quote(30)
350
- Set tSC = tCOSClass.Properties.Insert(tPropTimeout)
351
- Quit:$$$ISERR(tSC)
352
-
353
- #; Add the settings parameter
354
- Set tSETTINGSParamValue = tSETTINGSParamValue_",timeout:"_tPropCat
355
-
356
- #; PythonInterpreterPath property
357
- Set tPropInterpre = ##class(%Dictionary.PropertyDefinition).%New()
358
- Set tPropInterpre.Name = "PythonInterpreterPath"
359
- Set tPropInterpre.Type = "%String"
360
- Set tPropInterpre.Description = "Path to the Python interpreter, if not set the default one will be used"
361
- Do tPropInterpre.Parameters.SetAt("255","MAXLEN")
362
- Set tSC = tCOSClass.Properties.Insert(tPropInterpre)
363
- Quit:$$$ISERR(tSC)
364
-
365
- #; Add the settings parameter
366
- Set tSETTINGSParamValue = tSETTINGSParamValue_",PythonInterpreterPath:"_tPropCat
314
+ set type = ""
315
+ set:($Case(tSuperClass,"IOP.InboundAdapter":1,"IOP.OutboundAdapter":1,:0)) type = "Adapter"
316
+ set tSETTINGSParamValue = $REPLACE(tSETTINGSParamValue,"$type",type)
367
317
 
368
318
  #dim tSETTINGSParam As %Dictionary.ParameterDefinition = ##class(%Dictionary.ParameterDefinition).%New()
369
319
  Set tSETTINGSParam.Name = "SETTINGS"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iris_pex_embedded_python
3
- Version: 3.4.2b2
3
+ Version: 3.4.3
4
4
  Summary: Iris Interoperability based on Embedded Python
5
5
  Author-email: grongier <guillaume.rongier@intersystems.com>
6
6
  License: MIT License