ominfra 0.0.0.dev388__py3-none-any.whl → 0.0.0.dev389__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/scripts/manage.py CHANGED
@@ -10899,15 +10899,15 @@ def _remote_execution_main() -> None:
10899
10899
 
10900
10900
 
10901
10901
  ########################################
10902
- # ../../../omlish/subprocesses/async_.py
10902
+ # ../../../omlish/subprocesses/asyncs.py
10903
10903
 
10904
10904
 
10905
10905
  ##
10906
10906
 
10907
10907
 
10908
- class _AbstractAsyncSubprocesses(BaseSubprocesses):
10908
+ class AbstractAsyncSubprocesses(BaseSubprocesses):
10909
10909
  @abc.abstractmethod
10910
- async def run_(self, run: SubprocessRun) -> SubprocessRunOutput:
10910
+ def run_(self, run: SubprocessRun) -> ta.Awaitable[SubprocessRunOutput]:
10911
10911
  raise NotImplementedError
10912
10912
 
10913
10913
  def run(
@@ -10930,31 +10930,41 @@ class _AbstractAsyncSubprocesses(BaseSubprocesses):
10930
10930
 
10931
10931
  #
10932
10932
 
10933
- @abc.abstractmethod
10934
10933
  async def check_call(
10935
10934
  self,
10936
10935
  *cmd: str,
10937
10936
  stdout: ta.Any = sys.stderr,
10938
10937
  **kwargs: ta.Any,
10939
10938
  ) -> None:
10940
- raise NotImplementedError
10939
+ await self.run(
10940
+ *cmd,
10941
+ stdout=stdout,
10942
+ check=True,
10943
+ **kwargs,
10944
+ )
10941
10945
 
10942
- @abc.abstractmethod
10943
10946
  async def check_output(
10944
10947
  self,
10945
10948
  *cmd: str,
10949
+ stdout: ta.Any = subprocess.PIPE,
10946
10950
  **kwargs: ta.Any,
10947
10951
  ) -> bytes:
10948
- raise NotImplementedError
10949
-
10950
- #
10952
+ return check.not_none((await self.run(
10953
+ *cmd,
10954
+ stdout=stdout,
10955
+ check=True,
10956
+ **kwargs,
10957
+ )).stdout)
10951
10958
 
10952
10959
  async def check_output_str(
10953
10960
  self,
10954
10961
  *cmd: str,
10955
10962
  **kwargs: ta.Any,
10956
10963
  ) -> str:
10957
- return (await self.check_output(*cmd, **kwargs)).decode().strip()
10964
+ return (await self.check_output(
10965
+ *cmd,
10966
+ **kwargs,
10967
+ )).decode().strip()
10958
10968
 
10959
10969
  #
10960
10970
 
@@ -10989,10 +10999,6 @@ class _AbstractAsyncSubprocesses(BaseSubprocesses):
10989
10999
  return ret.decode().strip()
10990
11000
 
10991
11001
 
10992
- class AbstractAsyncSubprocesses(_AbstractAsyncSubprocesses, abc.ABC):
10993
- pass
10994
-
10995
-
10996
11002
  ########################################
10997
11003
  # ../../../omlish/subprocesses/sync.py
10998
11004
  """
@@ -11113,6 +11119,8 @@ class Subprocesses(AbstractSubprocesses):
11113
11119
  stderr=proc.stderr, # noqa
11114
11120
  )
11115
11121
 
11122
+ #
11123
+
11116
11124
  def check_call(
11117
11125
  self,
11118
11126
  *cmd: str,
@@ -11504,25 +11512,6 @@ class AsyncioSubprocesses(AbstractAsyncSubprocesses):
11504
11512
  stderr=stderr,
11505
11513
  )
11506
11514
 
11507
- #
11508
-
11509
- async def check_call(
11510
- self,
11511
- *cmd: str,
11512
- stdout: ta.Any = sys.stderr,
11513
- **kwargs: ta.Any,
11514
- ) -> None:
11515
- with self.prepare_and_wrap(*cmd, stdout=stdout, check=True, **kwargs) as (cmd, kwargs): # noqa
11516
- await self.run(*cmd, **kwargs)
11517
-
11518
- async def check_output(
11519
- self,
11520
- *cmd: str,
11521
- **kwargs: ta.Any,
11522
- ) -> bytes:
11523
- with self.prepare_and_wrap(*cmd, stdout=subprocess.PIPE, check=True, **kwargs) as (cmd, kwargs): # noqa
11524
- return check.not_none((await self.run(*cmd, **kwargs)).stdout)
11525
-
11526
11515
 
11527
11516
  asyncio_subprocesses = AsyncioSubprocesses()
11528
11517
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ominfra
3
- Version: 0.0.0.dev388
3
+ Version: 0.0.0.dev389
4
4
  Summary: ominfra
5
5
  Author: wrmsr
6
6
  License-Expression: BSD-3-Clause
@@ -14,8 +14,8 @@ Classifier: Programming Language :: Python :: 3.13
14
14
  Requires-Python: >=3.13
15
15
  Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
- Requires-Dist: omdev==0.0.0.dev388
18
- Requires-Dist: omlish==0.0.0.dev388
17
+ Requires-Dist: omdev==0.0.0.dev389
18
+ Requires-Dist: omlish==0.0.0.dev389
19
19
  Provides-Extra: all
20
20
  Requires-Dist: paramiko~=4.0; extra == "all"
21
21
  Requires-Dist: asyncssh~=2.21; extra == "all"
@@ -113,7 +113,7 @@ ominfra/manage/targets/inject.py,sha256=3M4wBkxtvymq_yhiotHlTN8iydELMjVCndyp9Bq-
113
113
  ominfra/manage/targets/targets.py,sha256=WmasYmL6xfAI7F0XvDhScFdBVxkqPkmo_gRgABmmkGA,1891
114
114
  ominfra/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
115
115
  ominfra/scripts/journald2aws.py,sha256=WOyM_3Em7F_DKB7PaGYD3hUD1L3dnvpZXNJjmNUb4xc,173849
116
- ominfra/scripts/manage.py,sha256=NXKWVsWSLC5aW1o14-jDXx7B33f-PFLpKOEAD_dUXHU,397014
116
+ ominfra/scripts/manage.py,sha256=hpJkJMNA2N4fl_oXALVAUorTfwrBnR4wglLiDF_PBNI,396575
117
117
  ominfra/scripts/supervisor.py,sha256=1x2J9JmRSa6uQsIHRYK3fXp_nOR-NS7akuV55__Pf-U,306331
118
118
  ominfra/supervisor/LICENSE.txt,sha256=ZrHY15PVR98y26Yg6iQfa-SXnUaYTDhrUsPVcEO5OKM,1874
119
119
  ominfra/supervisor/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
@@ -156,9 +156,9 @@ ominfra/tailscale/api.py,sha256=XASv9C_CWI-u-yX5jVzhJrkJhlwQRkYQWQQG1uJwAd8,1375
156
156
  ominfra/tailscale/cli.py,sha256=zRV7-tKB7kBah1oTVZlol-vwx1FBlnfzYAPGkeU5jX4,3543
157
157
  ominfra/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
158
158
  ominfra/tools/listresources.py,sha256=auGP1LlbBJSFKUWNvQo_UzA8IsBNZBTMwEkFFRJ4FX4,6185
159
- ominfra-0.0.0.dev388.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
160
- ominfra-0.0.0.dev388.dist-info/METADATA,sha256=5LXSv_exxH5bWPDBlHJWZ7jfkjC7e2GvxYVRhUF0-W4,2377
161
- ominfra-0.0.0.dev388.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
162
- ominfra-0.0.0.dev388.dist-info/entry_points.txt,sha256=kgecQ2MgGrM9qK744BoKS3tMesaC3yjLnl9pa5CRczg,37
163
- ominfra-0.0.0.dev388.dist-info/top_level.txt,sha256=E-b2OHkk_AOBLXHYZQ2EOFKl-_6uOGd8EjeG-Zy6h_w,8
164
- ominfra-0.0.0.dev388.dist-info/RECORD,,
159
+ ominfra-0.0.0.dev389.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
160
+ ominfra-0.0.0.dev389.dist-info/METADATA,sha256=FWz7eyDOAotC4A1MzZJI3osDUn2-8a223ymUoXBHfA8,2377
161
+ ominfra-0.0.0.dev389.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
162
+ ominfra-0.0.0.dev389.dist-info/entry_points.txt,sha256=kgecQ2MgGrM9qK744BoKS3tMesaC3yjLnl9pa5CRczg,37
163
+ ominfra-0.0.0.dev389.dist-info/top_level.txt,sha256=E-b2OHkk_AOBLXHYZQ2EOFKl-_6uOGd8EjeG-Zy6h_w,8
164
+ ominfra-0.0.0.dev389.dist-info/RECORD,,