iris-pex-embedded-python 3.4.0b1__py3-none-any.whl → 3.4.0b2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of iris-pex-embedded-python might be problematic. Click here for more details.
- grongier/pex/__init__.py +1 -1
- iop/__init__.py +2 -3
- iop/_message.py +23 -1
- iop/_message_validator.py +7 -7
- iop/_serialization.py +4 -0
- {iris_pex_embedded_python-3.4.0b1.dist-info → iris_pex_embedded_python-3.4.0b2.dist-info}/METADATA +1 -1
- {iris_pex_embedded_python-3.4.0b1.dist-info → iris_pex_embedded_python-3.4.0b2.dist-info}/RECORD +11 -13
- iop/_pickle_message.py +0 -6
- iop/_pydantic_message.py +0 -9
- {iris_pex_embedded_python-3.4.0b1.dist-info → iris_pex_embedded_python-3.4.0b2.dist-info}/LICENSE +0 -0
- {iris_pex_embedded_python-3.4.0b1.dist-info → iris_pex_embedded_python-3.4.0b2.dist-info}/WHEEL +0 -0
- {iris_pex_embedded_python-3.4.0b1.dist-info → iris_pex_embedded_python-3.4.0b2.dist-info}/entry_points.txt +0 -0
- {iris_pex_embedded_python-3.4.0b1.dist-info → iris_pex_embedded_python-3.4.0b2.dist-info}/top_level.txt +0 -0
grongier/pex/__init__.py
CHANGED
|
@@ -6,7 +6,7 @@ from iop._business_operation import _BusinessOperation
|
|
|
6
6
|
from iop._inbound_adapter import _InboundAdapter
|
|
7
7
|
from iop._outbound_adapter import _OutboundAdapter
|
|
8
8
|
from iop._message import _Message
|
|
9
|
-
from iop.
|
|
9
|
+
from iop._message import _PickleMessage
|
|
10
10
|
from iop._director import _Director
|
|
11
11
|
from iop._utils import _Utils
|
|
12
12
|
|
iop/__init__.py
CHANGED
|
@@ -3,10 +3,8 @@ from iop._business_process import _BusinessProcess
|
|
|
3
3
|
from iop._business_service import _BusinessService
|
|
4
4
|
from iop._director import _Director
|
|
5
5
|
from iop._inbound_adapter import _InboundAdapter
|
|
6
|
-
from iop._message import _Message
|
|
7
|
-
from iop._pydantic_message import _PydanticMessage
|
|
6
|
+
from iop._message import _Message, _PickleMessage, _PydanticMessage, _PydanticPickleMessage
|
|
8
7
|
from iop._outbound_adapter import _OutboundAdapter
|
|
9
|
-
from iop._pickle_message import _PickleMessage
|
|
10
8
|
from iop._private_session_duplex import _PrivateSessionDuplex
|
|
11
9
|
from iop._private_session_process import _PrivateSessionProcess
|
|
12
10
|
from iop._utils import _Utils
|
|
@@ -23,4 +21,5 @@ class DuplexProcess(_PrivateSessionProcess): pass
|
|
|
23
21
|
class Message(_Message): pass
|
|
24
22
|
class PickleMessage(_PickleMessage): pass
|
|
25
23
|
class PydanticMessage(_PydanticMessage): pass
|
|
24
|
+
class PydanticPickleMessage(_PydanticPickleMessage): pass
|
|
26
25
|
class Director(_Director): pass
|
iop/_message.py
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
from pydantic import BaseModel
|
|
3
|
+
|
|
1
4
|
class _Message:
|
|
2
5
|
""" The abstract class that is the superclass for persistent messages sent from one component to another.
|
|
3
6
|
This class has no properties or methods. Users subclass Message and add properties.
|
|
4
7
|
The IOP framework provides the persistence to objects derived from the Message class.
|
|
5
8
|
"""
|
|
6
|
-
pass
|
|
9
|
+
pass
|
|
10
|
+
|
|
11
|
+
class _PickleMessage:
|
|
12
|
+
""" The abstract class that is the superclass for persistent messages sent from one component to another.
|
|
13
|
+
This class has no properties or methods. Users subclass Message and add properties.
|
|
14
|
+
The IOP framework provides the persistence to objects derived from the Message class.
|
|
15
|
+
"""
|
|
16
|
+
pass
|
|
17
|
+
|
|
18
|
+
class _PydanticMessage(BaseModel):
|
|
19
|
+
"""Base class for Pydantic-based messages that can be serialized to IRIS."""
|
|
20
|
+
|
|
21
|
+
def __init__(self, **data: Any):
|
|
22
|
+
super().__init__(**data)
|
|
23
|
+
|
|
24
|
+
class _PydanticPickleMessage(BaseModel):
|
|
25
|
+
"""Base class for Pydantic-based messages that can be serialized to IRIS."""
|
|
26
|
+
|
|
27
|
+
def __init__(self, **data: Any):
|
|
28
|
+
super().__init__(**data)
|
iop/_message_validator.py
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import dataclasses
|
|
2
2
|
from typing import Any, Type
|
|
3
|
-
from
|
|
4
|
-
from iop._message import _Message
|
|
3
|
+
from iop._message import _Message, _PickleMessage, _PydanticPickleMessage, BaseModel
|
|
5
4
|
|
|
6
5
|
|
|
7
6
|
def is_message_instance(obj: Any) -> bool:
|
|
@@ -17,6 +16,8 @@ def is_message_instance(obj: Any) -> bool:
|
|
|
17
16
|
|
|
18
17
|
def is_pickle_message_instance(obj: Any) -> bool:
|
|
19
18
|
"""Check if object is a PickleMessage instance."""
|
|
19
|
+
if isinstance(obj, _PydanticPickleMessage):
|
|
20
|
+
return True
|
|
20
21
|
if is_pickle_message_class(type(obj)):
|
|
21
22
|
return True
|
|
22
23
|
return False
|
|
@@ -31,8 +32,6 @@ def is_iris_object_instance(obj: Any) -> bool:
|
|
|
31
32
|
|
|
32
33
|
def is_message_class(klass: Type) -> bool:
|
|
33
34
|
"""Check if class is a Message type."""
|
|
34
|
-
if issubclass(klass, BaseModel):
|
|
35
|
-
return True
|
|
36
35
|
if issubclass(klass, _Message):
|
|
37
36
|
return True
|
|
38
37
|
return False
|
|
@@ -41,7 +40,8 @@ def is_message_class(klass: Type) -> bool:
|
|
|
41
40
|
|
|
42
41
|
def is_pickle_message_class(klass: Type) -> bool:
|
|
43
42
|
"""Check if class is a PickleMessage type."""
|
|
44
|
-
|
|
45
|
-
if name in ("iop.PickleMessage", "grongier.pex.PickleMessage"):
|
|
43
|
+
if issubclass(klass, _PickleMessage):
|
|
46
44
|
return True
|
|
47
|
-
|
|
45
|
+
if issubclass(klass, _PydanticPickleMessage):
|
|
46
|
+
return True
|
|
47
|
+
return False
|
iop/_serialization.py
CHANGED
|
@@ -14,6 +14,7 @@ from typing import Any, Dict, Type, Optional
|
|
|
14
14
|
from dacite import Config, from_dict
|
|
15
15
|
import iris
|
|
16
16
|
|
|
17
|
+
from iop._message import _PydanticPickleMessage
|
|
17
18
|
from iop._utils import _Utils
|
|
18
19
|
from pydantic import BaseModel
|
|
19
20
|
|
|
@@ -137,6 +138,9 @@ class MessageSerializer:
|
|
|
137
138
|
@staticmethod
|
|
138
139
|
def serialize(message: Any, use_pickle: bool = False) -> iris.cls:
|
|
139
140
|
"""Serializes a message to IRIS format."""
|
|
141
|
+
# Check for PydanticPickleMessage first
|
|
142
|
+
if isinstance(message, _PydanticPickleMessage):
|
|
143
|
+
return MessageSerializer._serialize_pickle(message)
|
|
140
144
|
if isinstance(message, BaseModel):
|
|
141
145
|
return (MessageSerializer._serialize_pickle(message)
|
|
142
146
|
if use_pickle else MessageSerializer._serialize_json(message))
|
{iris_pex_embedded_python-3.4.0b1.dist-info → iris_pex_embedded_python-3.4.0b2.dist-info}/RECORD
RENAMED
|
@@ -19,7 +19,7 @@ grongier/cls/Grongier/PEX/PrivateSession/Message/Poll.cls,sha256=pcUgHgxX1pMH-wQ
|
|
|
19
19
|
grongier/cls/Grongier/PEX/PrivateSession/Message/Start.cls,sha256=T3jNoR8RjKr1InQ6SgqBYTgFwpSB0Q60WholjbvForg,433
|
|
20
20
|
grongier/cls/Grongier/PEX/PrivateSession/Message/Stop.cls,sha256=zy30ZXXN4XcovPij-kOF3PuH1SkP1EUvlEJQRx2S9RU,431
|
|
21
21
|
grongier/cls/Grongier/Service/WSGI.cls,sha256=7u2SsFmnsubMfdazvaDchKCM3yesPRMfKBzMIkwQ9xc,77
|
|
22
|
-
grongier/pex/__init__.py,sha256=
|
|
22
|
+
grongier/pex/__init__.py,sha256=CPLDFa4dusvGX9VZYTUk-M0Xa_yR4e4Gqku1rIT75qo,1060
|
|
23
23
|
grongier/pex/__main__.py,sha256=pQzVtkDhAeI6dpNRC632dVk2SGZZIEDwDufdgZe8VWs,98
|
|
24
24
|
grongier/pex/_business_host.py,sha256=dlV8CWJad8Pr2TNfD9OjcVKaq5gEYQACZla1FK6-bDM,44
|
|
25
25
|
grongier/pex/_cli.py,sha256=hOHz3n-aHtULuhdCkqZ_SSb3sv7M6j2WhRxgCTvgR9I,64
|
|
@@ -90,7 +90,7 @@ intersystems_iris/pex/_InboundAdapter.py,sha256=gZlWl7afumamkj8pNbpLyKFSzhaTAiAX
|
|
|
90
90
|
intersystems_iris/pex/_Message.py,sha256=Ugaa_lsEYke__pI5kdC7phAuyPQ7rxXUcROJL4cUxVQ,320
|
|
91
91
|
intersystems_iris/pex/_OutboundAdapter.py,sha256=ao2Ubbta2DcrQGdzDUD_j1Zsk8bvUfcZNKTZkzPTNBU,1628
|
|
92
92
|
intersystems_iris/pex/__init__.py,sha256=l_I1dpnluWawbFrGMDC0GLHpuHwjbpd-nho8otFX6TE,1379
|
|
93
|
-
iop/__init__.py,sha256
|
|
93
|
+
iop/__init__.py,sha256=1C589HojSVK0yJf1KuTPA39ZjrOYO0QFLv45rqbZpA4,1183
|
|
94
94
|
iop/__main__.py,sha256=pQzVtkDhAeI6dpNRC632dVk2SGZZIEDwDufdgZe8VWs,98
|
|
95
95
|
iop/_async_request.py,sha256=btDFNFaO-Yvl6wvgXrCYNWoQb2RtbzEvTJsk7j03b30,2170
|
|
96
96
|
iop/_business_host.py,sha256=wI2LlVTVjEqE8GWE9nSz1WHvqTduAuJQTk7Ky7qkz4U,9658
|
|
@@ -104,14 +104,12 @@ iop/_director.py,sha256=DrswFoqJ6IG62hkW-0ZffTtZdxw6KNozlZSIq3O6d-o,11629
|
|
|
104
104
|
iop/_dispatch.py,sha256=q9oCE4b5FazW1t2oczvBGQtKzip_-yykY9WvXUp1urE,6775
|
|
105
105
|
iop/_inbound_adapter.py,sha256=PS5ToqhrYcXq9ZdLbCBqAfVp8kCeRACm_KF66pwBO9U,1652
|
|
106
106
|
iop/_log_manager.py,sha256=PZnGWsi-zvWo-bumQO5BK-8kHG2XW-WnZ6ShL7QeZ4c,3499
|
|
107
|
-
iop/_message.py,sha256=
|
|
108
|
-
iop/_message_validator.py,sha256=
|
|
107
|
+
iop/_message.py,sha256=pJQOjRIdw4wSDoJamvItGODMe-UjDU71XihgWdtCAqc,1120
|
|
108
|
+
iop/_message_validator.py,sha256=K6FxLe72gBHQXZTLVrFw87rABGM0F6CTaNtZ2MqJoss,1408
|
|
109
109
|
iop/_outbound_adapter.py,sha256=YTAhLrRf9chEAd53mV6KKbpaHOKNOKJHoGgj5wakRR0,726
|
|
110
|
-
iop/_pickle_message.py,sha256=noKfc2VkXufV3fqjKvNHN_oANQ1YN9ffCaSV0XSTAIE,331
|
|
111
110
|
iop/_private_session_duplex.py,sha256=mzlFABh-ly51X1uSWw9YwQbktfMvuNdp2ALlRvlDow4,5152
|
|
112
111
|
iop/_private_session_process.py,sha256=todprfYFSDr-h-BMvWL_IGC6wbQqkMy3mPHWEWCUSE0,1686
|
|
113
|
-
iop/
|
|
114
|
-
iop/_serialization.py,sha256=UVc1sV-oAwWSmVJw3GWe1aYERKocMv2gpXhHgARRlxI,8707
|
|
112
|
+
iop/_serialization.py,sha256=hGpFYHWjYRcDuQv4Ml9N16onW8vmHGhDwA3bv_NwFnM,8923
|
|
115
113
|
iop/_utils.py,sha256=Aqtp9Jx3ghzkNs4f2cOZXYwv8cGsjmdBocnkP64fa3M,19574
|
|
116
114
|
iop/cls/IOP/BusinessOperation.cls,sha256=lrymqZ8wHl5kJjXwdjbQVs5sScV__yIWGh-oGbiB_X0,914
|
|
117
115
|
iop/cls/IOP/BusinessProcess.cls,sha256=s3t38w1ykHqM26ETcbCYLt0ocjZyVVahm-_USZkuJ1E,2855
|
|
@@ -137,9 +135,9 @@ iop/cls/IOP/Service/WSGI.cls,sha256=VLNCXEwmHW9dBnE51uGE1nvGX6T4HjhqePT3LVhsjAE,
|
|
|
137
135
|
iop/wsgi/handlers.py,sha256=NrFLo_YbAh-x_PlWhAiWkQnUUN2Ss9HoEm63dDWCBpQ,2947
|
|
138
136
|
irisnative/_IRISNative.py,sha256=HQ4nBhc8t8_5OtxdMG-kx1aa-T1znf2I8obZOPLOPzg,665
|
|
139
137
|
irisnative/__init__.py,sha256=6YmvBLQSURsCPKaNg7LK-xpo4ipDjrlhKuwdfdNb3Kg,341
|
|
140
|
-
iris_pex_embedded_python-3.4.
|
|
141
|
-
iris_pex_embedded_python-3.4.
|
|
142
|
-
iris_pex_embedded_python-3.4.
|
|
143
|
-
iris_pex_embedded_python-3.4.
|
|
144
|
-
iris_pex_embedded_python-3.4.
|
|
145
|
-
iris_pex_embedded_python-3.4.
|
|
138
|
+
iris_pex_embedded_python-3.4.0b2.dist-info/LICENSE,sha256=rZSiBFId_sfbJ6RL0GjjPX-InNLkNS9ou7eQsikciI8,1089
|
|
139
|
+
iris_pex_embedded_python-3.4.0b2.dist-info/METADATA,sha256=wSmLx_zkXK9oTutFdot5ManhtmjC7_-eYrZLeCC4w_Q,4458
|
|
140
|
+
iris_pex_embedded_python-3.4.0b2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
141
|
+
iris_pex_embedded_python-3.4.0b2.dist-info/entry_points.txt,sha256=pj-i4LSDyiSP6xpHlVjMCbg1Pik7dC3_sdGY3Yp9Vhk,38
|
|
142
|
+
iris_pex_embedded_python-3.4.0b2.dist-info/top_level.txt,sha256=VWDlX4YF4qFVRGrG3-Gs0kgREol02i8gIpsHNbhfFPw,42
|
|
143
|
+
iris_pex_embedded_python-3.4.0b2.dist-info/RECORD,,
|
iop/_pickle_message.py
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
class _PickleMessage:
|
|
2
|
-
""" The abstract class that is the superclass for persistent messages sent from one component to another.
|
|
3
|
-
This class has no properties or methods. Users subclass Message and add properties.
|
|
4
|
-
The PEX framework provides the persistence to objects derived from the Message class.
|
|
5
|
-
"""
|
|
6
|
-
pass
|
iop/_pydantic_message.py
DELETED
{iris_pex_embedded_python-3.4.0b1.dist-info → iris_pex_embedded_python-3.4.0b2.dist-info}/LICENSE
RENAMED
|
File without changes
|
{iris_pex_embedded_python-3.4.0b1.dist-info → iris_pex_embedded_python-3.4.0b2.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|