iris-pex-embedded-python 4.0.0b1__tar.gz → 4.0.0b3__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.
Files changed (99) hide show
  1. {iris_pex_embedded_python-4.0.0b1/src/iris_pex_embedded_python.egg-info → iris_pex_embedded_python-4.0.0b3}/PKG-INFO +1 -1
  2. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/pyproject.toml +1 -1
  3. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/components/business_operation.py +15 -7
  4. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/components/business_service.py +49 -18
  5. iris_pex_embedded_python-4.0.0b3/src/iop/components/polling_business_service.py +28 -0
  6. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/messages/serialization.py +13 -4
  7. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/runtime/director.py +15 -5
  8. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3/src/iris_pex_embedded_python.egg-info}/PKG-INFO +1 -1
  9. iris_pex_embedded_python-4.0.0b1/src/iop/components/polling_business_service.py +0 -6
  10. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/LICENSE +0 -0
  11. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/README.md +0 -0
  12. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/setup.cfg +0 -0
  13. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/__init__.py +0 -0
  14. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/__main__.py +0 -0
  15. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cli/__init__.py +0 -0
  16. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cli/formatting.py +0 -0
  17. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cli/main.py +0 -0
  18. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cli/parser.py +0 -0
  19. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cli/types.py +0 -0
  20. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/BusinessOperation.cls +0 -0
  21. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/BusinessProcess.cls +0 -0
  22. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/BusinessService.cls +0 -0
  23. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Common.cls +0 -0
  24. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Director.cls +0 -0
  25. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Duplex/Operation.cls +0 -0
  26. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Duplex/Process.cls +0 -0
  27. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Duplex/Service.cls +0 -0
  28. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Generator/Message/Ack.cls +0 -0
  29. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Generator/Message/Poll.cls +0 -0
  30. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Generator/Message/Start.cls +0 -0
  31. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Generator/Message/StartPickle.cls +0 -0
  32. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Generator/Message/Stop.cls +0 -0
  33. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/InboundAdapter.cls +0 -0
  34. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Message/JSONSchema.cls +0 -0
  35. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Message.cls +0 -0
  36. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/OutboundAdapter.cls +0 -0
  37. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/PickleMessage.cls +0 -0
  38. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/PrivateSession/Duplex.cls +0 -0
  39. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/PrivateSession/Message/Ack.cls +0 -0
  40. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/PrivateSession/Message/Poll.cls +0 -0
  41. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/PrivateSession/Message/Start.cls +0 -0
  42. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/PrivateSession/Message/Stop.cls +0 -0
  43. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Projection.cls +0 -0
  44. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Service/Remote/Handler.cls +0 -0
  45. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Service/Remote/Rest/v1.cls +0 -0
  46. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Test.cls +0 -0
  47. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Utils.cls +0 -0
  48. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/cls/IOP/Wrapper.cls +0 -0
  49. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/components/__init__.py +0 -0
  50. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/components/async_request.py +0 -0
  51. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/components/business_host.py +0 -0
  52. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/components/business_process.py +0 -0
  53. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/components/common.py +0 -0
  54. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/components/debugpy.py +0 -0
  55. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/components/generator_request.py +0 -0
  56. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/components/inbound_adapter.py +0 -0
  57. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/components/log_manager.py +0 -0
  58. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/components/outbound_adapter.py +0 -0
  59. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/components/private_session_duplex.py +0 -0
  60. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/components/private_session_process.py +0 -0
  61. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/components/settings.py +0 -0
  62. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/messages/__init__.py +0 -0
  63. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/messages/base.py +0 -0
  64. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/messages/decorators.py +0 -0
  65. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/messages/dispatch.py +0 -0
  66. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/messages/persistent.py +0 -0
  67. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/messages/validation.py +0 -0
  68. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/migration/__init__.py +0 -0
  69. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/migration/io.py +0 -0
  70. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/migration/plans.py +0 -0
  71. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/migration/utils.py +0 -0
  72. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/production/__init__.py +0 -0
  73. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/production/actions.py +0 -0
  74. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/production/common.py +0 -0
  75. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/production/component.py +0 -0
  76. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/production/diff.py +0 -0
  77. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/production/import_.py +0 -0
  78. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/production/inspection.py +0 -0
  79. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/production/model.py +0 -0
  80. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/production/reconstruction.py +0 -0
  81. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/production/rendering.py +0 -0
  82. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/production/runtime.py +0 -0
  83. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/production/types.py +0 -0
  84. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/runtime/__init__.py +0 -0
  85. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/runtime/environment.py +0 -0
  86. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/runtime/iris.py +0 -0
  87. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/runtime/local.py +0 -0
  88. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/runtime/protocol.py +0 -0
  89. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/runtime/remote/__init__.py +0 -0
  90. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/runtime/remote/client.py +0 -0
  91. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/runtime/remote/director.py +0 -0
  92. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/runtime/remote/migration.py +0 -0
  93. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/runtime/remote/settings.py +0 -0
  94. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iop/runtime/remote/setup.py +0 -0
  95. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iris_pex_embedded_python.egg-info/SOURCES.txt +0 -0
  96. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iris_pex_embedded_python.egg-info/dependency_links.txt +0 -0
  97. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iris_pex_embedded_python.egg-info/entry_points.txt +0 -0
  98. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iris_pex_embedded_python.egg-info/requires.txt +0 -0
  99. {iris_pex_embedded_python-4.0.0b1 → iris_pex_embedded_python-4.0.0b3}/src/iris_pex_embedded_python.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iris_pex_embedded_python
3
- Version: 4.0.0b1
3
+ Version: 4.0.0b3
4
4
  Summary: Iris Interoperability based on Embedded Python
5
5
  Author-email: grongier <guillaume.rongier@intersystems.com>
6
6
  License: MIT License
@@ -3,7 +3,7 @@ requires = ["setuptools", "wheel"]
3
3
 
4
4
  [project]
5
5
  name = "iris_pex_embedded_python"
6
- version = "4.0.0b1"
6
+ version = "4.0.0b3"
7
7
  description = "Iris Interoperability based on Embedded Python"
8
8
  readme = "README.md"
9
9
  requires-python = ">=3.10"
@@ -1,5 +1,6 @@
1
- import importlib
2
- from typing import Any
1
+ import importlib
2
+ import warnings
3
+ from typing import Any
3
4
 
4
5
  from ..messages.decorators import input_deserializer, output_serializer
5
6
  from ..messages.dispatch import create_dispatch, dispatch_message
@@ -17,8 +18,8 @@ class _BusinessOperation(_BusinessHost):
17
18
  Adapter: Any = None
18
19
  adapter: Any = None
19
20
 
20
- def on_message(self, request: Any) -> Any:
21
- """Handle incoming messages.
21
+ def on_message(self, request: Any) -> Any:
22
+ """Handle incoming messages.
22
23
 
23
24
  Process messages received from other production components and either
24
25
  send to external system or forward to another component.
@@ -26,9 +27,16 @@ class _BusinessOperation(_BusinessHost):
26
27
  Args:
27
28
  request: The incoming message
28
29
 
29
- Returns:
30
- Response message
31
- """
30
+ Returns:
31
+ Response message
32
+ """
33
+ warnings.warn(
34
+ f"{self.__class__.__name__} did not override on_message(); "
35
+ "the incoming operation message was ignored. "
36
+ "This default no-op handler will raise NotImplementedError in v5.0.",
37
+ RuntimeWarning,
38
+ stacklevel=2,
39
+ )
32
40
  return None
33
41
 
34
42
  def on_keepalive(self) -> None:
@@ -1,10 +1,25 @@
1
- import importlib
2
-
3
- from ..messages.decorators import input_deserializer, output_serializer
4
- from .business_host import _BusinessHost
5
-
6
-
7
- class _BusinessService(_BusinessHost):
1
+ import importlib
2
+ import warnings
3
+ from inspect import signature
4
+
5
+ from ..messages.decorators import input_deserializer, output_serializer
6
+ from .business_host import _BusinessHost
7
+
8
+
9
+ def _accepts_process_input_argument(method) -> bool:
10
+ try:
11
+ return len(signature(method).parameters) > 0
12
+ except (TypeError, ValueError):
13
+ return True
14
+
15
+
16
+ def _call_process_input(method, request):
17
+ if _accepts_process_input_argument(method):
18
+ return method(request)
19
+ return method()
20
+
21
+
22
+ class _BusinessService(_BusinessHost):
8
23
  """This class is responsible for receiving the data from external system and sending it to business processes or business operations in the production.
9
24
  The business service can use an adapter to access the external system, which is specified in the InboundAdapter property.
10
25
  There are three ways of implementing a business service:
@@ -25,16 +40,32 @@ class _BusinessService(_BusinessHost):
25
40
 
26
41
  return
27
42
 
28
- def on_process_input(self, message_input):
29
- """Receives the message from the inbond adapter via the PRocessInput method and is responsible for forwarding it to target business processes or operations.
30
- If the business service does not specify an adapter, then the default adapter calls this method with no message
31
- and the business service is responsible for receiving the data from the external system and validating it.
32
-
33
- Parameters:
34
- message_input: an instance of IRISObject or subclass of Message containing the data that the inbound adapter passes in.
35
- The message can have any structure agreed upon by the inbound adapter and the business service.
36
- """
43
+ def on_message(self, request=None):
44
+ """Handle a message received by the business service.
45
+
46
+ Override this for message-driven services. Adapter-driven services may
47
+ still override on_process_input() directly when they need the lower
48
+ level IRIS ProcessInput hook.
49
+ """
50
+ warnings.warn(
51
+ f"{self.__class__.__name__} did not override on_message() or "
52
+ "on_process_input(); the incoming service message was ignored. "
53
+ "This default no-op handler will raise NotImplementedError in v5.0.",
54
+ RuntimeWarning,
55
+ stacklevel=2,
56
+ )
37
57
  return None
58
+
59
+ def on_process_input(self, message_input=None):
60
+ """Receives the message from the inbond adapter via the PRocessInput method and is responsible for forwarding it to target business processes or operations.
61
+ If the business service does not specify an adapter, then the default adapter calls this method with no message
62
+ and the business service is responsible for receiving the data from the external system and validating it.
63
+
64
+ Parameters:
65
+ message_input: an instance of IRISObject or subclass of Message containing the data that the inbound adapter passes in.
66
+ The message can have any structure agreed upon by the inbound adapter and the business service.
67
+ """
68
+ return self.on_message(message_input)
38
69
 
39
70
  def _set_iris_handles(self, handle_current, handle_partner):
40
71
  """For internal use only."""
@@ -47,7 +78,7 @@ class _BusinessService(_BusinessHost):
47
78
  return
48
79
 
49
80
  @input_deserializer
50
- @output_serializer
81
+ @output_serializer
51
82
  def _dispatch_on_process_input(self, request):
52
83
  """For internal use only."""
53
- return self.on_process_input(request)
84
+ return _call_process_input(self.on_process_input, request)
@@ -0,0 +1,28 @@
1
+ import warnings
2
+
3
+
4
+ class _PollingBusinessServiceMixin:
5
+ """Mixin for services polled by the default IRIS inbound adapter."""
6
+
7
+ @staticmethod
8
+ def get_adapter_type() -> str:
9
+ return "Ens.InboundAdapter"
10
+
11
+ def on_poll(self):
12
+ """Run one scheduled polling cycle.
13
+
14
+ Override this for services that are called by the default IRIS inbound
15
+ adapter and fetch their own external data.
16
+ """
17
+ warnings.warn(
18
+ f"{self.__class__.__name__} did not override on_poll() or "
19
+ "on_process_input(); the scheduled poll was ignored. "
20
+ "This default no-op handler will raise NotImplementedError in v5.0.",
21
+ RuntimeWarning,
22
+ stacklevel=2,
23
+ )
24
+ return None
25
+
26
+ def on_process_input(self, message_input=None):
27
+ """Compatibility hook called by IRIS ProcessInput."""
28
+ return self.on_poll()
@@ -22,6 +22,12 @@ class SerializationError(Exception):
22
22
  pass
23
23
 
24
24
 
25
+ class MessageClassImportError(SerializationError, ImportError):
26
+ """Raised when a JSON message's Python class cannot be imported."""
27
+
28
+ pass
29
+
30
+
25
31
  class TempPydanticModel(BaseModel):
26
32
  model_config = {"arbitrary_types_allowed": True, "extra": "allow"}
27
33
 
@@ -93,8 +99,8 @@ class MessageSerializer:
93
99
  )
94
100
  module = importlib.import_module(module_name)
95
101
  msg_class = getattr(module, class_name)
96
- except Exception as e:
97
- raise SerializationError(
102
+ except (ModuleNotFoundError, AttributeError, ValueError) as e:
103
+ raise MessageClassImportError(
98
104
  f"Failed to load class {serial.classname}: {str(e)}"
99
105
  ) from e
100
106
 
@@ -130,9 +136,12 @@ class MessageSerializer:
130
136
 
131
137
  @staticmethod
132
138
  def _parse_classname(classname: str) -> tuple[str, str]:
133
- j = classname.rindex(".")
139
+ try:
140
+ j = classname.rindex(".")
141
+ except ValueError as e:
142
+ raise ValueError(f"Classname must include a module: {classname}") from e
134
143
  if j <= 0:
135
- raise SerializationError(f"Classname must include a module: {classname}")
144
+ raise ValueError(f"Classname must include a module: {classname}")
136
145
  return classname[:j], classname[j + 1 :]
137
146
 
138
147
  @staticmethod
@@ -9,6 +9,7 @@ from dataclasses import dataclass
9
9
  from functools import wraps
10
10
 
11
11
  from ..messages.dispatch import dispatch_deserializer, dispatch_serializer
12
+ from ..messages.serialization import MessageClassImportError
12
13
  from ..migration import utils as _migration_utils
13
14
  from ..runtime import iris as _iris
14
15
 
@@ -327,11 +328,20 @@ def test_component(target, message=None, classname=None, body=None):
327
328
  response = iris.cls("IOP.Utils").dispatchTestComponent(target, serial_message)
328
329
  try:
329
330
  deserialized_response = dispatch_deserializer(response)
330
- except ImportError:
331
- # can't import the class, return the string
332
- deserialized_response = (
333
- f"{response.classname} : {_migration_utils.stream_to_string(response.jstr)}"
334
- )
331
+ except MessageClassImportError:
332
+ if response._IsA("IOP.Message"):
333
+ body = (
334
+ _migration_utils.stream_to_string(response.json)
335
+ if response.type == "Stream"
336
+ else response.json
337
+ )
338
+ deserialized_response = {
339
+ "classname": response.classname,
340
+ "body": body,
341
+ "truncated": False,
342
+ }
343
+ else:
344
+ raise
335
345
  return deserialized_response
336
346
 
337
347
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iris_pex_embedded_python
3
- Version: 4.0.0b1
3
+ Version: 4.0.0b3
4
4
  Summary: Iris Interoperability based on Embedded Python
5
5
  Author-email: grongier <guillaume.rongier@intersystems.com>
6
6
  License: MIT License
@@ -1,6 +0,0 @@
1
- class _PollingBusinessServiceMixin:
2
- """Mixin for services polled by the default IRIS inbound adapter."""
3
-
4
- @staticmethod
5
- def get_adapter_type() -> str:
6
- return "Ens.InboundAdapter"