iris-pex-embedded-python 3.7.1b3__py3-none-any.whl → 3.7.1b4__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.
iop/_dispatch.py CHANGED
@@ -116,13 +116,25 @@ def create_dispatch(host: Any) -> None:
116
116
  The dispatch table consists of tuples of (fully_qualified_class_name, method_name).
117
117
  Only methods that take a single typed parameter are considered as handlers.
118
118
  """
119
- if len(host.DISPATCH) > 0:
120
- return
119
+ dispatch = _declared_dispatch(host)
121
120
 
122
121
  for method_name in get_callable_methods(host):
123
122
  handler_info = get_handler_info(host, method_name)
124
- if handler_info:
125
- host.DISPATCH.append(handler_info)
123
+ if handler_info and handler_info not in dispatch:
124
+ dispatch.append(handler_info)
125
+
126
+ host.DISPATCH = dispatch
127
+
128
+
129
+ def _declared_dispatch(host: Any) -> List[Tuple[str, str]]:
130
+ if "DISPATCH" in getattr(host, "__dict__", {}):
131
+ return list(host.__dict__["DISPATCH"])
132
+
133
+ class_dispatch = host.__class__.__dict__.get("DISPATCH")
134
+ if class_dispatch is not None:
135
+ return list(class_dispatch)
136
+
137
+ return []
126
138
 
127
139
 
128
140
  def get_callable_methods(host: Any) -> List[str]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iris_pex_embedded_python
3
- Version: 3.7.1b3
3
+ Version: 3.7.1b4
4
4
  Summary: Iris Interoperability based on Embedded Python
5
5
  Author-email: grongier <guillaume.rongier@intersystems.com>
6
6
  License: MIT License
@@ -40,7 +40,7 @@ iop/_debugpy.py,sha256=0UOLkOjXkJ24GxxyEnPckafrAtfVVUDYIedmLIznYfM,6067
40
40
  iop/_decorators.py,sha256=2UFV56sfopuBqgxTTj71XgAAwoQm1ijDi_3N-GIKbu8,2337
41
41
  iop/_director.py,sha256=dN_SGyUDPH19kUt7_AR6vBrDlKUg0RRgYVkvJFjsYOM,11855
42
42
  iop/_director_protocol.py,sha256=w190gB6hxXJjiB--ll5bzeLsZkL-SK9VzYLGQ1WpUbA,2797
43
- iop/_dispatch.py,sha256=dc7cyfcIH7KLGwFL_nKWKdGKQBRS_dlrlwnBtvxZT9c,5055
43
+ iop/_dispatch.py,sha256=scCDwpfHyaUcYcXL3VSZX_vVFUz_Jl2VzVC5Q7ONURU,5416
44
44
  iop/_generator_request.py,sha256=2No4E2mjBr7bPwBljsKbWX3QxTrjgdyz683tynlg-OI,1339
45
45
  iop/_inbound_adapter.py,sha256=WErDcXzHhYNN0QanmTay34Zh_uUxlEykJ4YmevTVOyY,1654
46
46
  iop/_iris.py,sha256=Zc4IvMv3us3rrBNCba1AU8RSXvct2wZkCZVSWN84c-k,198
@@ -86,9 +86,9 @@ iop/cls/IOP/Service/WSGI.cls,sha256=VLNCXEwmHW9dBnE51uGE1nvGX6T4HjhqePT3LVhsjAE,
86
86
  iop/cls/IOP/Service/Remote/Handler.cls,sha256=JfsXse2jvoVvQfW8_rVEt2DCQJ9SVqReCcOUngOkpzE,938
87
87
  iop/cls/IOP/Service/Remote/Rest/v1.cls,sha256=DRaYNsbFmczdVltb-HMZvviy5EcjcJx7__zmnKANNm8,14429
88
88
  iop/wsgi/handlers.py,sha256=lcCZ1ixnYqdo9eNrBSsQbhS9ei2x11p9e4SHHb__zmY,2951
89
- iris_pex_embedded_python-3.7.1b3.dist-info/licenses/LICENSE,sha256=rZSiBFId_sfbJ6RL0GjjPX-InNLkNS9ou7eQsikciI8,1089
90
- iris_pex_embedded_python-3.7.1b3.dist-info/METADATA,sha256=lfqghFNKOYoFnvUzZf6_7OghyRrVuCFH6SdcAju5I8E,4310
91
- iris_pex_embedded_python-3.7.1b3.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
92
- iris_pex_embedded_python-3.7.1b3.dist-info/entry_points.txt,sha256=pj-i4LSDyiSP6xpHlVjMCbg1Pik7dC3_sdGY3Yp9Vhk,38
93
- iris_pex_embedded_python-3.7.1b3.dist-info/top_level.txt,sha256=4p0q6hCATmYIVMVi3I8hOUcJE1kwzyBeHygWv_rGvrU,13
94
- iris_pex_embedded_python-3.7.1b3.dist-info/RECORD,,
89
+ iris_pex_embedded_python-3.7.1b4.dist-info/licenses/LICENSE,sha256=rZSiBFId_sfbJ6RL0GjjPX-InNLkNS9ou7eQsikciI8,1089
90
+ iris_pex_embedded_python-3.7.1b4.dist-info/METADATA,sha256=oltFiMnUbk0TPH-LywlYB41pWOJX-A3x2ySt1kX2W_o,4310
91
+ iris_pex_embedded_python-3.7.1b4.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
92
+ iris_pex_embedded_python-3.7.1b4.dist-info/entry_points.txt,sha256=pj-i4LSDyiSP6xpHlVjMCbg1Pik7dC3_sdGY3Yp9Vhk,38
93
+ iris_pex_embedded_python-3.7.1b4.dist-info/top_level.txt,sha256=4p0q6hCATmYIVMVi3I8hOUcJE1kwzyBeHygWv_rGvrU,13
94
+ iris_pex_embedded_python-3.7.1b4.dist-info/RECORD,,