iris-pex-embedded-python 3.4.0b13__py3-none-any.whl → 3.4.1b1__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/_async_request.py +3 -1
- iop/_business_host.py +2 -1
- iop/_cli.py +9 -1
- iop/_common.py +2 -1
- iop/_director.py +17 -17
- iop/_iris.py +7 -0
- iop/_log_manager.py +8 -8
- iop/_serialization.py +44 -40
- iop/_utils.py +10 -10
- {iris_pex_embedded_python-3.4.0b13.dist-info → iris_pex_embedded_python-3.4.1b1.dist-info}/METADATA +1 -1
- {iris_pex_embedded_python-3.4.0b13.dist-info → iris_pex_embedded_python-3.4.1b1.dist-info}/RECORD +15 -14
- {iris_pex_embedded_python-3.4.0b13.dist-info → iris_pex_embedded_python-3.4.1b1.dist-info}/WHEEL +1 -1
- {iris_pex_embedded_python-3.4.0b13.dist-info → iris_pex_embedded_python-3.4.1b1.dist-info}/entry_points.txt +0 -0
- {iris_pex_embedded_python-3.4.0b13.dist-info → iris_pex_embedded_python-3.4.1b1.dist-info}/licenses/LICENSE +0 -0
- {iris_pex_embedded_python-3.4.0b13.dist-info → iris_pex_embedded_python-3.4.1b1.dist-info}/top_level.txt +0 -0
iop/_async_request.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import asyncio
|
|
2
|
-
import
|
|
2
|
+
from . import _iris
|
|
3
3
|
from typing import Any, Optional, Union
|
|
4
4
|
from iop._dispatch import dispatch_deserializer, dispatch_serializer
|
|
5
5
|
from iop._message import _Message as Message
|
|
@@ -24,6 +24,7 @@ class AsyncRequest(asyncio.Future):
|
|
|
24
24
|
|
|
25
25
|
async def send(self) -> None:
|
|
26
26
|
# init parameters
|
|
27
|
+
iris = _iris.get_iris()
|
|
27
28
|
message_header_id = iris.ref()
|
|
28
29
|
queue_name = iris.ref()
|
|
29
30
|
end_time = iris.ref()
|
|
@@ -46,6 +47,7 @@ class AsyncRequest(asyncio.Future):
|
|
|
46
47
|
self.set_result(self._response)
|
|
47
48
|
|
|
48
49
|
def is_done(self) -> None:
|
|
50
|
+
iris = _iris.get_iris()
|
|
49
51
|
response = iris.ref()
|
|
50
52
|
status = self._iris_handle.dispatchIsRequestDone(self.timeout, self._end_time,
|
|
51
53
|
self._queue_name, self._message_header_id,
|
iop/_business_host.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
from inspect import getsource
|
|
2
2
|
from typing import Any,List, Optional, Tuple, Union
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
from . import _iris
|
|
5
5
|
|
|
6
6
|
from iop._common import _Common
|
|
7
7
|
from iop._message import _Message as Message
|
|
@@ -109,6 +109,7 @@ class _BusinessHost(_Common):
|
|
|
109
109
|
|
|
110
110
|
def _create_call_structure(self, target: str, request: Union[Message, Any]) -> Any:
|
|
111
111
|
"""Create an Ens.CallStructure object for the request."""
|
|
112
|
+
iris = _iris.get_iris()
|
|
112
113
|
call = iris.cls("Ens.CallStructure")._New()
|
|
113
114
|
call.TargetDispatchName = target
|
|
114
115
|
call.Request = dispatch_serializer(request)
|
iop/_cli.py
CHANGED
|
@@ -7,10 +7,10 @@ from enum import Enum, auto
|
|
|
7
7
|
import sys
|
|
8
8
|
from typing import Optional, Callable
|
|
9
9
|
from importlib.metadata import version
|
|
10
|
-
|
|
11
10
|
from iop._director import _Director
|
|
12
11
|
from iop._utils import _Utils
|
|
13
12
|
|
|
13
|
+
|
|
14
14
|
class CommandType(Enum):
|
|
15
15
|
DEFAULT = auto()
|
|
16
16
|
LIST = auto()
|
|
@@ -46,11 +46,16 @@ class CommandArgs:
|
|
|
46
46
|
test: Optional[str] = None
|
|
47
47
|
classname: Optional[str] = None
|
|
48
48
|
body: Optional[str] = None
|
|
49
|
+
namespace: Optional[str] = None
|
|
49
50
|
|
|
50
51
|
class Command:
|
|
51
52
|
def __init__(self, args: CommandArgs):
|
|
52
53
|
self.args = args
|
|
53
54
|
|
|
55
|
+
if self.args.namespace and self.args.namespace != 'not_set':
|
|
56
|
+
# set environment variable IRISNAMESPACE
|
|
57
|
+
os.environ['IRISNAMESPACE'] = self.args.namespace
|
|
58
|
+
|
|
54
59
|
def execute(self) -> None:
|
|
55
60
|
command_type = self._determine_command_type()
|
|
56
61
|
command_handlers = {
|
|
@@ -182,6 +187,9 @@ def create_parser() -> argparse.ArgumentParser:
|
|
|
182
187
|
test = main_parser.add_argument_group('test arguments')
|
|
183
188
|
test.add_argument('-C', '--classname', help='test classname', nargs='?', const='not_set')
|
|
184
189
|
test.add_argument('-B', '--body', help='test body', nargs='?', const='not_set')
|
|
190
|
+
|
|
191
|
+
namespace = main_parser.add_argument_group('namespace arguments')
|
|
192
|
+
namespace.add_argument('-n', '--namespace', help='set namespace', nargs='?', const='not_set')
|
|
185
193
|
|
|
186
194
|
return main_parser
|
|
187
195
|
|
iop/_common.py
CHANGED
|
@@ -3,7 +3,7 @@ import inspect
|
|
|
3
3
|
import traceback
|
|
4
4
|
from typing import Any, ClassVar, List, Optional, Tuple
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
from . import _iris
|
|
7
7
|
|
|
8
8
|
from iop._log_manager import LogManager, logging
|
|
9
9
|
|
|
@@ -285,6 +285,7 @@ class _Common(metaclass=abc.ABCMeta):
|
|
|
285
285
|
Parameters:
|
|
286
286
|
message: a string that is written to the log.
|
|
287
287
|
"""
|
|
288
|
+
iris = _iris.get_iris()
|
|
288
289
|
current_class, current_method = self._log()
|
|
289
290
|
iris.cls("Ens.Util.Log").LogAssert(current_class, current_method, message)
|
|
290
291
|
|
iop/_director.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import asyncio
|
|
2
2
|
import datetime
|
|
3
3
|
import functools
|
|
4
|
-
import
|
|
4
|
+
from . import _iris
|
|
5
5
|
import intersystems_iris.dbapi._DBAPI as irisdbapi
|
|
6
6
|
import signal
|
|
7
7
|
from dataclasses import dataclass
|
|
@@ -55,7 +55,7 @@ class _Director():
|
|
|
55
55
|
Returns:
|
|
56
56
|
an object that contains an instance of IRISBusinessService
|
|
57
57
|
"""
|
|
58
|
-
iris_object =
|
|
58
|
+
iris_object = _iris.get_iris().cls("IOP.Director").dispatchCreateBusinessService(target)
|
|
59
59
|
return iris_object
|
|
60
60
|
|
|
61
61
|
@staticmethod
|
|
@@ -69,7 +69,7 @@ class _Director():
|
|
|
69
69
|
Returns:
|
|
70
70
|
an object that contains an instance of IRISBusinessService
|
|
71
71
|
"""
|
|
72
|
-
iris_object =
|
|
72
|
+
iris_object = _iris.get_iris().cls("IOP.Director").dispatchCreateBusinessService(target)
|
|
73
73
|
return iris_object.GetClass()
|
|
74
74
|
|
|
75
75
|
### List of function to manage the production
|
|
@@ -102,37 +102,37 @@ class _Director():
|
|
|
102
102
|
def start_production(production_name=None):
|
|
103
103
|
if production_name is None or production_name == '':
|
|
104
104
|
production_name = _Director.get_default_production()
|
|
105
|
-
|
|
105
|
+
_iris.get_iris().cls('Ens.Director').StartProduction(production_name)
|
|
106
106
|
|
|
107
107
|
### stop production
|
|
108
108
|
@staticmethod
|
|
109
109
|
def stop_production():
|
|
110
|
-
|
|
110
|
+
_iris.get_iris().cls('Ens.Director').StopProduction()
|
|
111
111
|
|
|
112
112
|
### restart production
|
|
113
113
|
@staticmethod
|
|
114
114
|
def restart_production():
|
|
115
|
-
|
|
115
|
+
_iris.get_iris().cls('Ens.Director').RestartProduction()
|
|
116
116
|
|
|
117
117
|
### shutdown production
|
|
118
118
|
@staticmethod
|
|
119
119
|
def shutdown_production():
|
|
120
|
-
|
|
120
|
+
_iris.get_iris().cls('Ens.Director').StopProduction(10,1)
|
|
121
121
|
|
|
122
122
|
### update production
|
|
123
123
|
@staticmethod
|
|
124
124
|
def update_production():
|
|
125
|
-
|
|
125
|
+
_iris.get_iris().cls('Ens.Director').UpdateProduction()
|
|
126
126
|
|
|
127
127
|
### list production
|
|
128
128
|
@staticmethod
|
|
129
129
|
def list_productions():
|
|
130
|
-
return
|
|
130
|
+
return _iris.get_iris().cls('IOP.Director').dispatchListProductions()
|
|
131
131
|
|
|
132
132
|
### status production
|
|
133
133
|
@staticmethod
|
|
134
134
|
def status_production():
|
|
135
|
-
dikt =
|
|
135
|
+
dikt = _iris.get_iris().cls('IOP.Director').StatusProduction()
|
|
136
136
|
if dikt['Production'] is None or dikt['Production'] == '':
|
|
137
137
|
dikt['Production'] = _Director.get_default_production()
|
|
138
138
|
return dikt
|
|
@@ -141,13 +141,13 @@ class _Director():
|
|
|
141
141
|
@staticmethod
|
|
142
142
|
def set_default_production(production_name=''):
|
|
143
143
|
#set ^Ens.Configuration("SuperUser","LastProduction")
|
|
144
|
-
glb =
|
|
144
|
+
glb = _iris.get_iris().gref("^Ens.Configuration")
|
|
145
145
|
glb['csp', "LastProduction"] = production_name
|
|
146
146
|
|
|
147
147
|
### get default production
|
|
148
148
|
@staticmethod
|
|
149
149
|
def get_default_production():
|
|
150
|
-
glb =
|
|
150
|
+
glb = _iris.get_iris().gref("^Ens.Configuration")
|
|
151
151
|
default_production_name = glb['csp', "LastProduction"]
|
|
152
152
|
if default_production_name is None or default_production_name == '':
|
|
153
153
|
default_production_name = 'Not defined'
|
|
@@ -257,20 +257,20 @@ class _Director():
|
|
|
257
257
|
body: the body of the message
|
|
258
258
|
"""
|
|
259
259
|
if not message:
|
|
260
|
-
message =
|
|
260
|
+
message = _iris.get_iris().cls('Ens.Request')._New()
|
|
261
261
|
if classname:
|
|
262
262
|
# if classname start with 'iris.' then create an iris object
|
|
263
263
|
if classname.startswith('iris.'):
|
|
264
264
|
# strip the iris. prefix
|
|
265
265
|
classname = classname[5:]
|
|
266
266
|
if body:
|
|
267
|
-
message =
|
|
267
|
+
message = _iris.get_iris().cls(classname)._New(body)
|
|
268
268
|
else:
|
|
269
|
-
message =
|
|
269
|
+
message = _iris.get_iris().cls(classname)._New()
|
|
270
270
|
# else create a python object
|
|
271
271
|
else:
|
|
272
272
|
# python message are casted to Grongier.PEX.Message
|
|
273
|
-
message =
|
|
273
|
+
message = _iris.get_iris().cls("IOP.Message")._New()
|
|
274
274
|
message.classname = classname
|
|
275
275
|
if body:
|
|
276
276
|
message.json = body
|
|
@@ -278,7 +278,7 @@ class _Director():
|
|
|
278
278
|
message.json = _Utils.string_to_stream("{}")
|
|
279
279
|
# serialize the message
|
|
280
280
|
serial_message = dispatch_serializer(message)
|
|
281
|
-
response =
|
|
281
|
+
response = _iris.get_iris().cls('IOP.Utils').dispatchTestComponent(target,serial_message)
|
|
282
282
|
try:
|
|
283
283
|
deserialized_response = dispatch_deserializer(response)
|
|
284
284
|
except ImportError as e:
|
iop/_iris.py
ADDED
iop/_log_manager.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import traceback
|
|
2
|
-
import
|
|
2
|
+
from . import _iris
|
|
3
3
|
import logging
|
|
4
4
|
from typing import Optional, Tuple
|
|
5
5
|
|
|
@@ -41,11 +41,11 @@ class IRISLogHandler(logging.Handler):
|
|
|
41
41
|
|
|
42
42
|
# Map Python logging levels to IRIS logging methods
|
|
43
43
|
self.level_map = {
|
|
44
|
-
logging.DEBUG:
|
|
45
|
-
logging.INFO:
|
|
46
|
-
logging.WARNING:
|
|
47
|
-
logging.ERROR:
|
|
48
|
-
logging.CRITICAL:
|
|
44
|
+
logging.DEBUG: _iris.get_iris().cls("Ens.Util.Log").LogTrace,
|
|
45
|
+
logging.INFO: _iris.get_iris().cls("Ens.Util.Log").LogInfo,
|
|
46
|
+
logging.WARNING: _iris.get_iris().cls("Ens.Util.Log").LogWarning,
|
|
47
|
+
logging.ERROR: _iris.get_iris().cls("Ens.Util.Log").LogError,
|
|
48
|
+
logging.CRITICAL: _iris.get_iris().cls("Ens.Util.Log").LogAlert,
|
|
49
49
|
}
|
|
50
50
|
# Map Python logging levels to IRIS logging Console level
|
|
51
51
|
self.level_map_console = {
|
|
@@ -76,8 +76,8 @@ class IRISLogHandler(logging.Handler):
|
|
|
76
76
|
class_name = record.class_name if hasattr(record, "class_name") else record.name
|
|
77
77
|
method_name = record.method_name if hasattr(record, "method_name") else record.funcName
|
|
78
78
|
if self.to_console or (hasattr(record, "to_console") and record.to_console):
|
|
79
|
-
|
|
79
|
+
_iris.get_iris().cls("%SYS.System").WriteToConsoleLog(self.format(record),
|
|
80
80
|
0,self.level_map_console.get(record.levelno, 0),class_name+"."+method_name)
|
|
81
81
|
else:
|
|
82
|
-
log_func = self.level_map.get(record.levelno,
|
|
82
|
+
log_func = self.level_map.get(record.levelno, _iris.get_iris().cls("Ens.Util.Log").LogInfo)
|
|
83
83
|
log_func(class_name, method_name, self.format(record))
|
iop/_serialization.py
CHANGED
|
@@ -7,8 +7,8 @@ import json
|
|
|
7
7
|
from dataclasses import asdict, is_dataclass
|
|
8
8
|
from typing import Any, Dict, Type
|
|
9
9
|
|
|
10
|
-
import
|
|
11
|
-
from pydantic import BaseModel, TypeAdapter
|
|
10
|
+
from . import _iris
|
|
11
|
+
from pydantic import BaseModel, TypeAdapter, ValidationError
|
|
12
12
|
|
|
13
13
|
from iop._message import _PydanticPickleMessage
|
|
14
14
|
from iop._utils import _Utils
|
|
@@ -37,17 +37,17 @@ class MessageSerializer:
|
|
|
37
37
|
raise SerializationError(f"Object {obj} must be a Pydantic model or dataclass")
|
|
38
38
|
|
|
39
39
|
@staticmethod
|
|
40
|
-
def serialize(message: Any, use_pickle: bool = False) ->
|
|
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) ->
|
|
47
|
+
def _serialize_json(message: Any) -> Any:
|
|
48
48
|
json_string = MessageSerializer._convert_to_json_safe(message)
|
|
49
49
|
|
|
50
|
-
msg =
|
|
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:
|
|
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:
|
|
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) ->
|
|
91
|
+
def _serialize_pickle(message: Any) -> Any:
|
|
92
92
|
pickle_string = codecs.encode(pickle.dumps(message), "base64").decode()
|
|
93
|
-
msg =
|
|
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:
|
|
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,38 +108,42 @@ class MessageSerializer:
|
|
|
108
108
|
return classname[:j], classname[j+1:]
|
|
109
109
|
|
|
110
110
|
def dataclass_from_dict(klass: Type, dikt: Dict) -> Any:
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
-
|
|
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
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
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:
|
iop/_utils.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import sys
|
|
3
3
|
import ast
|
|
4
|
-
import
|
|
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
|
|
23
|
-
raise RuntimeError(
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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(
|
|
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 =
|
|
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 =
|
|
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:
|
{iris_pex_embedded_python-3.4.0b13.dist-info → iris_pex_embedded_python-3.4.1b1.dist-info}/RECORD
RENAMED
|
@@ -92,25 +92,26 @@ 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=1C589HojSVK0yJf1KuTPA39ZjrOYO0QFLv45rqbZpA4,1183
|
|
94
94
|
iop/__main__.py,sha256=pQzVtkDhAeI6dpNRC632dVk2SGZZIEDwDufdgZe8VWs,98
|
|
95
|
-
iop/_async_request.py,sha256=
|
|
96
|
-
iop/_business_host.py,sha256=
|
|
95
|
+
iop/_async_request.py,sha256=ae950UFSlOHjmXGifbjHV4SFiJAMefrTVLs6lGEkgXE,2242
|
|
96
|
+
iop/_business_host.py,sha256=x9wMNfs_IXBczEeGHsrnAo8mgFrlAhwtrWkSC-W9vqA,9699
|
|
97
97
|
iop/_business_operation.py,sha256=ml4BIn1BfrGx8AUGISFR71DZIUCP8vZ2yn9SQjaSzTM,3038
|
|
98
98
|
iop/_business_process.py,sha256=hj6nDIP5Mz5UYbm0vDjvs9lPSEYVQxGJl6tQRcDGTBk,8548
|
|
99
99
|
iop/_business_service.py,sha256=lPTp3_tcLTOWvHlE_YwrcImLGf1PJBUgIOrV-8ctFLw,3851
|
|
100
|
-
iop/_cli.py,sha256=
|
|
101
|
-
iop/_common.py,sha256=
|
|
100
|
+
iop/_cli.py,sha256=fhaUpq3rTb4P2QPuuqoeatsphMLBPj9xtbvFPJv-2Mo,7941
|
|
101
|
+
iop/_common.py,sha256=NaNEeAt_A1JRLDRvMDAHPWoNgwIt3xyg5X4aL0KSXMM,13485
|
|
102
102
|
iop/_decorators.py,sha256=ZpgEETLdKWv58AoSMfXnm3_mA-6qPphIegjG-npDgwg,2324
|
|
103
|
-
iop/_director.py,sha256=
|
|
103
|
+
iop/_director.py,sha256=pAs_NJtRCkqf-wWUvbNhaEiXUuC5JMdPaDP-wmf-dVo,11742
|
|
104
104
|
iop/_dispatch.py,sha256=I3TAhvTuk8j4VcROI9vAitJ0a7Nk1BYAWKRrLeNsjr0,3203
|
|
105
105
|
iop/_inbound_adapter.py,sha256=PS5ToqhrYcXq9ZdLbCBqAfVp8kCeRACm_KF66pwBO9U,1652
|
|
106
|
-
iop/
|
|
106
|
+
iop/_iris.py,sha256=9LsPHk8g9_oBqMM8SzX2HPCeHZtxdnIJqG4TVzUeKBw,150
|
|
107
|
+
iop/_log_manager.py,sha256=ZBsMdY7OWn6BadvQ3UfoEKmDYQ9TxmcrXF3sNbqquAI,3332
|
|
107
108
|
iop/_message.py,sha256=pJQOjRIdw4wSDoJamvItGODMe-UjDU71XihgWdtCAqc,1120
|
|
108
109
|
iop/_message_validator.py,sha256=K6FxLe72gBHQXZTLVrFw87rABGM0F6CTaNtZ2MqJoss,1408
|
|
109
110
|
iop/_outbound_adapter.py,sha256=YTAhLrRf9chEAd53mV6KKbpaHOKNOKJHoGgj5wakRR0,726
|
|
110
111
|
iop/_private_session_duplex.py,sha256=mzlFABh-ly51X1uSWw9YwQbktfMvuNdp2ALlRvlDow4,5152
|
|
111
112
|
iop/_private_session_process.py,sha256=todprfYFSDr-h-BMvWL_IGC6wbQqkMy3mPHWEWCUSE0,1686
|
|
112
|
-
iop/_serialization.py,sha256=
|
|
113
|
-
iop/_utils.py,sha256=
|
|
113
|
+
iop/_serialization.py,sha256=iMC51QMIcWwj1ntDbTgZbLZIFFQuBcC4wH9kfQNivic,6164
|
|
114
|
+
iop/_utils.py,sha256=zguWjvZQkzAScHXl4OomZr2ZtPljDqVAs1CFllQZn5g,20092
|
|
114
115
|
iop/cls/IOP/BusinessOperation.cls,sha256=lrymqZ8wHl5kJjXwdjbQVs5sScV__yIWGh-oGbiB_X0,914
|
|
115
116
|
iop/cls/IOP/BusinessProcess.cls,sha256=s3t38w1ykHqM26ETcbCYLt0ocjZyVVahm-_USZkuJ1E,2855
|
|
116
117
|
iop/cls/IOP/BusinessService.cls,sha256=7ebn32J9PiZXUgXuh5Xxm_7X6zHBiqkJr9c_dWxbPO8,1021
|
|
@@ -133,11 +134,11 @@ iop/cls/IOP/PrivateSession/Message/Start.cls,sha256=uk-WTe66GicCshgmVy3F5ugHiAyP
|
|
|
133
134
|
iop/cls/IOP/PrivateSession/Message/Stop.cls,sha256=7g3gKFUjNg0WXBLuWnj-VnCs5G6hSE09YTzGEp0zbGc,1390
|
|
134
135
|
iop/cls/IOP/Service/WSGI.cls,sha256=VLNCXEwmHW9dBnE51uGE1nvGX6T4HjhqePT3LVhsjAE,10440
|
|
135
136
|
iop/wsgi/handlers.py,sha256=NrFLo_YbAh-x_PlWhAiWkQnUUN2Ss9HoEm63dDWCBpQ,2947
|
|
136
|
-
iris_pex_embedded_python-3.4.
|
|
137
|
+
iris_pex_embedded_python-3.4.1b1.dist-info/licenses/LICENSE,sha256=rZSiBFId_sfbJ6RL0GjjPX-InNLkNS9ou7eQsikciI8,1089
|
|
137
138
|
irisnative/_IRISNative.py,sha256=HQ4nBhc8t8_5OtxdMG-kx1aa-T1znf2I8obZOPLOPzg,665
|
|
138
139
|
irisnative/__init__.py,sha256=6YmvBLQSURsCPKaNg7LK-xpo4ipDjrlhKuwdfdNb3Kg,341
|
|
139
|
-
iris_pex_embedded_python-3.4.
|
|
140
|
-
iris_pex_embedded_python-3.4.
|
|
141
|
-
iris_pex_embedded_python-3.4.
|
|
142
|
-
iris_pex_embedded_python-3.4.
|
|
143
|
-
iris_pex_embedded_python-3.4.
|
|
140
|
+
iris_pex_embedded_python-3.4.1b1.dist-info/METADATA,sha256=ArYjjjAGrUQNUTSX4ADjh8mEjA4_RLpo6LbuvIl7tA4,4419
|
|
141
|
+
iris_pex_embedded_python-3.4.1b1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
142
|
+
iris_pex_embedded_python-3.4.1b1.dist-info/entry_points.txt,sha256=pj-i4LSDyiSP6xpHlVjMCbg1Pik7dC3_sdGY3Yp9Vhk,38
|
|
143
|
+
iris_pex_embedded_python-3.4.1b1.dist-info/top_level.txt,sha256=VWDlX4YF4qFVRGrG3-Gs0kgREol02i8gIpsHNbhfFPw,42
|
|
144
|
+
iris_pex_embedded_python-3.4.1b1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|