ominfra 0.0.0.dev133__py3-none-any.whl → 0.0.0.dev135__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.
- ominfra/manage/deploy/_executor.py +9 -6
- ominfra/manage/new/__init__.py +1 -0
- ominfra/manage/new/_manage.py +1635 -0
- ominfra/manage/new/commands/__init__.py +0 -0
- ominfra/manage/new/commands/base.py +25 -0
- ominfra/manage/new/commands/subprocess.py +73 -0
- ominfra/manage/new/main.py +159 -0
- ominfra/pyremote.py +50 -12
- ominfra/scripts/journald2aws.py +9 -6
- ominfra/scripts/supervisor.py +13 -7
- {ominfra-0.0.0.dev133.dist-info → ominfra-0.0.0.dev135.dist-info}/METADATA +3 -3
- {ominfra-0.0.0.dev133.dist-info → ominfra-0.0.0.dev135.dist-info}/RECORD +16 -10
- {ominfra-0.0.0.dev133.dist-info → ominfra-0.0.0.dev135.dist-info}/LICENSE +0 -0
- {ominfra-0.0.0.dev133.dist-info → ominfra-0.0.0.dev135.dist-info}/WHEEL +0 -0
- {ominfra-0.0.0.dev133.dist-info → ominfra-0.0.0.dev135.dist-info}/entry_points.txt +0 -0
- {ominfra-0.0.0.dev133.dist-info → ominfra-0.0.0.dev135.dist-info}/top_level.txt +0 -0
@@ -734,6 +734,13 @@ class PolymorphicObjMarshaler(ObjMarshaler):
|
|
734
734
|
impls_by_ty: ta.Mapping[type, Impl]
|
735
735
|
impls_by_tag: ta.Mapping[str, Impl]
|
736
736
|
|
737
|
+
@classmethod
|
738
|
+
def of(cls, impls: ta.Iterable[Impl]) -> 'PolymorphicObjMarshaler':
|
739
|
+
return cls(
|
740
|
+
{i.ty: i for i in impls},
|
741
|
+
{i.tag: i for i in impls},
|
742
|
+
)
|
743
|
+
|
737
744
|
def marshal(self, o: ta.Any) -> ta.Any:
|
738
745
|
impl = self.impls_by_ty[type(o)]
|
739
746
|
return {impl.tag: impl.m.marshal(o)}
|
@@ -821,7 +828,7 @@ def _make_obj_marshaler(
|
|
821
828
|
) -> ObjMarshaler:
|
822
829
|
if isinstance(ty, type):
|
823
830
|
if abc.ABC in ty.__bases__:
|
824
|
-
|
831
|
+
return PolymorphicObjMarshaler.of([ # type: ignore
|
825
832
|
PolymorphicObjMarshaler.Impl(
|
826
833
|
ity,
|
827
834
|
ity.__qualname__,
|
@@ -829,11 +836,7 @@ def _make_obj_marshaler(
|
|
829
836
|
)
|
830
837
|
for ity in deep_subclasses(ty)
|
831
838
|
if abc.ABC not in ity.__bases__
|
832
|
-
]
|
833
|
-
return PolymorphicObjMarshaler(
|
834
|
-
{i.ty: i for i in impls},
|
835
|
-
{i.tag: i for i in impls},
|
836
|
-
)
|
839
|
+
])
|
837
840
|
|
838
841
|
if issubclass(ty, enum.Enum):
|
839
842
|
return EnumObjMarshaler(ty)
|
@@ -0,0 +1 @@
|
|
1
|
+
# @omlish-lite
|