iris-pex-embedded-python 3.2.1b3__tar.gz → 3.3.0b2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of iris-pex-embedded-python might be problematic. Click here for more details.
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/PKG-INFO +1 -1
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/pyproject.toml +1 -1
- iris_pex_embedded_python-3.3.0b2/src/iop/_async_request.py +62 -0
- iris_pex_embedded_python-3.3.0b2/src/iop/_business_host.py +240 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_business_operation.py +6 -4
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_business_process.py +12 -10
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_business_service.py +3 -2
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_common.py +12 -75
- iris_pex_embedded_python-3.3.0b2/src/iop/_decorators.py +48 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_director.py +3 -2
- iris_pex_embedded_python-3.3.0b2/src/iop/_dispatch.py +219 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_log_manager.py +20 -12
- iris_pex_embedded_python-3.3.0b2/src/iop/_message_validator.py +41 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_private_session_duplex.py +11 -10
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_private_session_process.py +7 -7
- iris_pex_embedded_python-3.3.0b2/src/iop/_serialization.py +196 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_utils.py +27 -19
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iris_pex_embedded_python.egg-info/PKG-INFO +1 -1
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iris_pex_embedded_python.egg-info/SOURCES.txt +5 -0
- iris_pex_embedded_python-3.2.1b3/src/iop/_business_host.py +0 -675
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/LICENSE +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/README.md +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/setup.cfg +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/setup.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/__init__.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/BusinessOperation.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/BusinessProcess.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/BusinessService.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/Common.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/Director.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/Duplex/Operation.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/Duplex/Process.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/Duplex/Service.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/InboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/Message.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/OutboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/PickleMessage.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/PrivateSession/Duplex.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Ack.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Poll.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Start.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/PrivateSession/Message/Stop.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/Test.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/PEX/Utils.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/cls/Grongier/Service/WSGI.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/pex/__init__.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/pex/__main__.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/pex/_business_host.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/pex/_cli.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/pex/_common.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/pex/_director.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/pex/_utils.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/grongier/pex/wsgi/handlers.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_BufferReader.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_BufferWriter.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_ConnectionInformation.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_ConnectionParameters.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_Constant.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_DBList.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_Device.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_GatewayContext.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_GatewayException.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_GatewayUtility.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_IRIS.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_IRISConnection.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_IRISEmbedded.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_IRISGlobalNode.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_IRISGlobalNodeView.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_IRISIterator.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_IRISList.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_IRISNative.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_IRISOREF.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_IRISObject.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_IRISReference.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_InStream.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_LegacyIterator.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_ListItem.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_ListReader.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_ListWriter.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_LogFileStream.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_MessageHeader.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_OutStream.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_PrintStream.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_PythonGateway.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/_SharedMemorySocket.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/__init__.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/__main__.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/dbapi/_Column.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/dbapi/_DBAPI.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/dbapi/_Descriptor.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/dbapi/_IRISStream.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/dbapi/_Message.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/dbapi/_Parameter.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/dbapi/_ParameterCollection.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/dbapi/_ResultSetRow.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/dbapi/_SQLType.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/dbapi/__init__.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/dbapi/preparser/_PreParser.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/dbapi/preparser/_Scanner.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/dbapi/preparser/_Token.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/dbapi/preparser/_TokenList.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/dbapi/preparser/__init__.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/pex/_BusinessHost.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/pex/_BusinessOperation.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/pex/_BusinessProcess.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/pex/_BusinessService.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/pex/_Common.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/pex/_Director.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/pex/_IRISBusinessOperation.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/pex/_IRISBusinessService.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/pex/_IRISInboundAdapter.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/pex/_IRISOutboundAdapter.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/pex/_InboundAdapter.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/pex/_Message.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/pex/_OutboundAdapter.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/intersystems_iris/pex/__init__.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/__init__.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/__main__.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_cli.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_inbound_adapter.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_message.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_outbound_adapter.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_pickle_message.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/BusinessOperation.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/BusinessProcess.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/BusinessService.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/Common.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/Director.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/Duplex/Operation.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/Duplex/Process.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/Duplex/Service.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/InboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/Message/JSONSchema.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/Message.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/OutboundAdapter.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/PickleMessage.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/PrivateSession/Duplex.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/PrivateSession/Message/Ack.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/PrivateSession/Message/Poll.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/PrivateSession/Message/Start.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/PrivateSession/Message/Stop.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/Service/WSGI.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/Test.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/cls/IOP/Utils.cls +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/wsgi/handlers.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iris_pex_embedded_python.egg-info/dependency_links.txt +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iris_pex_embedded_python.egg-info/entry_points.txt +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iris_pex_embedded_python.egg-info/requires.txt +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iris_pex_embedded_python.egg-info/top_level.txt +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/irisnative/_IRISNative.py +0 -0
- {iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/irisnative/__init__.py +0 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
import iris
|
|
3
|
+
from typing import Any, Optional, Union
|
|
4
|
+
from iop._dispatch import dispatch_deserializer, dispatch_serializer
|
|
5
|
+
from iop._message import _Message as Message
|
|
6
|
+
|
|
7
|
+
class AsyncRequest(asyncio.Future):
|
|
8
|
+
_message_header_id: int = 0
|
|
9
|
+
_queue_name: str = ""
|
|
10
|
+
_end_time: int = 0
|
|
11
|
+
_response: Any = None
|
|
12
|
+
_done: bool = False
|
|
13
|
+
|
|
14
|
+
def __init__(self, target: str, request: Union[Message, Any],
|
|
15
|
+
timeout: int = -1, description: Optional[str] = None, host: Optional[Any] = None) -> None:
|
|
16
|
+
super().__init__()
|
|
17
|
+
self.target = target
|
|
18
|
+
self.request = request
|
|
19
|
+
self.timeout = timeout
|
|
20
|
+
self.description = description
|
|
21
|
+
self.host = host
|
|
22
|
+
self._iris_handle = host.iris_handle
|
|
23
|
+
asyncio.create_task(self.send())
|
|
24
|
+
|
|
25
|
+
async def send(self) -> None:
|
|
26
|
+
# init parameters
|
|
27
|
+
message_header_id = iris.ref()
|
|
28
|
+
queue_name = iris.ref()
|
|
29
|
+
end_time = iris.ref()
|
|
30
|
+
request = dispatch_serializer(self.request)
|
|
31
|
+
|
|
32
|
+
# send request
|
|
33
|
+
self._iris_handle.dispatchSendRequestAsyncNG(
|
|
34
|
+
self.target, request, self.timeout, self.description,
|
|
35
|
+
message_header_id, queue_name, end_time)
|
|
36
|
+
|
|
37
|
+
# get byref values
|
|
38
|
+
self._message_header_id = message_header_id.value
|
|
39
|
+
self._queue_name = queue_name.value
|
|
40
|
+
self._end_time = end_time.value
|
|
41
|
+
|
|
42
|
+
while not self._done:
|
|
43
|
+
await asyncio.sleep(0.1)
|
|
44
|
+
self.is_done()
|
|
45
|
+
|
|
46
|
+
self.set_result(self._response)
|
|
47
|
+
|
|
48
|
+
def is_done(self) -> None:
|
|
49
|
+
response = iris.ref()
|
|
50
|
+
status = self._iris_handle.dispatchIsRequestDone(self.timeout, self._end_time,
|
|
51
|
+
self._queue_name, self._message_header_id,
|
|
52
|
+
response)
|
|
53
|
+
|
|
54
|
+
self._response = dispatch_deserializer(response.value)
|
|
55
|
+
|
|
56
|
+
if status == 2: # message found
|
|
57
|
+
self._done = True
|
|
58
|
+
elif status == 1: # message not found
|
|
59
|
+
pass
|
|
60
|
+
else:
|
|
61
|
+
self._done = True
|
|
62
|
+
self.set_exception(RuntimeError(iris.system.Status.GetOneStatusText(status)))
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import abc
|
|
2
|
+
import asyncio
|
|
3
|
+
import base64
|
|
4
|
+
import codecs
|
|
5
|
+
import datetime
|
|
6
|
+
import decimal
|
|
7
|
+
import importlib
|
|
8
|
+
import inspect
|
|
9
|
+
import iris
|
|
10
|
+
import json
|
|
11
|
+
import pickle
|
|
12
|
+
import uuid
|
|
13
|
+
from dataclasses import dataclass
|
|
14
|
+
from functools import wraps
|
|
15
|
+
from inspect import getsource, signature
|
|
16
|
+
from typing import Any, Callable, ClassVar, Dict, List, Optional, Tuple, Type, Union
|
|
17
|
+
|
|
18
|
+
from dacite import Config, from_dict
|
|
19
|
+
|
|
20
|
+
from iop._common import _Common
|
|
21
|
+
from iop._message import _Message as Message
|
|
22
|
+
from iop._utils import _Utils
|
|
23
|
+
from iop._decorators import (
|
|
24
|
+
input_serializer, input_serializer_param, output_deserializer,
|
|
25
|
+
input_deserializer, output_serializer
|
|
26
|
+
)
|
|
27
|
+
from iop._serialization import IrisJSONEncoder, IrisJSONDecoder
|
|
28
|
+
from iop._dispatch import (
|
|
29
|
+
dispatch_serializer, dispatch_deserializer,
|
|
30
|
+
dispach_message, create_dispatch
|
|
31
|
+
)
|
|
32
|
+
from iop._async_request import AsyncRequest
|
|
33
|
+
|
|
34
|
+
class _BusinessHost(_Common):
|
|
35
|
+
"""Base class for business components that defines common methods.
|
|
36
|
+
|
|
37
|
+
This is a superclass for BusinessService, BusinessProcess, and BusinessOperation that
|
|
38
|
+
defines common functionality like message serialization/deserialization and request handling.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
buffer: int = 64000
|
|
42
|
+
DISPATCH: List[Tuple[str, str]] = []
|
|
43
|
+
|
|
44
|
+
@input_serializer_param(1, 'request')
|
|
45
|
+
@output_deserializer
|
|
46
|
+
def send_request_sync(self, target: str, request: Union[Message, Any],
|
|
47
|
+
timeout: int = -1, description: Optional[str] = None) -> Any:
|
|
48
|
+
"""Send message synchronously to target component.
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
target: Name of target component
|
|
52
|
+
request: Message to send
|
|
53
|
+
timeout: Timeout in seconds, -1 means wait forever
|
|
54
|
+
description: Optional description for logging
|
|
55
|
+
|
|
56
|
+
Returns:
|
|
57
|
+
Response from target component
|
|
58
|
+
|
|
59
|
+
Raises:
|
|
60
|
+
TypeError: If request is invalid type
|
|
61
|
+
"""
|
|
62
|
+
return self.iris_handle.dispatchSendRequestSync(target, request, timeout, description)
|
|
63
|
+
|
|
64
|
+
@input_serializer_param(1, 'request')
|
|
65
|
+
def send_request_async(self, target: str, request: Union[Message, Any],
|
|
66
|
+
description: Optional[str] = None) -> None:
|
|
67
|
+
"""Send message asynchronously to target component.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
target: Name of target component
|
|
71
|
+
request: Message to send
|
|
72
|
+
description: Optional description for logging
|
|
73
|
+
|
|
74
|
+
Raises:
|
|
75
|
+
TypeError: If request is invalid type
|
|
76
|
+
"""
|
|
77
|
+
return self.iris_handle.dispatchSendRequestAsync(target, request, description)
|
|
78
|
+
|
|
79
|
+
async def send_request_async_ng(self, target: str, request: Union[Message, Any],
|
|
80
|
+
timeout: int = -1, description: Optional[str] = None) -> Any:
|
|
81
|
+
"""Send message asynchronously to target component with asyncio.
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
target: Name of target component
|
|
85
|
+
request: Message to send
|
|
86
|
+
timeout: Timeout in seconds, -1 means wait forever
|
|
87
|
+
description: Optional description for logging
|
|
88
|
+
|
|
89
|
+
Returns:
|
|
90
|
+
Response from target component
|
|
91
|
+
"""
|
|
92
|
+
return await AsyncRequest(target, request, timeout, description, self)
|
|
93
|
+
|
|
94
|
+
def send_multi_request_sync(self, target_request: List[Tuple[str, Union[Message, Any]]],
|
|
95
|
+
timeout: int = -1, description: Optional[str] = None) -> List[Tuple[str, Union[Message, Any], Any, int]]:
|
|
96
|
+
"""Send multiple messages synchronously to target components.
|
|
97
|
+
|
|
98
|
+
Args:
|
|
99
|
+
target_request: List of tuples (target, request) to send
|
|
100
|
+
timeout: Timeout in seconds, -1 means wait forever
|
|
101
|
+
description: Optional description for logging
|
|
102
|
+
|
|
103
|
+
Returns:
|
|
104
|
+
List of tuples (target, request, response, status)
|
|
105
|
+
"""
|
|
106
|
+
# create a list of iris.Ens.CallStructure for each target_request
|
|
107
|
+
call_list = []
|
|
108
|
+
# sanity check
|
|
109
|
+
if not isinstance(target_request, list):
|
|
110
|
+
raise TypeError("The target_request parameter must be a list")
|
|
111
|
+
if len(target_request) == 0:
|
|
112
|
+
raise ValueError("The target_request parameter must not be empty")
|
|
113
|
+
# check if the target_request is a list of tuple of 2 elements
|
|
114
|
+
if not all(isinstance(item, tuple) and len(item) == 2 for item in target_request):
|
|
115
|
+
raise TypeError("The target_request parameter must be a list of tuple of 2 elements")
|
|
116
|
+
|
|
117
|
+
for target, request in target_request:
|
|
118
|
+
call = iris.cls("Ens.CallStructure")._New()
|
|
119
|
+
call.TargetDispatchName = target
|
|
120
|
+
call.Request = dispatch_serializer(request)
|
|
121
|
+
call_list.append(call)
|
|
122
|
+
# call the dispatchSendMultiRequestSync method
|
|
123
|
+
response_list = self.iris_handle.dispatchSendRequestSyncMultiple(call_list, timeout)
|
|
124
|
+
# create a list of tuple (target, request, response, status)
|
|
125
|
+
result = []
|
|
126
|
+
for i in range(len(target_request)):
|
|
127
|
+
result.append(
|
|
128
|
+
(target_request[i][0],
|
|
129
|
+
target_request[i][1],
|
|
130
|
+
dispatch_deserializer(response_list[i].Response),
|
|
131
|
+
response_list[i].ResponseCode
|
|
132
|
+
))
|
|
133
|
+
return result
|
|
134
|
+
|
|
135
|
+
@staticmethod
|
|
136
|
+
def OnGetConnections() -> Optional[List[str]]:
|
|
137
|
+
"""The OnGetConnections() method returns all of the targets of any SendRequestSync or SendRequestAsync
|
|
138
|
+
calls for the class. Implement this method to allow connections between components to show up in
|
|
139
|
+
the interoperability UI.
|
|
140
|
+
|
|
141
|
+
Returns:
|
|
142
|
+
An IRISList containing all targets for this class. Default is None.
|
|
143
|
+
"""
|
|
144
|
+
return None
|
|
145
|
+
|
|
146
|
+
def SendRequestSync(self, target: str, request: Union[Message, Any],
|
|
147
|
+
timeout: int = -1, description: Optional[str] = None) -> Any:
|
|
148
|
+
"""DEPRECATED: use send_request_sync.
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
target: The target of the request
|
|
152
|
+
request: The request to send
|
|
153
|
+
timeout: The timeout in seconds, -1 means wait forever
|
|
154
|
+
description: A string that describes the request
|
|
155
|
+
|
|
156
|
+
Returns:
|
|
157
|
+
The response from the target component
|
|
158
|
+
"""
|
|
159
|
+
return self.send_request_sync(target, request, timeout, description)
|
|
160
|
+
|
|
161
|
+
def SendRequestAsync(self, target: str, request: Union[Message, Any],
|
|
162
|
+
description: Optional[str] = None) -> None:
|
|
163
|
+
"""DEPRECATED: use send_request_async.
|
|
164
|
+
|
|
165
|
+
Args:
|
|
166
|
+
target: The target of the request
|
|
167
|
+
request: The request to send
|
|
168
|
+
description: A string that describes the request
|
|
169
|
+
"""
|
|
170
|
+
return self.send_request_async(target, request, description)
|
|
171
|
+
|
|
172
|
+
@staticmethod
|
|
173
|
+
def getAdapterType() -> Optional[str]:
|
|
174
|
+
"""DEPRECATED: use get_adapter_type.
|
|
175
|
+
|
|
176
|
+
Returns:
|
|
177
|
+
Name of the registered Adapter
|
|
178
|
+
"""
|
|
179
|
+
return
|
|
180
|
+
|
|
181
|
+
@staticmethod
|
|
182
|
+
def get_adapter_type() -> Optional[str]:
|
|
183
|
+
"""Returns the name of the registered Adapter.
|
|
184
|
+
|
|
185
|
+
Returns:
|
|
186
|
+
Name of the registered Adapter
|
|
187
|
+
"""
|
|
188
|
+
return
|
|
189
|
+
|
|
190
|
+
def on_get_connections(self) -> List[str]:
|
|
191
|
+
"""The OnGetConnections() method returns all of the targets of any SendRequestSync or SendRequestAsync
|
|
192
|
+
calls for the class. Implement this method to allow connections between components to show up in
|
|
193
|
+
the interoperability UI.
|
|
194
|
+
|
|
195
|
+
Returns:
|
|
196
|
+
A list containing all targets for this class.
|
|
197
|
+
"""
|
|
198
|
+
## Parse the class code to find all invocations of send_request_sync and send_request_async
|
|
199
|
+
## and return the targets
|
|
200
|
+
targer_list = []
|
|
201
|
+
# get the source code of the class
|
|
202
|
+
source = getsource(self.__class__)
|
|
203
|
+
# find all invocations of send_request_sync and send_request_async
|
|
204
|
+
for method in ['send_request_sync', 'send_request_async', 'SendRequestSync', 'SendRequestAsync']:
|
|
205
|
+
i = source.find(method)
|
|
206
|
+
while i != -1:
|
|
207
|
+
j = source.find("(", i)
|
|
208
|
+
if j != -1:
|
|
209
|
+
k = source.find(",", j)
|
|
210
|
+
if k != -1:
|
|
211
|
+
target = source[j+1:k]
|
|
212
|
+
if target.find("=") != -1:
|
|
213
|
+
# it's a keyword argument, remove the keyword
|
|
214
|
+
target = target[target.find("=")+1:].strip()
|
|
215
|
+
if target not in targer_list:
|
|
216
|
+
targer_list.append(target)
|
|
217
|
+
i = source.find(method, i+1)
|
|
218
|
+
|
|
219
|
+
for target in targer_list:
|
|
220
|
+
# if target is a string, remove the quotes
|
|
221
|
+
if target[0] == "'" and target[-1] == "'":
|
|
222
|
+
targer_list[targer_list.index(target)] = target[1:-1]
|
|
223
|
+
elif target[0] == '"' and target[-1] == '"':
|
|
224
|
+
targer_list[targer_list.index(target)] = target[1:-1]
|
|
225
|
+
# if target is a variable, try to find the value of the variable
|
|
226
|
+
else:
|
|
227
|
+
self.on_init()
|
|
228
|
+
try:
|
|
229
|
+
if target.find("self.") != -1:
|
|
230
|
+
# it's a class variable
|
|
231
|
+
targer_list[targer_list.index(target)] = getattr(self, target[target.find(".")+1:])
|
|
232
|
+
elif target.find(".") != -1:
|
|
233
|
+
# it's a class variable
|
|
234
|
+
targer_list[targer_list.index(target)] = getattr(getattr(self, target[:target.find(".")]), target[target.find(".")+1:])
|
|
235
|
+
else:
|
|
236
|
+
targer_list[targer_list.index(target)] = getattr(self, target)
|
|
237
|
+
except Exception as e:
|
|
238
|
+
pass
|
|
239
|
+
|
|
240
|
+
return targer_list
|
{iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_business_operation.py
RENAMED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import importlib
|
|
2
2
|
from typing import Any, List, Optional, Union, Tuple
|
|
3
3
|
from iop._business_host import _BusinessHost
|
|
4
|
+
from iop._decorators import input_deserializer, output_serializer, input_serializer, output_deserializer
|
|
5
|
+
from iop._dispatch import create_dispatch, dispach_message
|
|
4
6
|
|
|
5
7
|
class _BusinessOperation(_BusinessHost):
|
|
6
8
|
"""Business operation component that handles outbound communication.
|
|
@@ -45,15 +47,15 @@ class _BusinessOperation(_BusinessHost):
|
|
|
45
47
|
|
|
46
48
|
def _dispatch_on_init(self, host_object: Any) -> None:
|
|
47
49
|
"""For internal use only."""
|
|
48
|
-
self
|
|
50
|
+
create_dispatch(self)
|
|
49
51
|
self.on_init()
|
|
50
52
|
return
|
|
51
53
|
|
|
52
|
-
@
|
|
53
|
-
@
|
|
54
|
+
@input_deserializer
|
|
55
|
+
@output_serializer
|
|
54
56
|
def _dispatch_on_message(self, request: Any) -> Any:
|
|
55
57
|
"""For internal use only."""
|
|
56
|
-
return self
|
|
58
|
+
return dispach_message(self,request)
|
|
57
59
|
|
|
58
60
|
def OnMessage(self, request: Any) -> Any:
|
|
59
61
|
"""DEPRECATED : use on_message
|
{iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_business_process.py
RENAMED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
from typing import Any, List, Optional, Union
|
|
2
2
|
from iop._business_host import _BusinessHost
|
|
3
|
+
from iop._decorators import input_deserializer, input_serializer_param, output_serializer, input_serializer, output_deserializer
|
|
4
|
+
from iop._dispatch import create_dispatch, dispach_message
|
|
3
5
|
|
|
4
6
|
class _BusinessProcess(_BusinessHost):
|
|
5
7
|
"""Business process component that contains routing and transformation logic.
|
|
@@ -60,7 +62,7 @@ class _BusinessProcess(_BusinessHost):
|
|
|
60
62
|
"""
|
|
61
63
|
return self.OnComplete(request, response)
|
|
62
64
|
|
|
63
|
-
@
|
|
65
|
+
@input_serializer_param(0,'response')
|
|
64
66
|
def reply(self, response: Any) -> None:
|
|
65
67
|
"""Send the specified response to the production component that sent the initial request.
|
|
66
68
|
|
|
@@ -69,7 +71,7 @@ class _BusinessProcess(_BusinessHost):
|
|
|
69
71
|
"""
|
|
70
72
|
return self.iris_handle.dispatchReply(response)
|
|
71
73
|
|
|
72
|
-
@
|
|
74
|
+
@input_serializer_param(1,'request')
|
|
73
75
|
def send_request_async(self, target: str, request: Any, response_required: bool=True, completion_key: Optional[str]=None, description: Optional[str]=None) -> None:
|
|
74
76
|
"""Send the specified message to the target business process or business operation asynchronously.
|
|
75
77
|
|
|
@@ -139,7 +141,7 @@ class _BusinessProcess(_BusinessHost):
|
|
|
139
141
|
def _dispatch_on_init(self, host_object: Any) -> None:
|
|
140
142
|
"""For internal use only."""
|
|
141
143
|
self._restore_persistent_properties(host_object)
|
|
142
|
-
self
|
|
144
|
+
create_dispatch(self)
|
|
143
145
|
self.on_init()
|
|
144
146
|
self._save_persistent_properties(host_object)
|
|
145
147
|
return
|
|
@@ -151,17 +153,17 @@ class _BusinessProcess(_BusinessHost):
|
|
|
151
153
|
self._save_persistent_properties(host_object)
|
|
152
154
|
return
|
|
153
155
|
|
|
154
|
-
@
|
|
155
|
-
@
|
|
156
|
+
@input_deserializer
|
|
157
|
+
@output_serializer
|
|
156
158
|
def _dispatch_on_request(self, host_object: Any, request: Any) -> Any:
|
|
157
159
|
"""For internal use only."""
|
|
158
160
|
self._restore_persistent_properties(host_object)
|
|
159
|
-
return_object = self
|
|
161
|
+
return_object = dispach_message(self,request)
|
|
160
162
|
self._save_persistent_properties(host_object)
|
|
161
163
|
return return_object
|
|
162
164
|
|
|
163
|
-
@
|
|
164
|
-
@
|
|
165
|
+
@input_deserializer
|
|
166
|
+
@output_serializer
|
|
165
167
|
def _dispatch_on_response(self, host_object: Any, request: Any, response: Any, call_request: Any, call_response: Any, completion_key: str) -> Any:
|
|
166
168
|
"""For internal use only."""
|
|
167
169
|
self._restore_persistent_properties(host_object)
|
|
@@ -169,8 +171,8 @@ class _BusinessProcess(_BusinessHost):
|
|
|
169
171
|
self._save_persistent_properties(host_object)
|
|
170
172
|
return return_object
|
|
171
173
|
|
|
172
|
-
@
|
|
173
|
-
@
|
|
174
|
+
@input_deserializer
|
|
175
|
+
@output_serializer
|
|
174
176
|
def _dispatch_on_complete(self, host_object: Any, request: Any, response: Any) -> Any:
|
|
175
177
|
"""For internal use only."""
|
|
176
178
|
self._restore_persistent_properties(host_object)
|
{iris_pex_embedded_python-3.2.1b3 → iris_pex_embedded_python-3.3.0b2}/src/iop/_business_service.py
RENAMED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import importlib
|
|
2
2
|
from iop._business_host import _BusinessHost
|
|
3
|
+
from iop._decorators import input_deserializer, output_serializer, input_serializer, output_deserializer
|
|
3
4
|
|
|
4
5
|
class _BusinessService(_BusinessHost):
|
|
5
6
|
""" This class is responsible for receiving the data from external system and sending it to business processes or business operations in the production.
|
|
@@ -36,8 +37,8 @@ class _BusinessService(_BusinessHost):
|
|
|
36
37
|
self.Adapter = self.adapter = handle_partner
|
|
37
38
|
return
|
|
38
39
|
|
|
39
|
-
@
|
|
40
|
-
@
|
|
40
|
+
@input_deserializer
|
|
41
|
+
@output_serializer
|
|
41
42
|
def _dispatch_on_process_input(self, request):
|
|
42
43
|
""" For internal use only. """
|
|
43
44
|
return self.on_process_input(request)
|
|
@@ -7,6 +7,8 @@ from typing import Any, ClassVar, Dict, List, Optional, Tuple, Type
|
|
|
7
7
|
from iop._log_manager import LogManager
|
|
8
8
|
import logging
|
|
9
9
|
|
|
10
|
+
from iop._message_validator import is_iris_object_instance, is_message_instance, is_pickle_message_instance
|
|
11
|
+
|
|
10
12
|
class _Common(metaclass=abc.ABCMeta):
|
|
11
13
|
"""Base class that defines common methods for all component types.
|
|
12
14
|
|
|
@@ -19,100 +21,34 @@ class _Common(metaclass=abc.ABCMeta):
|
|
|
19
21
|
iris_handle: Any = None
|
|
20
22
|
log_to_console: bool = False
|
|
21
23
|
|
|
24
|
+
# Lifecycle methods
|
|
22
25
|
def on_init(self) -> None:
|
|
23
|
-
"""Initialize component when started.
|
|
24
|
-
|
|
25
|
-
Called when component starts. Use to initialize required structures.
|
|
26
|
-
"""
|
|
27
|
-
return self.OnInit()
|
|
26
|
+
"""Initialize component when started."""
|
|
27
|
+
pass
|
|
28
28
|
|
|
29
29
|
def on_tear_down(self) -> None:
|
|
30
|
-
"""Clean up component before termination.
|
|
31
|
-
|
|
32
|
-
Called before component terminates. Use to free resources.
|
|
33
|
-
"""
|
|
34
|
-
return self.OnTearDown()
|
|
30
|
+
"""Clean up component before termination."""
|
|
31
|
+
pass
|
|
35
32
|
|
|
36
33
|
def on_connected(self) -> None:
|
|
37
|
-
"""Handle component connection/reconnection.
|
|
38
|
-
|
|
39
|
-
Called when component connects or reconnects after disconnection.
|
|
40
|
-
Use to initialize connection-dependent structures.
|
|
41
|
-
"""
|
|
42
|
-
return self.OnConnected()
|
|
34
|
+
"""Handle component connection/reconnection."""
|
|
35
|
+
pass
|
|
43
36
|
|
|
37
|
+
# Internal dispatch methods
|
|
44
38
|
def _dispatch_on_connected(self, host_object: Any) -> None:
|
|
45
|
-
"""Internal dispatch for connection handling."""
|
|
46
39
|
self.on_connected()
|
|
47
|
-
return
|
|
48
40
|
|
|
49
41
|
def _dispatch_on_init(self, host_object: Any) -> None:
|
|
50
|
-
"""Internal dispatch for initialization."""
|
|
51
42
|
self.on_init()
|
|
52
|
-
return
|
|
53
43
|
|
|
54
44
|
def _dispatch_on_tear_down(self, host_object: Any) -> None:
|
|
55
|
-
"""Internal dispatch for teardown."""
|
|
56
45
|
self.on_tear_down()
|
|
57
|
-
return
|
|
58
46
|
|
|
59
47
|
def _set_iris_handles(self, handle_current: Any, handle_partner: Any) -> None:
|
|
60
48
|
"""Internal method to set IRIS handles."""
|
|
61
49
|
pass
|
|
62
50
|
|
|
63
|
-
|
|
64
|
-
def _is_message_instance(cls, obj: Any) -> bool:
|
|
65
|
-
"""Check if object is a valid Message instance.
|
|
66
|
-
|
|
67
|
-
Args:
|
|
68
|
-
obj: Object to check
|
|
69
|
-
|
|
70
|
-
Returns:
|
|
71
|
-
True if object is a Message instance
|
|
72
|
-
|
|
73
|
-
Raises:
|
|
74
|
-
TypeError: If object is Message class but not a dataclass
|
|
75
|
-
"""
|
|
76
|
-
if cls._is_message_class(type(obj)):
|
|
77
|
-
if not dataclasses.is_dataclass(obj):
|
|
78
|
-
raise TypeError(f"{type(obj).__module__}.{type(obj).__qualname__} must be a dataclass")
|
|
79
|
-
return True
|
|
80
|
-
return False
|
|
81
|
-
|
|
82
|
-
@classmethod
|
|
83
|
-
def _is_pickle_message_instance(cls, obj: Any) -> bool:
|
|
84
|
-
"""Check if object is a PickleMessage instance."""
|
|
85
|
-
if cls._is_pickel_message_class(type(obj)):
|
|
86
|
-
return True
|
|
87
|
-
return False
|
|
88
|
-
|
|
89
|
-
@classmethod
|
|
90
|
-
def _is_iris_object_instance(cls, obj: Any) -> bool:
|
|
91
|
-
"""Check if object is an IRIS persistent object."""
|
|
92
|
-
if (obj is not None and type(obj).__module__.find('iris') == 0) and obj._IsA("%Persistent"):
|
|
93
|
-
return True
|
|
94
|
-
return False
|
|
95
|
-
|
|
96
|
-
@classmethod
|
|
97
|
-
def _is_message_class(cls, klass: Type) -> bool:
|
|
98
|
-
name = klass.__module__ + '.' + klass.__qualname__
|
|
99
|
-
if name == "iop.Message" or name == "grongier.pex.Message":
|
|
100
|
-
return True
|
|
101
|
-
for c in klass.__bases__:
|
|
102
|
-
if cls._is_message_class(c):
|
|
103
|
-
return True
|
|
104
|
-
return False
|
|
105
|
-
|
|
106
|
-
@classmethod
|
|
107
|
-
def _is_pickel_message_class(cls, klass: Type) -> bool:
|
|
108
|
-
name = klass.__module__ + '.' + klass.__qualname__
|
|
109
|
-
if name == "iop.PickleMessage" or name == "grongier.pex.PickleMessage":
|
|
110
|
-
return True
|
|
111
|
-
for c in klass.__bases__:
|
|
112
|
-
if cls._is_pickel_message_class(c):
|
|
113
|
-
return True
|
|
114
|
-
return False
|
|
115
|
-
|
|
51
|
+
# Component information methods
|
|
116
52
|
@classmethod
|
|
117
53
|
def _get_info(cls) -> List[str]:
|
|
118
54
|
"""Get component configuration information.
|
|
@@ -239,6 +175,7 @@ class _Common(metaclass=abc.ABCMeta):
|
|
|
239
175
|
pass
|
|
240
176
|
return ret
|
|
241
177
|
|
|
178
|
+
# Logging methods
|
|
242
179
|
def _log(self) -> Tuple[str, Optional[str]]:
|
|
243
180
|
"""Get class and method name for logging.
|
|
244
181
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
from functools import wraps
|
|
2
|
+
from typing import Any, Callable
|
|
3
|
+
from iop._dispatch import dispatch_deserializer, dispatch_serializer
|
|
4
|
+
|
|
5
|
+
def input_serializer(fonction: Callable) -> Callable:
|
|
6
|
+
"""Decorator that serializes all input arguments."""
|
|
7
|
+
def _dispatch_serializer(self, *params: Any, **param2: Any) -> Any:
|
|
8
|
+
serialized = [dispatch_serializer(param) for param in params]
|
|
9
|
+
param2 = {key: dispatch_serializer(value) for key, value in param2.items()}
|
|
10
|
+
return fonction(self, *serialized, **param2)
|
|
11
|
+
return _dispatch_serializer
|
|
12
|
+
|
|
13
|
+
def input_serializer_param(position: int, name: str) -> Callable:
|
|
14
|
+
"""Decorator that serializes specific parameter by position or name."""
|
|
15
|
+
def _input_serializer_param(fonction: Callable) -> Callable:
|
|
16
|
+
@wraps(fonction)
|
|
17
|
+
def _dispatch_serializer(self, *params: Any, **param2: Any) -> Any:
|
|
18
|
+
serialized = [
|
|
19
|
+
dispatch_serializer(param) if i == position else param
|
|
20
|
+
for i, param in enumerate(params)
|
|
21
|
+
]
|
|
22
|
+
param2 = {
|
|
23
|
+
key: dispatch_serializer(value) if key == name else value
|
|
24
|
+
for key, value in param2.items()
|
|
25
|
+
}
|
|
26
|
+
return fonction(self, *serialized, **param2)
|
|
27
|
+
return _dispatch_serializer
|
|
28
|
+
return _input_serializer_param
|
|
29
|
+
|
|
30
|
+
def output_deserializer(fonction: Callable) -> Callable:
|
|
31
|
+
"""Decorator that deserializes function output."""
|
|
32
|
+
def _dispatch_deserializer(self, *params: Any, **param2: Any) -> Any:
|
|
33
|
+
return dispatch_deserializer(fonction(self, *params, **param2))
|
|
34
|
+
return _dispatch_deserializer
|
|
35
|
+
|
|
36
|
+
def input_deserializer(fonction: Callable) -> Callable:
|
|
37
|
+
"""Decorator that deserializes all input arguments."""
|
|
38
|
+
def _dispatch_deserializer(self, *params: Any, **param2: Any) -> Any:
|
|
39
|
+
serialized = [dispatch_deserializer(param) for param in params]
|
|
40
|
+
param2 = {key: dispatch_deserializer(value) for key, value in param2.items()}
|
|
41
|
+
return fonction(self, *serialized, **param2)
|
|
42
|
+
return _dispatch_deserializer
|
|
43
|
+
|
|
44
|
+
def output_serializer(fonction: Callable) -> Callable:
|
|
45
|
+
"""Decorator that serializes function output."""
|
|
46
|
+
def _dispatch_serializer(self, *params: Any, **param2: Any) -> Any:
|
|
47
|
+
return dispatch_serializer(fonction(self, *params, **param2))
|
|
48
|
+
return _dispatch_serializer
|
|
@@ -7,6 +7,7 @@ import signal
|
|
|
7
7
|
from dataclasses import dataclass
|
|
8
8
|
|
|
9
9
|
from iop._business_host import _BusinessHost
|
|
10
|
+
from iop._dispatch import dispatch_deserializer, dispatch_serializer
|
|
10
11
|
from iop._utils import _Utils
|
|
11
12
|
|
|
12
13
|
class _Director():
|
|
@@ -278,10 +279,10 @@ class _Director():
|
|
|
278
279
|
message.json = _Utils.string_to_stream("{}")
|
|
279
280
|
# serialize the message
|
|
280
281
|
business_host = _BusinessHost()
|
|
281
|
-
serial_message =
|
|
282
|
+
serial_message = dispatch_serializer(message)
|
|
282
283
|
response = iris.cls('IOP.Utils').dispatchTestComponent(target,serial_message)
|
|
283
284
|
try:
|
|
284
|
-
deserialized_response =
|
|
285
|
+
deserialized_response = dispatch_deserializer(response)
|
|
285
286
|
except ImportError as e:
|
|
286
287
|
# can't import the class, return the string
|
|
287
288
|
deserialized_response = f'{response.classname} : {_Utils.stream_to_string(response.jstr)}'
|