iris-pex-embedded-python 3.7.1b1__tar.gz → 3.7.1b2__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.
- {iris_pex_embedded_python-3.7.1b1/src/iris_pex_embedded_python.egg-info → iris_pex_embedded_python-3.7.1b2}/PKG-INFO +1 -1
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/pyproject.toml +1 -1
- iris_pex_embedded_python-3.7.1b2/src/grongier/pex/__init__.py +66 -0
- iris_pex_embedded_python-3.7.1b2/src/iop/__init__.py +78 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/__main__.py +3 -2
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_async_request.py +31 -12
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_business_host.py +135 -69
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_business_operation.py +12 -10
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_business_process.py +79 -39
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_business_service.py +22 -18
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_cli.py +157 -81
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_common.py +146 -64
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_debugpy.py +42 -22
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_decorators.py +17 -1
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_director.py +93 -61
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_director_protocol.py +3 -1
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_dispatch.py +48 -27
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_generator_request.py +21 -8
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_inbound_adapter.py +9 -8
- iris_pex_embedded_python-3.7.1b2/src/iop/_iris.py +10 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_local.py +1 -1
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_log_manager.py +15 -19
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_message.py +10 -5
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_message_validator.py +9 -6
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_outbound_adapter.py +5 -4
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_persistent_message.py +27 -9
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_private_session_duplex.py +43 -28
- iris_pex_embedded_python-3.7.1b2/src/iop/_private_session_process.py +48 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_remote.py +56 -39
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_serialization.py +83 -43
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_utils.py +209 -131
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/wsgi/handlers.py +44 -36
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2/src/iris_pex_embedded_python.egg-info}/PKG-INFO +1 -1
- iris_pex_embedded_python-3.7.1b1/src/grongier/pex/__init__.py +0 -27
- iris_pex_embedded_python-3.7.1b1/src/iop/__init__.py +0 -28
- iris_pex_embedded_python-3.7.1b1/src/iop/_iris.py +0 -8
- iris_pex_embedded_python-3.7.1b1/src/iop/_private_session_process.py +0 -41
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/LICENSE +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/README.md +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/setup.cfg +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/setup.py +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/__init__.py +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/BusinessOperation.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/BusinessProcess.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/BusinessService.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/Common.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/Director.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/Duplex/Operation.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/Duplex/Process.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/Duplex/Service.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/InboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/Message.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/OutboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/PickleMessage.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/PrivateSession/Duplex.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Ack.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Poll.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Start.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Stop.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/Test.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/PEX/Utils.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/cls/Grongier/Service/WSGI.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/pex/__main__.py +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/pex/_business_host.py +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/pex/_cli.py +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/pex/_common.py +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/pex/_director.py +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/pex/_utils.py +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/grongier/pex/wsgi/handlers.py +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/BusinessOperation.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/BusinessProcess.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/BusinessService.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Common.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Director.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Duplex/Operation.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Duplex/Process.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Duplex/Service.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Generator/Message/Ack.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Generator/Message/Poll.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Generator/Message/Start.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Generator/Message/StartPickle.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Generator/Message/Stop.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/InboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Message/JSONSchema.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Message.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/OutboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/PickleMessage.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/PrivateSession/Duplex.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/PrivateSession/Message/Ack.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/PrivateSession/Message/Poll.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/PrivateSession/Message/Start.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/PrivateSession/Message/Stop.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Projection.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Service/Remote/Handler.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Service/Remote/Rest/v1.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Service/WSGI.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Test.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Utils.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/cls/IOP/Wrapper.cls +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iris_pex_embedded_python.egg-info/SOURCES.txt +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iris_pex_embedded_python.egg-info/dependency_links.txt +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iris_pex_embedded_python.egg-info/entry_points.txt +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iris_pex_embedded_python.egg-info/requires.txt +0 -0
- {iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iris_pex_embedded_python.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
from iop._business_operation import _BusinessOperation
|
|
2
|
+
from iop._business_process import _BusinessProcess
|
|
3
|
+
from iop._business_service import _BusinessService
|
|
4
|
+
from iop._director import _Director
|
|
5
|
+
from iop._inbound_adapter import _InboundAdapter
|
|
6
|
+
from iop._message import _Message
|
|
7
|
+
from iop._message import _PickleMessage
|
|
8
|
+
from iop._outbound_adapter import _OutboundAdapter
|
|
9
|
+
from iop._persistent_message import Field as Field
|
|
10
|
+
from iop._persistent_message import Model as Model
|
|
11
|
+
from iop._persistent_message import _PersistentMessage
|
|
12
|
+
from iop._private_session_duplex import _PrivateSessionDuplex
|
|
13
|
+
from iop._private_session_process import _PrivateSessionProcess
|
|
14
|
+
from iop._utils import _Utils
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Utils(_Utils):
|
|
18
|
+
pass
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class InboundAdapter(_InboundAdapter):
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class OutboundAdapter(_OutboundAdapter):
|
|
26
|
+
pass
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class BusinessService(_BusinessService):
|
|
30
|
+
pass
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class BusinessOperation(_BusinessOperation):
|
|
34
|
+
pass
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class BusinessProcess(_BusinessProcess):
|
|
38
|
+
pass
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class DuplexService(_PrivateSessionDuplex):
|
|
42
|
+
pass
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class DuplexOperation(_PrivateSessionDuplex):
|
|
46
|
+
pass
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class DuplexProcess(_PrivateSessionProcess):
|
|
50
|
+
pass
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class Message(_Message):
|
|
54
|
+
pass
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class PickleMessage(_PickleMessage):
|
|
58
|
+
pass
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class PersistentMessage(_PersistentMessage):
|
|
62
|
+
_iop_persistent_message_abstract = True
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class Director(_Director):
|
|
66
|
+
pass
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
from iop._business_operation import _BusinessOperation
|
|
2
|
+
from iop._business_process import _BusinessProcess
|
|
3
|
+
from iop._business_service import _BusinessService
|
|
4
|
+
from iop._director import _Director
|
|
5
|
+
from iop._inbound_adapter import _InboundAdapter
|
|
6
|
+
from iop._message import (
|
|
7
|
+
_Message,
|
|
8
|
+
_PickleMessage,
|
|
9
|
+
_PydanticMessage,
|
|
10
|
+
_PydanticPickleMessage,
|
|
11
|
+
)
|
|
12
|
+
from iop._outbound_adapter import _OutboundAdapter
|
|
13
|
+
from iop._persistent_message import Field as Field
|
|
14
|
+
from iop._persistent_message import Model as Model
|
|
15
|
+
from iop._persistent_message import _PersistentMessage
|
|
16
|
+
from iop._private_session_duplex import _PrivateSessionDuplex
|
|
17
|
+
from iop._private_session_process import _PrivateSessionProcess
|
|
18
|
+
from iop._utils import _Utils
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Utils(_Utils):
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class InboundAdapter(_InboundAdapter):
|
|
26
|
+
pass
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class OutboundAdapter(_OutboundAdapter):
|
|
30
|
+
pass
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class BusinessService(_BusinessService):
|
|
34
|
+
pass
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class BusinessOperation(_BusinessOperation):
|
|
38
|
+
pass
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class BusinessProcess(_BusinessProcess):
|
|
42
|
+
pass
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class DuplexService(_PrivateSessionDuplex):
|
|
46
|
+
pass
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class DuplexOperation(_PrivateSessionDuplex):
|
|
50
|
+
pass
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class DuplexProcess(_PrivateSessionProcess):
|
|
54
|
+
pass
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class Message(_Message):
|
|
58
|
+
pass
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class PickleMessage(_PickleMessage):
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class PydanticMessage(_PydanticMessage):
|
|
66
|
+
pass
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class PydanticPickleMessage(_PydanticPickleMessage):
|
|
70
|
+
pass
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class PersistentMessage(_PersistentMessage):
|
|
74
|
+
_iop_persistent_message_abstract = True
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class Director(_Director):
|
|
78
|
+
pass
|
{iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_async_request.py
RENAMED
|
@@ -5,6 +5,7 @@ from . import _iris
|
|
|
5
5
|
from ._dispatch import dispatch_deserializer, dispatch_serializer
|
|
6
6
|
from ._message import _Message as Message
|
|
7
7
|
|
|
8
|
+
|
|
8
9
|
class AsyncRequest(asyncio.Future):
|
|
9
10
|
_message_header_id: int = 0
|
|
10
11
|
_queue_name: str = ""
|
|
@@ -12,8 +13,14 @@ class AsyncRequest(asyncio.Future):
|
|
|
12
13
|
_response: Any = None
|
|
13
14
|
_done: bool = False
|
|
14
15
|
|
|
15
|
-
def __init__(
|
|
16
|
-
|
|
16
|
+
def __init__(
|
|
17
|
+
self,
|
|
18
|
+
target: str,
|
|
19
|
+
request: Union[Message, Any],
|
|
20
|
+
timeout: int = -1,
|
|
21
|
+
description: Optional[str] = None,
|
|
22
|
+
host: Optional[Any] = None,
|
|
23
|
+
) -> None:
|
|
17
24
|
super().__init__()
|
|
18
25
|
self.target = target
|
|
19
26
|
self.request = request
|
|
@@ -35,9 +42,15 @@ class AsyncRequest(asyncio.Future):
|
|
|
35
42
|
|
|
36
43
|
# send request
|
|
37
44
|
self._iris_handle.dispatchSendRequestAsyncNG(
|
|
38
|
-
self.target,
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
self.target,
|
|
46
|
+
request,
|
|
47
|
+
self.timeout,
|
|
48
|
+
self.description,
|
|
49
|
+
message_header_id,
|
|
50
|
+
queue_name,
|
|
51
|
+
end_time,
|
|
52
|
+
)
|
|
53
|
+
|
|
41
54
|
# get byref values
|
|
42
55
|
self._message_header_id = message_header_id.value
|
|
43
56
|
self._queue_name = queue_name.value
|
|
@@ -52,16 +65,22 @@ class AsyncRequest(asyncio.Future):
|
|
|
52
65
|
def is_done(self) -> None:
|
|
53
66
|
iris = _iris.get_iris()
|
|
54
67
|
response = iris.ref()
|
|
55
|
-
status = self._iris_handle.dispatchIsRequestDone(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
68
|
+
status = self._iris_handle.dispatchIsRequestDone(
|
|
69
|
+
self.timeout,
|
|
70
|
+
self._end_time,
|
|
71
|
+
self._queue_name,
|
|
72
|
+
self._message_header_id,
|
|
73
|
+
response,
|
|
74
|
+
)
|
|
75
|
+
|
|
59
76
|
self._response = dispatch_deserializer(response.value)
|
|
60
77
|
|
|
61
|
-
if status == 2:
|
|
78
|
+
if status == 2: # message found
|
|
62
79
|
self._done = True
|
|
63
|
-
elif status == 1:
|
|
80
|
+
elif status == 1: # message not found
|
|
64
81
|
pass
|
|
65
82
|
else:
|
|
66
83
|
self._done = True
|
|
67
|
-
self.set_exception(
|
|
84
|
+
self.set_exception(
|
|
85
|
+
RuntimeError(iris.system.Status.GetOneStatusText(status))
|
|
86
|
+
)
|
{iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_business_host.py
RENAMED
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
from inspect import getsource
|
|
2
|
-
from typing import Any,List, Optional, Tuple, Union
|
|
2
|
+
from typing import Any, List, Optional, Tuple, Union
|
|
3
3
|
|
|
4
4
|
from . import _iris
|
|
5
5
|
from ._common import _Common
|
|
6
6
|
from ._message import _Message as Message
|
|
7
|
-
from ._decorators import
|
|
7
|
+
from ._decorators import (
|
|
8
|
+
input_serializer_param,
|
|
9
|
+
output_deserializer,
|
|
10
|
+
input_deserializer,
|
|
11
|
+
output_serializer,
|
|
12
|
+
)
|
|
8
13
|
from ._dispatch import dispatch_serializer, dispatch_deserializer, dispach_message
|
|
9
14
|
from ._async_request import AsyncRequest
|
|
10
15
|
from ._generator_request import _GeneratorRequest
|
|
11
16
|
|
|
17
|
+
|
|
12
18
|
class _BusinessHost(_Common):
|
|
13
19
|
"""Base class for business components that defines common methods.
|
|
14
|
-
|
|
20
|
+
|
|
15
21
|
This is a superclass for BusinessService, BusinessProcess, and BusinessOperation that
|
|
16
22
|
defines common functionality like message serialization/deserialization and request handling.
|
|
17
23
|
"""
|
|
@@ -19,58 +25,79 @@ class _BusinessHost(_Common):
|
|
|
19
25
|
buffer: int = 64000
|
|
20
26
|
DISPATCH: List[Tuple[str, str]] = []
|
|
21
27
|
|
|
22
|
-
@input_serializer_param(1,
|
|
28
|
+
@input_serializer_param(1, "request")
|
|
23
29
|
@output_deserializer
|
|
24
|
-
def send_request_sync(
|
|
25
|
-
|
|
30
|
+
def send_request_sync(
|
|
31
|
+
self,
|
|
32
|
+
target: str,
|
|
33
|
+
request: Union[Message, Any],
|
|
34
|
+
timeout: int = -1,
|
|
35
|
+
description: Optional[str] = None,
|
|
36
|
+
) -> Any:
|
|
26
37
|
"""Send message synchronously to target component.
|
|
27
|
-
|
|
38
|
+
|
|
28
39
|
Args:
|
|
29
40
|
target: Name of target component
|
|
30
41
|
request: Message to send
|
|
31
|
-
timeout: Timeout in seconds, -1 means wait forever
|
|
42
|
+
timeout: Timeout in seconds, -1 means wait forever
|
|
32
43
|
description: Optional description for logging
|
|
33
|
-
|
|
44
|
+
|
|
34
45
|
Returns:
|
|
35
46
|
Response from target component
|
|
36
|
-
|
|
47
|
+
|
|
37
48
|
Raises:
|
|
38
49
|
TypeError: If request is invalid type
|
|
39
50
|
"""
|
|
40
|
-
return self.iris_handle.dispatchSendRequestSync(
|
|
51
|
+
return self.iris_handle.dispatchSendRequestSync(
|
|
52
|
+
target, request, timeout, description
|
|
53
|
+
)
|
|
41
54
|
|
|
42
|
-
@input_serializer_param(1,
|
|
43
|
-
def send_request_async(
|
|
44
|
-
|
|
55
|
+
@input_serializer_param(1, "request")
|
|
56
|
+
def send_request_async(
|
|
57
|
+
self,
|
|
58
|
+
target: str,
|
|
59
|
+
request: Union[Message, Any],
|
|
60
|
+
description: Optional[str] = None,
|
|
61
|
+
) -> None:
|
|
45
62
|
"""Send message asynchronously to target component.
|
|
46
|
-
|
|
63
|
+
|
|
47
64
|
Args:
|
|
48
65
|
target: Name of target component
|
|
49
66
|
request: Message to send
|
|
50
67
|
description: Optional description for logging
|
|
51
|
-
|
|
68
|
+
|
|
52
69
|
Raises:
|
|
53
70
|
TypeError: If request is invalid type
|
|
54
71
|
"""
|
|
55
72
|
return self.iris_handle.dispatchSendRequestAsync(target, request, description)
|
|
56
|
-
|
|
57
|
-
async def send_request_async_ng(
|
|
58
|
-
|
|
73
|
+
|
|
74
|
+
async def send_request_async_ng(
|
|
75
|
+
self,
|
|
76
|
+
target: str,
|
|
77
|
+
request: Union[Message, Any],
|
|
78
|
+
timeout: int = -1,
|
|
79
|
+
description: Optional[str] = None,
|
|
80
|
+
) -> Any:
|
|
59
81
|
"""Send message asynchronously to target component with asyncio.
|
|
60
|
-
|
|
82
|
+
|
|
61
83
|
Args:
|
|
62
84
|
target: Name of target component
|
|
63
85
|
request: Message to send
|
|
64
|
-
timeout: Timeout in seconds, -1 means wait forever
|
|
86
|
+
timeout: Timeout in seconds, -1 means wait forever
|
|
65
87
|
description: Optional description for logging
|
|
66
|
-
|
|
88
|
+
|
|
67
89
|
Returns:
|
|
68
90
|
Response from target component
|
|
69
91
|
"""
|
|
70
92
|
return await AsyncRequest(target, request, timeout, description, self)
|
|
71
93
|
|
|
72
|
-
def send_generator_request(
|
|
73
|
-
|
|
94
|
+
def send_generator_request(
|
|
95
|
+
self,
|
|
96
|
+
target: str,
|
|
97
|
+
request: Union[Message, Any],
|
|
98
|
+
timeout: int = -1,
|
|
99
|
+
description: Optional[str] = None,
|
|
100
|
+
) -> _GeneratorRequest:
|
|
74
101
|
"""Send message as a generator request to target component.
|
|
75
102
|
Args:
|
|
76
103
|
target: Name of target component
|
|
@@ -84,42 +111,58 @@ class _BusinessHost(_Common):
|
|
|
84
111
|
"""
|
|
85
112
|
return _GeneratorRequest(self, target, request, timeout, description)
|
|
86
113
|
|
|
87
|
-
def send_multi_request_sync(
|
|
88
|
-
|
|
114
|
+
def send_multi_request_sync(
|
|
115
|
+
self,
|
|
116
|
+
target_request: List[Tuple[str, Union[Message, Any]]],
|
|
117
|
+
timeout: int = -1,
|
|
118
|
+
description: Optional[str] = None,
|
|
119
|
+
) -> List[Tuple[str, Union[Message, Any], Any, int]]:
|
|
89
120
|
"""Send multiple messages synchronously to target components.
|
|
90
|
-
|
|
121
|
+
|
|
91
122
|
Args:
|
|
92
123
|
target_request: List of tuples (target, request) to send
|
|
93
|
-
timeout: Timeout in seconds, -1 means wait forever
|
|
124
|
+
timeout: Timeout in seconds, -1 means wait forever
|
|
94
125
|
description: Optional description for logging
|
|
95
|
-
|
|
126
|
+
|
|
96
127
|
Returns:
|
|
97
128
|
List of tuples (target, request, response, status)
|
|
98
|
-
|
|
129
|
+
|
|
99
130
|
Raises:
|
|
100
131
|
TypeError: If target_request is not a list of tuples
|
|
101
132
|
ValueError: If target_request is empty
|
|
102
133
|
"""
|
|
103
134
|
self._validate_target_request(target_request)
|
|
104
|
-
|
|
105
|
-
call_list = [
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
135
|
+
|
|
136
|
+
call_list = [
|
|
137
|
+
self._create_call_structure(target, request)
|
|
138
|
+
for target, request in target_request
|
|
139
|
+
]
|
|
140
|
+
|
|
141
|
+
response_list = self.iris_handle.dispatchSendRequestSyncMultiple(
|
|
142
|
+
call_list, timeout
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
return [
|
|
146
|
+
(
|
|
147
|
+
target_request[i][0],
|
|
148
|
+
target_request[i][1],
|
|
112
149
|
dispatch_deserializer(response_list[i].Response),
|
|
113
|
-
response_list[i].ResponseCode
|
|
114
|
-
|
|
150
|
+
response_list[i].ResponseCode,
|
|
151
|
+
)
|
|
152
|
+
for i in range(len(target_request))
|
|
153
|
+
]
|
|
115
154
|
|
|
116
|
-
def _validate_target_request(
|
|
155
|
+
def _validate_target_request(
|
|
156
|
+
self, target_request: List[Tuple[str, Union[Message, Any]]]
|
|
157
|
+
) -> None:
|
|
117
158
|
"""Validate the target_request parameter structure."""
|
|
118
159
|
if not isinstance(target_request, list):
|
|
119
160
|
raise TypeError("target_request must be a list")
|
|
120
161
|
if not target_request:
|
|
121
162
|
raise ValueError("target_request must not be empty")
|
|
122
|
-
if not all(
|
|
163
|
+
if not all(
|
|
164
|
+
isinstance(item, tuple) and len(item) == 2 for item in target_request
|
|
165
|
+
):
|
|
123
166
|
raise TypeError("target_request must contain tuples of (target, request)")
|
|
124
167
|
|
|
125
168
|
def _create_call_structure(self, target: str, request: Union[Message, Any]) -> Any:
|
|
@@ -133,7 +176,7 @@ class _BusinessHost(_Common):
|
|
|
133
176
|
@staticmethod
|
|
134
177
|
def OnGetConnections() -> Optional[List[str]]:
|
|
135
178
|
"""The OnGetConnections() method returns all of the targets of any SendRequestSync or SendRequestAsync
|
|
136
|
-
calls for the class. Implement this method to allow connections between components to show up in
|
|
179
|
+
calls for the class. Implement this method to allow connections between components to show up in
|
|
137
180
|
the interoperability UI.
|
|
138
181
|
|
|
139
182
|
Returns:
|
|
@@ -141,25 +184,34 @@ class _BusinessHost(_Common):
|
|
|
141
184
|
"""
|
|
142
185
|
return None
|
|
143
186
|
|
|
144
|
-
def SendRequestSync(
|
|
145
|
-
|
|
187
|
+
def SendRequestSync(
|
|
188
|
+
self,
|
|
189
|
+
target: str,
|
|
190
|
+
request: Union[Message, Any],
|
|
191
|
+
timeout: int = -1,
|
|
192
|
+
description: Optional[str] = None,
|
|
193
|
+
) -> Any:
|
|
146
194
|
"""DEPRECATED: use send_request_sync.
|
|
147
|
-
|
|
195
|
+
|
|
148
196
|
Args:
|
|
149
197
|
target: The target of the request
|
|
150
198
|
request: The request to send
|
|
151
|
-
timeout: The timeout in seconds, -1 means wait forever
|
|
199
|
+
timeout: The timeout in seconds, -1 means wait forever
|
|
152
200
|
description: A string that describes the request
|
|
153
|
-
|
|
201
|
+
|
|
154
202
|
Returns:
|
|
155
203
|
The response from the target component
|
|
156
204
|
"""
|
|
157
205
|
return self.send_request_sync(target, request, timeout, description)
|
|
158
|
-
|
|
159
|
-
def SendRequestAsync(
|
|
160
|
-
|
|
206
|
+
|
|
207
|
+
def SendRequestAsync(
|
|
208
|
+
self,
|
|
209
|
+
target: str,
|
|
210
|
+
request: Union[Message, Any],
|
|
211
|
+
description: Optional[str] = None,
|
|
212
|
+
) -> None:
|
|
161
213
|
"""DEPRECATED: use send_request_async.
|
|
162
|
-
|
|
214
|
+
|
|
163
215
|
Args:
|
|
164
216
|
target: The target of the request
|
|
165
217
|
request: The request to send
|
|
@@ -170,24 +222,24 @@ class _BusinessHost(_Common):
|
|
|
170
222
|
@staticmethod
|
|
171
223
|
def getAdapterType() -> Optional[str]:
|
|
172
224
|
"""DEPRECATED: use get_adapter_type.
|
|
173
|
-
|
|
225
|
+
|
|
174
226
|
Returns:
|
|
175
227
|
Name of the registered Adapter
|
|
176
228
|
"""
|
|
177
229
|
return
|
|
178
|
-
|
|
230
|
+
|
|
179
231
|
@staticmethod
|
|
180
232
|
def get_adapter_type() -> Optional[str]:
|
|
181
233
|
"""Returns the name of the registered Adapter.
|
|
182
|
-
|
|
234
|
+
|
|
183
235
|
Returns:
|
|
184
236
|
Name of the registered Adapter
|
|
185
237
|
"""
|
|
186
|
-
return
|
|
187
|
-
|
|
238
|
+
return
|
|
239
|
+
|
|
188
240
|
def on_get_connections(self) -> List[str]:
|
|
189
241
|
"""The OnGetConnections() method returns all of the targets of any SendRequestSync or SendRequestAsync
|
|
190
|
-
calls for the class. Implement this method to allow connections between components to show up in
|
|
242
|
+
calls for the class. Implement this method to allow connections between components to show up in
|
|
191
243
|
the interoperability UI.
|
|
192
244
|
|
|
193
245
|
Returns:
|
|
@@ -199,20 +251,25 @@ class _BusinessHost(_Common):
|
|
|
199
251
|
# get the source code of the class
|
|
200
252
|
source = getsource(self.__class__)
|
|
201
253
|
# find all invocations of send_request_sync and send_request_async
|
|
202
|
-
for method in [
|
|
254
|
+
for method in [
|
|
255
|
+
"send_request_sync",
|
|
256
|
+
"send_request_async",
|
|
257
|
+
"SendRequestSync",
|
|
258
|
+
"SendRequestAsync",
|
|
259
|
+
]:
|
|
203
260
|
i = source.find(method)
|
|
204
261
|
while i != -1:
|
|
205
262
|
j = source.find("(", i)
|
|
206
263
|
if j != -1:
|
|
207
264
|
k = source.find(",", j)
|
|
208
265
|
if k != -1:
|
|
209
|
-
target = source[j+1:k]
|
|
266
|
+
target = source[j + 1 : k]
|
|
210
267
|
if target.find("=") != -1:
|
|
211
268
|
# it's a keyword argument, remove the keyword
|
|
212
|
-
target = target[target.find("=")+1:].strip()
|
|
269
|
+
target = target[target.find("=") + 1 :].strip()
|
|
213
270
|
if target not in target_list:
|
|
214
271
|
target_list.append(target)
|
|
215
|
-
i = source.find(method, i+1)
|
|
272
|
+
i = source.find(method, i + 1)
|
|
216
273
|
|
|
217
274
|
for target in target_list:
|
|
218
275
|
# if target is a string, remove the quotes
|
|
@@ -226,13 +283,18 @@ class _BusinessHost(_Common):
|
|
|
226
283
|
try:
|
|
227
284
|
if target.find("self.") != -1:
|
|
228
285
|
# it's a class variable
|
|
229
|
-
target_list[target_list.index(target)] = getattr(
|
|
286
|
+
target_list[target_list.index(target)] = getattr(
|
|
287
|
+
self, target[target.find(".") + 1 :]
|
|
288
|
+
)
|
|
230
289
|
elif target.find(".") != -1:
|
|
231
290
|
# it's a class variable
|
|
232
|
-
target_list[target_list.index(target)] = getattr(
|
|
291
|
+
target_list[target_list.index(target)] = getattr(
|
|
292
|
+
getattr(self, target[: target.find(".")]),
|
|
293
|
+
target[target.find(".") + 1 :],
|
|
294
|
+
)
|
|
233
295
|
else:
|
|
234
296
|
target_list[target_list.index(target)] = getattr(self, target)
|
|
235
|
-
except Exception
|
|
297
|
+
except Exception:
|
|
236
298
|
pass
|
|
237
299
|
|
|
238
300
|
return target_list
|
|
@@ -242,11 +304,15 @@ class _BusinessHost(_Common):
|
|
|
242
304
|
"""For internal use only."""
|
|
243
305
|
self._gen = dispach_message(self, request)
|
|
244
306
|
# check if self._gen is a generator
|
|
245
|
-
if not hasattr(self._gen,
|
|
246
|
-
raise TypeError(
|
|
247
|
-
|
|
307
|
+
if not hasattr(self._gen, "__iter__"):
|
|
308
|
+
raise TypeError(
|
|
309
|
+
"Expected a generator or iterable object, got: {}".format(
|
|
310
|
+
type(self._gen).__name__
|
|
311
|
+
)
|
|
312
|
+
)
|
|
313
|
+
|
|
248
314
|
return _iris.get_iris().IOP.Generator.Message.Ack._New()
|
|
249
|
-
|
|
315
|
+
|
|
250
316
|
@output_serializer
|
|
251
317
|
def _dispatch_generator_poll(self) -> Any:
|
|
252
318
|
"""For internal use only."""
|
{iris_pex_embedded_python-3.7.1b1 → iris_pex_embedded_python-3.7.1b2}/src/iop/_business_operation.py
RENAMED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import importlib
|
|
2
|
-
from typing import Any, List,
|
|
2
|
+
from typing import Any, List, Tuple
|
|
3
3
|
|
|
4
4
|
from ._business_host import _BusinessHost
|
|
5
|
-
from ._decorators import input_deserializer, output_serializer
|
|
5
|
+
from ._decorators import input_deserializer, output_serializer
|
|
6
6
|
from ._dispatch import create_dispatch, dispach_message
|
|
7
7
|
|
|
8
|
+
|
|
8
9
|
class _BusinessOperation(_BusinessHost):
|
|
9
10
|
"""Business operation component that handles outbound communication.
|
|
10
|
-
|
|
11
|
-
Responsible for sending messages to external systems. Can optionally use an
|
|
11
|
+
|
|
12
|
+
Responsible for sending messages to external systems. Can optionally use an
|
|
12
13
|
adapter to handle the outbound messaging protocol.
|
|
13
14
|
"""
|
|
14
15
|
|
|
@@ -18,13 +19,13 @@ class _BusinessOperation(_BusinessHost):
|
|
|
18
19
|
|
|
19
20
|
def on_message(self, request: Any) -> Any:
|
|
20
21
|
"""Handle incoming messages.
|
|
21
|
-
|
|
22
|
+
|
|
22
23
|
Process messages received from other production components and either
|
|
23
24
|
send to external system or forward to another component.
|
|
24
25
|
|
|
25
26
|
Args:
|
|
26
27
|
request: The incoming message
|
|
27
|
-
|
|
28
|
+
|
|
28
29
|
Returns:
|
|
29
30
|
Response message
|
|
30
31
|
"""
|
|
@@ -39,8 +40,10 @@ class _BusinessOperation(_BusinessHost):
|
|
|
39
40
|
def _set_iris_handles(self, handle_current: Any, handle_partner: Any) -> None:
|
|
40
41
|
"""For internal use only."""
|
|
41
42
|
self.iris_handle = handle_current
|
|
42
|
-
if type(handle_partner).__module__.find(
|
|
43
|
-
if handle_partner._IsA(
|
|
43
|
+
if type(handle_partner).__module__.find("iris") == 0:
|
|
44
|
+
if handle_partner._IsA(
|
|
45
|
+
"Grongier.PEX.OutboundAdapter"
|
|
46
|
+
) or handle_partner._IsA("IOP.OutboundAdapter"):
|
|
44
47
|
module = importlib.import_module(handle_partner.GetModule())
|
|
45
48
|
handle_partner = getattr(module, handle_partner.GetClassname())()
|
|
46
49
|
self.Adapter = self.adapter = handle_partner
|
|
@@ -56,7 +59,7 @@ class _BusinessOperation(_BusinessHost):
|
|
|
56
59
|
@output_serializer
|
|
57
60
|
def _dispatch_on_message(self, request: Any) -> Any:
|
|
58
61
|
"""For internal use only."""
|
|
59
|
-
return dispach_message(self,request)
|
|
62
|
+
return dispach_message(self, request)
|
|
60
63
|
|
|
61
64
|
def OnMessage(self, request: Any) -> Any:
|
|
62
65
|
"""DEPRECATED : use on_message
|
|
@@ -72,4 +75,3 @@ class _BusinessOperation(_BusinessHost):
|
|
|
72
75
|
The response object
|
|
73
76
|
"""
|
|
74
77
|
return
|
|
75
|
-
|