iris-pex-embedded-python 3.4.0b13__py3-none-any.whl → 3.4.1__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.

Files changed (86) hide show
  1. iop/_async_request.py +3 -1
  2. iop/_business_host.py +2 -1
  3. iop/_business_service.py +6 -0
  4. iop/_cli.py +9 -1
  5. iop/_common.py +11 -1
  6. iop/_debugpy.py +145 -0
  7. iop/_director.py +40 -40
  8. iop/_iris.py +7 -0
  9. iop/_log_manager.py +9 -9
  10. iop/_serialization.py +62 -50
  11. iop/_utils.py +10 -10
  12. iop/cls/IOP/Common.cls +3 -1
  13. iop/cls/IOP/Utils.cls +59 -9
  14. {iris_pex_embedded_python-3.4.0b13.dist-info → iris_pex_embedded_python-3.4.1.dist-info}/METADATA +2 -1
  15. iris_pex_embedded_python-3.4.1.dist-info/RECORD +80 -0
  16. {iris_pex_embedded_python-3.4.0b13.dist-info → iris_pex_embedded_python-3.4.1.dist-info}/WHEEL +1 -1
  17. iris_pex_embedded_python-3.4.1.dist-info/top_level.txt +2 -0
  18. intersystems_iris/_BufferReader.py +0 -10
  19. intersystems_iris/_BufferWriter.py +0 -32
  20. intersystems_iris/_ConnectionInformation.py +0 -56
  21. intersystems_iris/_ConnectionParameters.py +0 -18
  22. intersystems_iris/_Constant.py +0 -38
  23. intersystems_iris/_DBList.py +0 -506
  24. intersystems_iris/_Device.py +0 -69
  25. intersystems_iris/_GatewayContext.py +0 -25
  26. intersystems_iris/_GatewayException.py +0 -4
  27. intersystems_iris/_GatewayUtility.py +0 -74
  28. intersystems_iris/_IRIS.py +0 -1294
  29. intersystems_iris/_IRISConnection.py +0 -516
  30. intersystems_iris/_IRISEmbedded.py +0 -85
  31. intersystems_iris/_IRISGlobalNode.py +0 -273
  32. intersystems_iris/_IRISGlobalNodeView.py +0 -25
  33. intersystems_iris/_IRISIterator.py +0 -143
  34. intersystems_iris/_IRISList.py +0 -360
  35. intersystems_iris/_IRISNative.py +0 -208
  36. intersystems_iris/_IRISOREF.py +0 -9
  37. intersystems_iris/_IRISObject.py +0 -424
  38. intersystems_iris/_IRISReference.py +0 -133
  39. intersystems_iris/_InStream.py +0 -149
  40. intersystems_iris/_LegacyIterator.py +0 -135
  41. intersystems_iris/_ListItem.py +0 -15
  42. intersystems_iris/_ListReader.py +0 -84
  43. intersystems_iris/_ListWriter.py +0 -161
  44. intersystems_iris/_LogFileStream.py +0 -115
  45. intersystems_iris/_MessageHeader.py +0 -51
  46. intersystems_iris/_OutStream.py +0 -25
  47. intersystems_iris/_PrintStream.py +0 -65
  48. intersystems_iris/_PythonGateway.py +0 -850
  49. intersystems_iris/_SharedMemorySocket.py +0 -87
  50. intersystems_iris/__init__.py +0 -79
  51. intersystems_iris/__main__.py +0 -7
  52. intersystems_iris/dbapi/_Column.py +0 -56
  53. intersystems_iris/dbapi/_DBAPI.py +0 -2631
  54. intersystems_iris/dbapi/_Descriptor.py +0 -46
  55. intersystems_iris/dbapi/_IRISStream.py +0 -65
  56. intersystems_iris/dbapi/_Message.py +0 -158
  57. intersystems_iris/dbapi/_Parameter.py +0 -171
  58. intersystems_iris/dbapi/_ParameterCollection.py +0 -141
  59. intersystems_iris/dbapi/_ResultSetRow.py +0 -361
  60. intersystems_iris/dbapi/_SQLType.py +0 -32
  61. intersystems_iris/dbapi/__init__.py +0 -0
  62. intersystems_iris/dbapi/preparser/_PreParser.py +0 -1674
  63. intersystems_iris/dbapi/preparser/_Scanner.py +0 -391
  64. intersystems_iris/dbapi/preparser/_Token.py +0 -81
  65. intersystems_iris/dbapi/preparser/_TokenList.py +0 -251
  66. intersystems_iris/dbapi/preparser/__init__.py +0 -0
  67. intersystems_iris/pex/_BusinessHost.py +0 -101
  68. intersystems_iris/pex/_BusinessOperation.py +0 -105
  69. intersystems_iris/pex/_BusinessProcess.py +0 -214
  70. intersystems_iris/pex/_BusinessService.py +0 -95
  71. intersystems_iris/pex/_Common.py +0 -228
  72. intersystems_iris/pex/_Director.py +0 -24
  73. intersystems_iris/pex/_IRISBusinessOperation.py +0 -5
  74. intersystems_iris/pex/_IRISBusinessService.py +0 -18
  75. intersystems_iris/pex/_IRISInboundAdapter.py +0 -5
  76. intersystems_iris/pex/_IRISOutboundAdapter.py +0 -17
  77. intersystems_iris/pex/_InboundAdapter.py +0 -57
  78. intersystems_iris/pex/_Message.py +0 -6
  79. intersystems_iris/pex/_OutboundAdapter.py +0 -46
  80. intersystems_iris/pex/__init__.py +0 -25
  81. iris_pex_embedded_python-3.4.0b13.dist-info/RECORD +0 -143
  82. iris_pex_embedded_python-3.4.0b13.dist-info/top_level.txt +0 -4
  83. irisnative/_IRISNative.py +0 -9
  84. irisnative/__init__.py +0 -10
  85. {iris_pex_embedded_python-3.4.0b13.dist-info → iris_pex_embedded_python-3.4.1.dist-info}/entry_points.txt +0 -0
  86. {iris_pex_embedded_python-3.4.0b13.dist-info → iris_pex_embedded_python-3.4.1.dist-info}/licenses/LICENSE +0 -0
iop/_serialization.py CHANGED
@@ -4,13 +4,13 @@ import importlib
4
4
  import inspect
5
5
  import pickle
6
6
  import json
7
- from dataclasses import asdict, is_dataclass
7
+ from dataclasses import is_dataclass
8
8
  from typing import Any, Dict, Type
9
9
 
10
- import iris
11
- from pydantic import BaseModel, TypeAdapter
10
+ from . import _iris
11
+ from pydantic import BaseModel, TypeAdapter, ValidationError
12
12
 
13
- from iop._message import _PydanticPickleMessage
13
+ from iop._message import _PydanticPickleMessage, _Message
14
14
  from iop._utils import _Utils
15
15
 
16
16
  class SerializationError(Exception):
@@ -31,23 +31,23 @@ class MessageSerializer:
31
31
  """Convert objects to JSON-safe format."""
32
32
  if isinstance(obj, BaseModel):
33
33
  return obj.model_dump_json()
34
- elif is_dataclass(obj):
34
+ elif is_dataclass(obj) and isinstance(obj, _Message):
35
35
  return TempPydanticModel.model_validate(dataclass_to_dict(obj)).model_dump_json()
36
36
  else:
37
- raise SerializationError(f"Object {obj} must be a Pydantic model or dataclass")
37
+ raise SerializationError(f"Object {obj} must be a Pydantic model or dataclass Message")
38
38
 
39
39
  @staticmethod
40
- def serialize(message: Any, use_pickle: bool = False) -> iris.cls:
40
+ def serialize(message: Any, use_pickle: bool = False) -> Any:
41
41
  """Serializes a message to IRIS format."""
42
42
  if isinstance(message, _PydanticPickleMessage) or use_pickle:
43
43
  return MessageSerializer._serialize_pickle(message)
44
44
  return MessageSerializer._serialize_json(message)
45
45
 
46
46
  @staticmethod
47
- def _serialize_json(message: Any) -> iris.cls:
47
+ def _serialize_json(message: Any) -> Any:
48
48
  json_string = MessageSerializer._convert_to_json_safe(message)
49
49
 
50
- msg = iris.cls('IOP.Message')._New()
50
+ msg = _iris.get_iris().cls('IOP.Message')._New()
51
51
  msg.classname = f"{message.__class__.__module__}.{message.__class__.__name__}"
52
52
 
53
53
  if hasattr(msg, 'buffer') and len(json_string) > msg.buffer:
@@ -57,13 +57,13 @@ class MessageSerializer:
57
57
  return msg
58
58
 
59
59
  @staticmethod
60
- def deserialize(serial: iris.cls, use_pickle: bool = False) -> Any:
60
+ def deserialize(serial: Any, use_pickle: bool = False) -> Any:
61
61
  if use_pickle:
62
62
  return MessageSerializer._deserialize_pickle(serial)
63
63
  return MessageSerializer._deserialize_json(serial)
64
64
 
65
65
  @staticmethod
66
- def _deserialize_json(serial: iris.cls) -> Any:
66
+ def _deserialize_json(serial: Any) -> Any:
67
67
  if not serial.classname:
68
68
  raise SerializationError("JSON message malformed, must include classname")
69
69
 
@@ -88,15 +88,15 @@ class MessageSerializer:
88
88
  raise SerializationError(f"Failed to deserialize JSON: {str(e)}")
89
89
 
90
90
  @staticmethod
91
- def _serialize_pickle(message: Any) -> iris.cls:
91
+ def _serialize_pickle(message: Any) -> Any:
92
92
  pickle_string = codecs.encode(pickle.dumps(message), "base64").decode()
93
- msg = iris.cls('IOP.PickleMessage')._New()
93
+ msg = _iris.get_iris().cls('IOP.PickleMessage')._New()
94
94
  msg.classname = f"{message.__class__.__module__}.{message.__class__.__name__}"
95
95
  msg.jstr = _Utils.string_to_stream(pickle_string)
96
96
  return msg
97
97
 
98
98
  @staticmethod
99
- def _deserialize_pickle(serial: iris.cls) -> Any:
99
+ def _deserialize_pickle(serial: Any) -> Any:
100
100
  string = _Utils.stream_to_string(serial.jstr)
101
101
  return pickle.loads(codecs.decode(string.encode(), "base64"))
102
102
 
@@ -108,49 +108,61 @@ class MessageSerializer:
108
108
  return classname[:j], classname[j+1:]
109
109
 
110
110
  def dataclass_from_dict(klass: Type, dikt: Dict) -> Any:
111
- field_types = {
112
- key: val.annotation
113
- for key, val in inspect.signature(klass).parameters.items()
114
- }
115
- processed_dict = {}
116
- for key, val in inspect.signature(klass).parameters.items():
117
- if key not in dikt and val.default != val.empty:
118
- processed_dict[key] = val.default
119
- continue
120
-
121
- value = dikt.get(key)
111
+ """Converts a dictionary to a dataclass instance.
112
+ Handles non attended fields and nested dataclasses."""
113
+
114
+ def process_field(value: Any, field_type: Type) -> Any:
122
115
  if value is None:
123
- processed_dict[key] = None
116
+ return None
117
+ if is_dataclass(field_type):
118
+ return dataclass_from_dict(field_type, value)
119
+ if field_type != inspect.Parameter.empty:
120
+ try:
121
+ return TypeAdapter(field_type).validate_python(value)
122
+ except ValidationError:
123
+ return value
124
+ return value
125
+
126
+ # Get field definitions from class signature
127
+ fields = inspect.signature(klass).parameters
128
+ field_dict = {}
129
+
130
+ # Process each field
131
+ for field_name, field_info in fields.items():
132
+ if field_name not in dikt:
133
+ if field_info.default != field_info.empty:
134
+ field_dict[field_name] = field_info.default
124
135
  continue
125
-
126
- try:
127
- field_type = field_types[key]
128
- if field_type != inspect.Parameter.empty:
129
- adapter = TypeAdapter(field_type)
130
- processed_dict[key] = adapter.validate_python(value)
131
- else:
132
- processed_dict[key] = value
133
- except Exception:
134
- processed_dict[key] = value
135
-
136
- instance = klass(
137
- **processed_dict
138
- )
139
- # handle any extra fields
140
- for k, v in dikt.items():
141
- if k not in processed_dict:
142
- setattr(instance, k, v)
136
+
137
+ field_dict[field_name] = process_field(dikt[field_name], field_info.annotation)
138
+
139
+ # Create instance
140
+ instance = klass(**field_dict)
141
+
142
+ # Add any extra fields not in the dataclass definition
143
+ for key, value in dikt.items():
144
+ if key not in field_dict:
145
+ setattr(instance, key, value)
146
+
143
147
  return instance
144
148
 
145
149
  def dataclass_to_dict(instance: Any) -> Dict:
146
150
  """Converts a class instance to a dictionary.
147
151
  Handles non attended fields."""
148
- dikt = asdict(instance)
149
- # assign any extra fields
150
- for k, v in vars(instance).items():
151
- if k not in dikt:
152
- dikt[k] = v
153
- return dikt
152
+ result = {}
153
+ for field in instance.__dict__:
154
+ value = getattr(instance, field)
155
+ if is_dataclass(value):
156
+ result[field] = dataclass_to_dict(value)
157
+ elif isinstance(value, list):
158
+ result[field] = [dataclass_to_dict(i) if is_dataclass(i) else i for i in value]
159
+ elif isinstance(value, dict):
160
+ result[field] = {k: dataclass_to_dict(v) if is_dataclass(v) else v for k, v in value.items()}
161
+ elif hasattr(value, '__dict__'):
162
+ result[field] = dataclass_to_dict(value)
163
+ else:
164
+ result[field] = value
165
+ return result
154
166
 
155
167
  # Maintain backwards compatibility
156
168
  serialize_pickle_message = lambda msg: MessageSerializer.serialize(msg, use_pickle=True)
iop/_utils.py CHANGED
@@ -1,7 +1,7 @@
1
1
  import os
2
2
  import sys
3
3
  import ast
4
- import iris
4
+ from . import _iris
5
5
  import inspect
6
6
  import xmltodict
7
7
  import pkg_resources
@@ -19,8 +19,8 @@ class _Utils():
19
19
 
20
20
  :param sc: The status code returned by the Iris API
21
21
  """
22
- if iris.system.Status.IsError(sc):
23
- raise RuntimeError(iris.system.Status.GetOneStatusText(sc))
22
+ if _iris.get_iris().system.Status.IsError(sc):
23
+ raise RuntimeError(_iris.get_iris().system.Status.GetOneStatusText(sc))
24
24
 
25
25
  @staticmethod
26
26
  def setup(path:str = None):
@@ -29,13 +29,13 @@ class _Utils():
29
29
  # get the path of the data folder with pkg_resources
30
30
  path = pkg_resources.resource_filename('iop', 'cls')
31
31
 
32
- _Utils.raise_on_error(iris.cls('%SYSTEM.OBJ').LoadDir(path,'cubk',"*.cls",1))
32
+ _Utils.raise_on_error(_iris.get_iris().cls('%SYSTEM.OBJ').LoadDir(path,'cubk',"*.cls",1))
33
33
 
34
34
  # for retrocompatibility load grongier.pex
35
35
  path = pkg_resources.resource_filename('grongier', 'cls')
36
36
 
37
37
  if path:
38
- _Utils.raise_on_error(iris.cls('%SYSTEM.OBJ').LoadDir(path,'cubk',"*.cls",1))
38
+ _Utils.raise_on_error(_iris.get_iris().cls('%SYSTEM.OBJ').LoadDir(path,'cubk',"*.cls",1))
39
39
 
40
40
  @staticmethod
41
41
  def register_message_schema(cls):
@@ -68,7 +68,7 @@ class _Utils():
68
68
  :param categories: The categories of the schema
69
69
  :type categories: str
70
70
  """
71
- _Utils.raise_on_error(iris.cls('IOP.Message.JSONSchema').Import(schema_str,categories,schema_name))
71
+ _Utils.raise_on_error(_iris.get_iris().cls('IOP.Message.JSONSchema').Import(schema_str,categories,schema_name))
72
72
 
73
73
  @staticmethod
74
74
  def register_component(module:str,classname:str,path:str,overwrite:int=1,iris_classname:str='Python'):
@@ -90,7 +90,7 @@ class _Utils():
90
90
  path = os.path.abspath(os.path.normpath(path))
91
91
  fullpath = _Utils.guess_path(module,path)
92
92
  try:
93
- iris.cls('IOP.Utils').dispatchRegisterComponent(module,classname,path,fullpath,overwrite,iris_classname)
93
+ _iris.get_iris().cls('IOP.Utils').dispatchRegisterComponent(module,classname,path,fullpath,overwrite,iris_classname)
94
94
  except RuntimeError as e:
95
95
  # New message error : Make sure the iop package is installed in iris
96
96
  raise RuntimeError("Iris class : IOP.Utils not found. Make sure the iop package is installed in iris eg: iop --init.") from e
@@ -403,7 +403,7 @@ class _Utils():
403
403
  production_name = production_name.split('.')[-1]
404
404
  stream = _Utils.string_to_stream(xml)
405
405
  # register the production
406
- _Utils.raise_on_error(iris.cls('IOP.Utils').CreateProduction(package,production_name,stream))
406
+ _Utils.raise_on_error(_iris.get_iris().cls('IOP.Utils').CreateProduction(package,production_name,stream))
407
407
 
408
408
  @staticmethod
409
409
  def export_production(production_name):
@@ -418,7 +418,7 @@ class _Utils():
418
418
  return key, ''
419
419
  return key, value
420
420
  # export the production
421
- xdata = iris.cls('IOP.Utils').ExportProduction(production_name)
421
+ xdata = _iris.get_iris().cls('IOP.Utils').ExportProduction(production_name)
422
422
  # for each chunk of 1024 characters
423
423
  string = _Utils.stream_to_string(xdata)
424
424
  # convert the xml to a dictionary
@@ -436,7 +436,7 @@ class _Utils():
436
436
 
437
437
  @staticmethod
438
438
  def string_to_stream(string:str,buffer=1000000):
439
- stream = iris.cls('%Stream.GlobalCharacter')._New()
439
+ stream = _iris.get_iris().cls('%Stream.GlobalCharacter')._New()
440
440
  n = buffer
441
441
  chunks = [string[i:i+n] for i in range(0, len(string), n)]
442
442
  for chunk in chunks:
iop/cls/IOP/Common.cls CHANGED
@@ -40,7 +40,9 @@ Method GetModule() As %String
40
40
  Method %OnNew(pConfigName As %String) As %Status
41
41
  {
42
42
  $$$ThrowOnError(..Connect())
43
- Quit $method($this,"initConfig",.pConfigName) ; call subclass
43
+ $$$ThrowOnError($method($this,"initConfig",.pConfigName)) ; call subclass
44
+ do ..%class."_debugpy"($this)
45
+ Quit $$$OK
44
46
  }
45
47
 
46
48
  Method OnInit() As %Status
iop/cls/IOP/Utils.cls CHANGED
@@ -61,7 +61,7 @@ ClassMethod DeleteComponentProxy(pClassname As %String = "") As %Status
61
61
  {
62
62
  #dim tSC As %Status = $$$OK
63
63
  #dim ex As %Exception.AbstractException
64
- #dim tIsPEX As %Boolean = 0
64
+ #dim tIsIOP As %Boolean = 0
65
65
  #dim tClass As %Dictionary.CompiledClass
66
66
 
67
67
  Quit:(""=pClassname) $$$ERROR($$$EnsErrGeneral,"Remote class name must be specified.")
@@ -79,16 +79,16 @@ ClassMethod DeleteComponentProxy(pClassname As %String = "") As %Status
79
79
  Set tSC = $$$ERROR($$$EnsErrGeneral,$$$FormatText("Proxy class for remote class '%1' could not be opened.",pClassname))
80
80
  Quit
81
81
  }
82
- Set tIsPEX = ("IOP.Utils" = tClass.GeneratedBy)
82
+ Set tIsIOP = ("IOP.Utils" = tClass.GeneratedBy)
83
83
  }
84
- If tIsPEX {
84
+ If tIsIOP {
85
85
  Set tSC = ##class(%Dictionary.ClassDefinition).%DeleteId(pClassname)
86
86
  If $$$ISERR(tSC) {
87
87
  Set tSC = $$$ERROR($$$EnsErrGeneral,$$$FormatText("Unable to delete proxy class for remote class '%1' : '%2'.",pClassname,$System.Status.GetErrorText(tSC)))
88
88
  Quit
89
89
  }
90
90
  } Else {
91
- Set tSC = $$$ERROR($$$EnsErrGeneral,$$$FormatText("Cannot delete class '%1' because it is not a PEX proxy class.",pClassname))
91
+ Set tSC = $$$ERROR($$$EnsErrGeneral,$$$FormatText("Cannot delete class '%1' because it is not a IOP proxy class.",pClassname))
92
92
  Quit
93
93
  }
94
94
 
@@ -179,23 +179,23 @@ ClassMethod GenerateProxyClass(
179
179
  Set tSC = $$$ERROR($$$EnsErrGeneral,$$$FormatText("Proxy class '%1' already exists.",pClassname))
180
180
  Quit
181
181
  } Else {
182
- #dim tIsPEX As %Boolean = 0
182
+ #dim tIsIOP As %Boolean = 0
183
183
  If $classmethod(pClassname,"%Extends","IOP.Common") {
184
184
  #dim tClass As %Dictionary.CompiledClass = ##class(%Dictionary.CompiledClass).%OpenId(pClassname)
185
185
  If '$IsObject(tClass) {
186
186
  Set tSC = $$$ERROR($$$EnsErrGeneral,"Class not found")
187
187
  Quit
188
188
  }
189
- Set tIsPEX = ("IOP.Utils" = tClass.GeneratedBy)
189
+ Set tIsIOP = ("IOP.Utils" = tClass.GeneratedBy)
190
190
  }
191
- If tIsPEX {
191
+ If tIsIOP {
192
192
  Set tSC = ##class(%Dictionary.ClassDefinition).%DeleteId(pClassname)
193
193
  If $$$ISERR(tSC) {
194
194
  Set tSC = $$$ERROR($$$EnsErrGeneral,$$$FormatText("Unable to delete existing proxy class '%1' : '%2'.",pClassname,$System.Status.GetErrorText(tSC)))
195
195
  Quit
196
196
  }
197
197
  } Else {
198
- Set tSC = $$$ERROR($$$EnsErrGeneral,$$$FormatText("Cannot overwrite class '%1' because it is not a PEX proxy class.",pClassname))
198
+ Set tSC = $$$ERROR($$$EnsErrGeneral,$$$FormatText("Cannot overwrite class '%1' because it is not a IOP proxy class.",pClassname))
199
199
  Quit
200
200
  }
201
201
  }
@@ -208,7 +208,7 @@ ClassMethod GenerateProxyClass(
208
208
 
209
209
  #dim tSuperClass As %String = pClassDetails."__getitem__"(0)
210
210
  If (""=tSuperClass) {
211
- Set tSC = $$$ERROR($$$EnsErrGeneral,"No PEX superclass found.")
211
+ Set tSC = $$$ERROR($$$EnsErrGeneral,"No IOP superclass found.")
212
212
  Quit
213
213
  }
214
214
  If '$Case($P(tSuperClass,".",*),"DuplexProcess":1,"DuplexService":1,"DuplexOperation":1,"InboundAdapter":1,"OutboundAdapter":1,"BusinessService":1,"BusinessProcess":1,"BusinessOperation":1,:0) {
@@ -323,6 +323,56 @@ ClassMethod GenerateProxyClass(
323
323
  }
324
324
  Quit:$$$ISERR(tSC)
325
325
 
326
+ #; Add debug settings, three settings are always available debug a boolean, port an integer and a timeout an integer
327
+ Set tPropCat = "Python Debug"
328
+ #; Debug property
329
+ Set tPropDebug = ##class(%Dictionary.PropertyDefinition).%New()
330
+ Set tPropDebug.Name = "enable"
331
+ Set tPropDebug.Type = "%Boolean"
332
+ Set tPropDebug.InitialExpression = $$$quote(0)
333
+ Set tPropDebug.Description = "Enable or disable debug"
334
+
335
+ Set tSC = tCOSClass.Properties.Insert(tPropDebug)
336
+ Quit:$$$ISERR(tSC)
337
+
338
+ #; Add the settings parameter
339
+ Set tSETTINGSParamValue = tSETTINGSParamValue_",enable:"_tPropCat
340
+
341
+ #; Port property
342
+ Set tPropPort = ##class(%Dictionary.PropertyDefinition).%New()
343
+ Set tPropPort.Name = "port"
344
+ Set tPropPort.Type = "%Integer"
345
+ Set tPropPort.InitialExpression = $$$quote(0)
346
+ Set tPropPort.Description = "Port to use for the debug connection, if 0 an random port will be used"
347
+ Set tSC = tCOSClass.Properties.Insert(tPropPort)
348
+ Quit:$$$ISERR(tSC)
349
+
350
+ #; Add the settings parameter
351
+ Set tSETTINGSParamValue = tSETTINGSParamValue_",port:"_tPropCat
352
+
353
+ #; Timeout property
354
+ Set tPropTimeout = ##class(%Dictionary.PropertyDefinition).%New()
355
+ Set tPropTimeout.Name = "timeout"
356
+ Set tPropTimeout.Type = "%Integer"
357
+ Set tPropTimeout.InitialExpression = $$$quote(30)
358
+ Set tSC = tCOSClass.Properties.Insert(tPropTimeout)
359
+ Quit:$$$ISERR(tSC)
360
+
361
+ #; Add the settings parameter
362
+ Set tSETTINGSParamValue = tSETTINGSParamValue_",timeout:"_tPropCat
363
+
364
+ #; PythonInterpreterPath property
365
+ Set tPropInterpre = ##class(%Dictionary.PropertyDefinition).%New()
366
+ Set tPropInterpre.Name = "PythonInterpreterPath"
367
+ Set tPropInterpre.Type = "%String"
368
+ Set tPropInterpre.Description = "Path to the Python interpreter, if not set the default one will be used"
369
+ Do tPropInterpre.Parameters.SetAt("255","MAXLEN")
370
+ Set tSC = tCOSClass.Properties.Insert(tPropInterpre)
371
+ Quit:$$$ISERR(tSC)
372
+
373
+ #; Add the settings parameter
374
+ Set tSETTINGSParamValue = tSETTINGSParamValue_",PythonInterpreterPath:"_tPropCat
375
+
326
376
  #dim tSETTINGSParam As %Dictionary.ParameterDefinition = ##class(%Dictionary.ParameterDefinition).%New()
327
377
  Set tSETTINGSParam.Name = "SETTINGS"
328
378
  Set tSETTINGSParam.Default = tSETTINGSParamValue
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iris_pex_embedded_python
3
- Version: 3.4.0b13
3
+ Version: 3.4.1
4
4
  Summary: Iris Interoperability based on Embedded Python
5
5
  Author-email: grongier <guillaume.rongier@intersystems.com>
6
6
  License: MIT License
@@ -49,6 +49,7 @@ Requires-Dist: xmltodict>=0.12.0
49
49
  Requires-Dist: iris-embedded-python-wrapper>=0.0.6
50
50
  Requires-Dist: setuptools>=40.8.0
51
51
  Requires-Dist: jsonpath-ng>=1.7.0
52
+ Requires-Dist: debugpy>=1.8.0
52
53
  Dynamic: license-file
53
54
 
54
55
  # IoP (Interoperability On Python)
@@ -0,0 +1,80 @@
1
+ grongier/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ grongier/cls/Grongier/PEX/BusinessOperation.cls,sha256=FgLLHTU8yHKxZIoz__5rtHW89b-o_Tjjf5i09WIqcJs,291
3
+ grongier/cls/Grongier/PEX/BusinessProcess.cls,sha256=0S7RU0GYafviILGCwkOKk7mQtP1Bvmd01b1dqfLMjDk,341
4
+ grongier/cls/Grongier/PEX/BusinessService.cls,sha256=KEidVN2tnaJ-6QKmPj8--BqlxMOayPM7Z8A42caC5s8,287
5
+ grongier/cls/Grongier/PEX/Common.cls,sha256=_7K83DN_Krj5pSgPpfWmINSA0yAhZkhXLBDmKDgLeBs,292
6
+ grongier/cls/Grongier/PEX/Director.cls,sha256=CMmLEQRbK37zenYZOMkmRa9P6B9xLUdWgm7YLk1yKGg,306
7
+ grongier/cls/Grongier/PEX/InboundAdapter.cls,sha256=4S3gjicQ-yfClO4RgKgu7iJQgQaxfH_a-1NmAeZ6Uv0,285
8
+ grongier/cls/Grongier/PEX/Message.cls,sha256=KzWxhWjDKQMjc6fnUZSrxJ9y6u5i1jAsyj0zbeTCmto,273
9
+ grongier/cls/Grongier/PEX/OutboundAdapter.cls,sha256=6bRIZ2gzufF5uGzf3z0MY460Yl6gKP31yJm8kzttm8g,287
10
+ grongier/cls/Grongier/PEX/PickleMessage.cls,sha256=r4BTEML91d1YmvkL8L209ilSyCPunYE-zJbQIJK_kBw,285
11
+ grongier/cls/Grongier/PEX/Test.cls,sha256=lvCM0hUZEQuawyteeRjucJvDhkRUc2NfGC6n6vV4nrQ,116
12
+ grongier/cls/Grongier/PEX/Utils.cls,sha256=hJtkE_YMz0z7ufocwz98vl1ODHT-NU-Qpl5hyYVu8jo,233
13
+ grongier/cls/Grongier/PEX/Duplex/Operation.cls,sha256=0X9jHVkGqoh-aLTHmXdb9DuWFY6YxEBQ7dNYLCO7cdw,68
14
+ grongier/cls/Grongier/PEX/Duplex/Process.cls,sha256=AQiL_x5tG99tvauMwiPHsU3G6irb1HGSyBnqREXF4AQ,342
15
+ grongier/cls/Grongier/PEX/Duplex/Service.cls,sha256=OEYgYbxNtff_ACW2XGee9NtUht3u6nuC822cx7ng2cA,71
16
+ grongier/cls/Grongier/PEX/PrivateSession/Duplex.cls,sha256=7RUXLw53Tjv_IL8KpWKm4iFlAeSqAELrawJ42iu-AH4,270
17
+ grongier/cls/Grongier/PEX/PrivateSession/Message/Ack.cls,sha256=aKi3EhyQipGKMap19xW27CHEHRKCo9yf8Qk2LsEOwx4,429
18
+ grongier/cls/Grongier/PEX/PrivateSession/Message/Poll.cls,sha256=pcUgHgxX1pMH-wQpE_ow8JGBCgiKmsSmsgNwYgP5eD8,431
19
+ grongier/cls/Grongier/PEX/PrivateSession/Message/Start.cls,sha256=T3jNoR8RjKr1InQ6SgqBYTgFwpSB0Q60WholjbvForg,433
20
+ grongier/cls/Grongier/PEX/PrivateSession/Message/Stop.cls,sha256=zy30ZXXN4XcovPij-kOF3PuH1SkP1EUvlEJQRx2S9RU,431
21
+ grongier/cls/Grongier/Service/WSGI.cls,sha256=7u2SsFmnsubMfdazvaDchKCM3yesPRMfKBzMIkwQ9xc,77
22
+ grongier/pex/__init__.py,sha256=CPLDFa4dusvGX9VZYTUk-M0Xa_yR4e4Gqku1rIT75qo,1060
23
+ grongier/pex/__main__.py,sha256=pQzVtkDhAeI6dpNRC632dVk2SGZZIEDwDufdgZe8VWs,98
24
+ grongier/pex/_business_host.py,sha256=dlV8CWJad8Pr2TNfD9OjcVKaq5gEYQACZla1FK6-bDM,44
25
+ grongier/pex/_cli.py,sha256=hOHz3n-aHtULuhdCkqZ_SSb3sv7M6j2WhRxgCTvgR9I,64
26
+ grongier/pex/_common.py,sha256=HZwG2C2-yB8yNN8kXhI6vxg8h-rROuEx38YOVFWIk1s,31
27
+ grongier/pex/_director.py,sha256=pCmoiJ-sxe24yQaDz6ZFBsAnqU6fh57_dlew98B7rtE,35
28
+ grongier/pex/_utils.py,sha256=gvsdr8WhWrE6smlsCxhoF14VUZfitrwqr5J57HkJhi4,29
29
+ grongier/pex/wsgi/handlers.py,sha256=NrFLo_YbAh-x_PlWhAiWkQnUUN2Ss9HoEm63dDWCBpQ,2947
30
+ iop/__init__.py,sha256=1C589HojSVK0yJf1KuTPA39ZjrOYO0QFLv45rqbZpA4,1183
31
+ iop/__main__.py,sha256=pQzVtkDhAeI6dpNRC632dVk2SGZZIEDwDufdgZe8VWs,98
32
+ iop/_async_request.py,sha256=ae950UFSlOHjmXGifbjHV4SFiJAMefrTVLs6lGEkgXE,2242
33
+ iop/_business_host.py,sha256=x9wMNfs_IXBczEeGHsrnAo8mgFrlAhwtrWkSC-W9vqA,9699
34
+ iop/_business_operation.py,sha256=ml4BIn1BfrGx8AUGISFR71DZIUCP8vZ2yn9SQjaSzTM,3038
35
+ iop/_business_process.py,sha256=hj6nDIP5Mz5UYbm0vDjvs9lPSEYVQxGJl6tQRcDGTBk,8548
36
+ iop/_business_service.py,sha256=wdhEKkqNHWt09XYGrvIpSuDDI4MyCGm2rKdvGQJ93EI,3988
37
+ iop/_cli.py,sha256=fhaUpq3rTb4P2QPuuqoeatsphMLBPj9xtbvFPJv-2Mo,7941
38
+ iop/_common.py,sha256=YJrEAsf0xT-nGsCYPARwg4jrSGTYuMfMe56A8GJ46oA,13754
39
+ iop/_debugpy.py,sha256=HAZOBuYGsVi4bQ8cV1Bas0dbH9stcs_dGDSVJJ2QqfE,4702
40
+ iop/_decorators.py,sha256=ZpgEETLdKWv58AoSMfXnm3_mA-6qPphIegjG-npDgwg,2324
41
+ iop/_director.py,sha256=d1XXJn8T8VF9rmT-joJdz_ElS2UR6myRaXaMFC_2brA,11498
42
+ iop/_dispatch.py,sha256=I3TAhvTuk8j4VcROI9vAitJ0a7Nk1BYAWKRrLeNsjr0,3203
43
+ iop/_inbound_adapter.py,sha256=PS5ToqhrYcXq9ZdLbCBqAfVp8kCeRACm_KF66pwBO9U,1652
44
+ iop/_iris.py,sha256=9LsPHk8g9_oBqMM8SzX2HPCeHZtxdnIJqG4TVzUeKBw,150
45
+ iop/_log_manager.py,sha256=uCuhbTjozAcDGZ9phtMUiq5OczNQaA_nDwx-g1CWPq4,3107
46
+ iop/_message.py,sha256=pJQOjRIdw4wSDoJamvItGODMe-UjDU71XihgWdtCAqc,1120
47
+ iop/_message_validator.py,sha256=K6FxLe72gBHQXZTLVrFw87rABGM0F6CTaNtZ2MqJoss,1408
48
+ iop/_outbound_adapter.py,sha256=YTAhLrRf9chEAd53mV6KKbpaHOKNOKJHoGgj5wakRR0,726
49
+ iop/_private_session_duplex.py,sha256=mzlFABh-ly51X1uSWw9YwQbktfMvuNdp2ALlRvlDow4,5152
50
+ iop/_private_session_process.py,sha256=todprfYFSDr-h-BMvWL_IGC6wbQqkMy3mPHWEWCUSE0,1686
51
+ iop/_serialization.py,sha256=lS5zHS14Olpw2i2s-cXMHV8CsjJLNmYdAhfZFvLfqe4,6652
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=yq3HskJOuX-jMtU6UW2EwhU9ur1m-v9ZLtTYu4lp5zw,11416
57
+ iop/cls/IOP/Director.cls,sha256=M43LoTb6lwSr0J81RFxi1YLW1mwda09wQ7Xqr3nBtxo,2008
58
+ iop/cls/IOP/InboundAdapter.cls,sha256=GeoCm6q5HcLJ5e4VxgqXiErJXqolBbpKwpunaNzpvjU,610
59
+ iop/cls/IOP/Message.cls,sha256=ZrYQHosgfTG9wv7i-WQ8j71YXZMmL4_mN16xtIDwcRg,25180
60
+ iop/cls/IOP/OutboundAdapter.cls,sha256=9eOwy5ojwcTzwrHs6LNrFQvUD8aqcoNCZrILN1ycdDM,958
61
+ iop/cls/IOP/PickleMessage.cls,sha256=S3y7AClQ8mAILjxPuHdCjGosBZYzGbUQ5WTv4mYPNMQ,1673
62
+ iop/cls/IOP/Test.cls,sha256=gAC9PEfMZsvAEWIa241-ug2FWAhITbN1SOispZzJPnI,2094
63
+ iop/cls/IOP/Utils.cls,sha256=_6d1qRNVbWH8GMrjA7xHudCJWw28ZXdRhVeEOcvCsRc,17744
64
+ iop/cls/IOP/Duplex/Operation.cls,sha256=K_fmgeLjPZQbHgNrc0kd6DUQoW0fDn1VHQjJxHo95Zk,525
65
+ iop/cls/IOP/Duplex/Process.cls,sha256=xbefZ4z84a_IUhavWN6P_gZBzqkdJ5XRTXxro6iDvAg,6986
66
+ iop/cls/IOP/Duplex/Service.cls,sha256=sTMOQUCMBgVitmQkM8bbsrmrRtCdj91VlctJ3I7b8WU,161
67
+ iop/cls/IOP/Message/JSONSchema.cls,sha256=SL26n8Z0D81SAGL2NthI10NFdT4Oe1x_GQiaTYPwkoo,3252
68
+ iop/cls/IOP/PrivateSession/Duplex.cls,sha256=8a_dO7E2RTzuxzoufryjlS41l-99NmTtOcmFXOnSwA8,7957
69
+ iop/cls/IOP/PrivateSession/Message/Ack.cls,sha256=y6-5uSVod36bxeQuT2ytPN4TUAfM1mvGGJuTbWbpNv4,941
70
+ iop/cls/IOP/PrivateSession/Message/Poll.cls,sha256=z3ALYmGYQasTcyYNyBeoHzJdNXI4nBO_N8Cqo9l4sQY,942
71
+ iop/cls/IOP/PrivateSession/Message/Start.cls,sha256=uk-WTe66GicCshgmVy3F5ugHiAyPs1m2ueS_3g0YubQ,949
72
+ iop/cls/IOP/PrivateSession/Message/Stop.cls,sha256=7g3gKFUjNg0WXBLuWnj-VnCs5G6hSE09YTzGEp0zbGc,1390
73
+ iop/cls/IOP/Service/WSGI.cls,sha256=VLNCXEwmHW9dBnE51uGE1nvGX6T4HjhqePT3LVhsjAE,10440
74
+ iop/wsgi/handlers.py,sha256=NrFLo_YbAh-x_PlWhAiWkQnUUN2Ss9HoEm63dDWCBpQ,2947
75
+ iris_pex_embedded_python-3.4.1.dist-info/licenses/LICENSE,sha256=rZSiBFId_sfbJ6RL0GjjPX-InNLkNS9ou7eQsikciI8,1089
76
+ iris_pex_embedded_python-3.4.1.dist-info/METADATA,sha256=pZl-CA5z914L7qZulEhIMdXGAXJY4MVaj5qCs2sSwZE,4447
77
+ iris_pex_embedded_python-3.4.1.dist-info/WHEEL,sha256=ooBFpIzZCPdw3uqIQsOo4qqbA4ZRPxHnOH7peeONza0,91
78
+ iris_pex_embedded_python-3.4.1.dist-info/entry_points.txt,sha256=pj-i4LSDyiSP6xpHlVjMCbg1Pik7dC3_sdGY3Yp9Vhk,38
79
+ iris_pex_embedded_python-3.4.1.dist-info/top_level.txt,sha256=4p0q6hCATmYIVMVi3I8hOUcJE1kwzyBeHygWv_rGvrU,13
80
+ iris_pex_embedded_python-3.4.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (77.0.3)
2
+ Generator: setuptools (80.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -0,0 +1,2 @@
1
+ grongier
2
+ iop
@@ -1,10 +0,0 @@
1
- import intersystems_iris._ListReader
2
-
3
- class _BufferReader(intersystems_iris._ListReader._ListReader):
4
-
5
- def __init__(self, header, buffer, locale):
6
- self.header = header
7
- super().__init__(buffer, locale)
8
-
9
- def _get_header_count(self):
10
- return self.header._get_count()
@@ -1,32 +0,0 @@
1
- import intersystems_iris._ListWriter
2
- import intersystems_iris._MessageHeader
3
-
4
- class _BufferWriter(intersystems_iris._ListWriter._ListWriter):
5
-
6
- def __init__(self, locale, is_unicode, compact_double):
7
- super().__init__(locale, is_unicode, compact_double)
8
- self.offset = intersystems_iris._MessageHeader._MessageHeader.HEADER_SIZE
9
-
10
- def _write_header(self, function_code):
11
- self.buffer[12] = function_code[0]
12
- self.buffer[13] = function_code[1]
13
- self.offset = intersystems_iris._MessageHeader._MessageHeader.HEADER_SIZE
14
-
15
- def _write_header_sysio(self, sysio_code):
16
- code_int = sysio_code + 49728
17
- code_bytes = code_int.to_bytes(2, 'little')
18
- self.buffer[12] = code_bytes[0]
19
- self.buffer[13] = code_bytes[1]
20
- self.offset = intersystems_iris._MessageHeader._MessageHeader.HEADER_SIZE
21
-
22
- def _set_connection_info(self, connection_info):
23
- self._locale = connection_info._locale
24
- self._is_unicode = connection_info._is_unicode
25
- self._compact_double = connection_info._compact_double
26
-
27
- def _get_header_buffer(self):
28
- return self.buffer[0:intersystems_iris._MessageHeader._MessageHeader.HEADER_SIZE]
29
-
30
- def _get_data_buffer(self):
31
- return self.buffer[intersystems_iris._MessageHeader._MessageHeader.HEADER_SIZE:self.offset]
32
-
@@ -1,56 +0,0 @@
1
- import intersystems_iris._Constant
2
-
3
-
4
- class _ConnectionInformation(object):
5
- def __init__(self):
6
- self.protocol_version = intersystems_iris._Constant._Constant.PROTOCOL_VERSION
7
- self._is_unicode = True
8
- self._compact_double = False
9
- self._locale = "latin-1"
10
- self._delimited_ids = 0
11
- self._server_version = ""
12
- self._server_version_major = 0
13
- self._server_version_minor = 0
14
- self._iris_install_dir = ""
15
- self._server_job_number = -1
16
-
17
- def _set_server_locale(self, locale):
18
- self._locale = self._map_server_locale(locale)
19
-
20
- def _parse_server_version(self, server_version):
21
- split_1 = server_version.split("|")
22
- self._server_version = split_1[0]
23
- if len(split_1) > 1:
24
- self._iris_install_dir = split_1[1]
25
- if self._server_version.find("Version") > 0:
26
- version = server_version[server_version.find("Version") + 8 :]
27
- self._server_version_major = version.split(".")[0]
28
- self._server_version_minor = version.split(".")[1]
29
- return
30
-
31
- @staticmethod
32
- def _map_server_locale(locale):
33
- # we need to map IRIS locale literals to Python locale literals
34
- _locales = {
35
- "LATIN1": "latin_1",
36
- "LATIN2": "iso8859_2",
37
- "LATINC": "iso8859_5",
38
- "LATINA": "iso8859_6",
39
- "LATING": "iso8859_7",
40
- "LATINH": "iso8859_8",
41
- "LATINT": "iso8859_11",
42
- "LATIN9": "iso8859_15",
43
- "CP1250": "cp1250",
44
- "CP1251": "cp1251",
45
- "CP1252": "cp1252",
46
- "CP1253": "cp1253",
47
- "CP1255": "cp1255",
48
- "CP1256": "cp1256",
49
- "CP1257": "cp1257",
50
- "CP874": "cp874",
51
- "UNICODE": "utf-8",
52
- }
53
- return _locales[locale.upper()] if locale.upper() in _locales else locale
54
-
55
- def __repr__(self) -> str:
56
- return f"<{self._server_version}>"
@@ -1,18 +0,0 @@
1
- class _ConnectionParameters(object):
2
- """_ConnectionParameters represents the properties that are implicit to a URL."""
3
- def __init__(self):
4
- self.hostname = None
5
- self.port = None
6
- self.namespace = None
7
- self.timeout = None
8
- self.sharedmemory = False
9
- self.logfile = None
10
- self.sslcontext = None
11
- self.isolationLevel = None
12
- self.featureOptions = None
13
-
14
- def _set_sharedmemory(self, sharedmemory):
15
- self.sharedmemory = sharedmemory
16
-
17
- def _get_sharedmemory(self):
18
- return self.sharedmemory