ominfra 0.0.0.dev208__py3-none-any.whl → 0.0.0.dev210__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
ominfra/manage/main.py CHANGED
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env python3
2
1
  # @omlish-amalg ../scripts/manage.py
3
2
  # ruff: noqa: UP006 UP007
4
3
  """
ominfra/scripts/manage.py CHANGED
@@ -4970,11 +4970,26 @@ class ArgparseCli:
4970
4970
 
4971
4971
  #
4972
4972
 
4973
- async def async_cli_run(self) -> ta.Optional[int]:
4973
+ async def async_cli_run(
4974
+ self,
4975
+ *,
4976
+ force_async: bool = False,
4977
+ ) -> ta.Optional[int]:
4974
4978
  if (fn := self.prepare_cli_run()) is None:
4975
4979
  return 0
4976
4980
 
4977
- return await fn()
4981
+ if force_async:
4982
+ is_async = True
4983
+ else:
4984
+ tfn = fn
4985
+ if isinstance(tfn, ArgparseCmd):
4986
+ tfn = tfn.fn
4987
+ is_async = inspect.iscoroutinefunction(tfn)
4988
+
4989
+ if is_async:
4990
+ return await fn()
4991
+ else:
4992
+ return fn()
4978
4993
 
4979
4994
 
4980
4995
  ########################################
@@ -10580,7 +10595,8 @@ class SystemInterpProvider(InterpProvider):
10580
10595
  async def get_exe_version(self, exe: str) -> ta.Optional[InterpVersion]:
10581
10596
  if not self._options.inspect:
10582
10597
  s = os.path.basename(exe)
10583
- s = s.removeprefix('python')
10598
+ if s.startswith('python'): # noqa
10599
+ s = s[len('python'):]
10584
10600
  if '.' in s:
10585
10601
  try:
10586
10602
  return InterpVersion.parse(s)
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env python3
2
1
  # ruff: noqa: UP006 UP007
3
2
  # @omlish-amalg ../scripts/supervisor.py
4
3
  #
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: ominfra
3
- Version: 0.0.0.dev208
3
+ Version: 0.0.0.dev210
4
4
  Summary: ominfra
5
5
  Author: wrmsr
6
6
  License: BSD-3-Clause
@@ -12,9 +12,8 @@ Classifier: Operating System :: OS Independent
12
12
  Classifier: Operating System :: POSIX
13
13
  Requires-Python: >=3.12
14
14
  License-File: LICENSE
15
- Requires-Dist: omdev==0.0.0.dev208
16
- Requires-Dist: omlish==0.0.0.dev208
17
- Requires-Dist: omserv==0.0.0.dev208
15
+ Requires-Dist: omdev==0.0.0.dev210
16
+ Requires-Dist: omlish==0.0.0.dev210
18
17
  Provides-Extra: all
19
18
  Requires-Dist: paramiko~=3.5; extra == "all"
20
19
  Requires-Dist: asyncssh~=2.18; extra == "all"
@@ -1,5 +1,5 @@
1
1
  ominfra/.manifests.json,sha256=8KREXxMAlsilZOktXPYru1ND3V5hFI22vnrp6hT3bio,589
2
- ominfra/__about__.py,sha256=_gUs3H7uunGy5IfGw3mq4dFJWaF1mecSPruJPyjbs7Y,741
2
+ ominfra/__about__.py,sha256=6i1AoruFYQCd-PyhhbDQDWY2d1tiQu9nkwWr-fXAqfY,705
3
3
  ominfra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  ominfra/pyremote.py,sha256=qjY3Bj0GhuYznQ3bhqXmU9zyIVZkhD9Wv76QUG34ZME,15198
5
5
  ominfra/systemd.py,sha256=d61NVrJoItzSaqhMDgKGrQjbrxEVAujUMDsj8WggXos,1022
@@ -21,19 +21,19 @@ ominfra/clouds/aws/journald2aws/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxk
21
21
  ominfra/clouds/aws/journald2aws/__main__.py,sha256=d23loR_cKfTYZwYiqpt_CmKI7dd5WcYFgIYzqMep75E,68
22
22
  ominfra/clouds/aws/journald2aws/cursor.py,sha256=tQ7O6BHlEdaalbiI_Rqagj0aHfdtTQ_ZJwdOSRUjNvQ,1173
23
23
  ominfra/clouds/aws/journald2aws/driver.py,sha256=b3XfSlIBWAWJLImmyh1ZK9FpdNAYNZ2YZeCv_Q9GckM,6111
24
- ominfra/clouds/aws/journald2aws/main.py,sha256=4qWnw33cTPUW1CU4_9ojkn0wRStANrQzSI_cXpyuOf8,2202
24
+ ominfra/clouds/aws/journald2aws/main.py,sha256=sqs_IoLzadv0EJoWHnYdgg3bkDDSFshCvyRWByTm8Sg,2179
25
25
  ominfra/clouds/aws/journald2aws/poster.py,sha256=hz1XuctW8GtLmfjhRvCFY6py52D4BzXHYny5XKFpHSA,2833
26
26
  ominfra/clouds/aws/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
- ominfra/clouds/aws/models/base.py,sha256=s2ffsIGOhRMhMY7awmordfrjWjvZGf5yeJJadt-tjEA,3287
27
+ ominfra/clouds/aws/models/base.py,sha256=0VtlcRo4kbjdIOqikTe_cegViBHqb-DoqJSw_8eQZC4,3777
28
28
  ominfra/clouds/aws/models/gen/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
29
  ominfra/clouds/aws/models/gen/__main__.py,sha256=Jsrv3P7LX2Cg08W7ByZfZ1JQT4lgLDPW1qNAmShFuMk,75
30
30
  ominfra/clouds/aws/models/gen/cli.py,sha256=-tsjPPqUvXVqD40grn1Of-2-YF53dvCfISrIRI2AX4s,3869
31
- ominfra/clouds/aws/models/gen/gen.py,sha256=Z0bKHNbmVqcMdrtUjCWR9Dp5qBtfzP9mgEqcA7uw0ao,14010
31
+ ominfra/clouds/aws/models/gen/gen.py,sha256=u4pfQCH9ir04zd3OPTeb6U3QaOuthM9FsCrJwMDCZB8,15189
32
32
  ominfra/clouds/aws/models/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
- ominfra/clouds/aws/models/services/ec2.py,sha256=wx1MlOyJSbYNwIWmmklex3JYbvY_teQZ_IfG-xwpztI,236248
34
- ominfra/clouds/aws/models/services/lambda_.py,sha256=FHxUTZownw_yGfFijPUKM9Ff0_oRNJGNVeSxgIdaCa0,23262
35
- ominfra/clouds/aws/models/services/rds.py,sha256=FNhaSR6rq3Xzlz16Aqp7e_HfejRrpxsnSJzH-tpUiuA,52509
36
- ominfra/clouds/aws/models/services/s3.py,sha256=KRKEeRS6cNmOIJm_J3YW5MohhpvLtMhxtD_5di0nfc4,45186
33
+ ominfra/clouds/aws/models/services/ec2.py,sha256=TsJqFvX271BsBhCx18xg0bb-iXHoksZKT24lauZAchA,262063
34
+ ominfra/clouds/aws/models/services/lambda_.py,sha256=LeAw6TmUwMLjB5VEYH1khWSmlSe6o_YhYjo7l2DXLFY,25766
35
+ ominfra/clouds/aws/models/services/rds.py,sha256=T_V0qrdu3sUIfvk9coNu8OQLaP4BwDxyYaLp3xaeWEM,59730
36
+ ominfra/clouds/aws/models/services/s3.py,sha256=g-3x1it0fk26psjDheInG-p308_ytTdOGMO-3SAlVV4,49431
37
37
  ominfra/clouds/aws/models/services/services.toml,sha256=njiWEctmUUrfzZh-aboCNP9BpYBpxGFAVaGvgtv3pMo,866
38
38
  ominfra/clouds/gcp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
39
39
  ominfra/clouds/gcp/auth.py,sha256=rDIiOH5gP3OSIaMC5Lp8yAD4zWuLDEYlFu37mDx5YDA,1360
@@ -51,7 +51,7 @@ ominfra/manage/bootstrap.py,sha256=1RIRhVkUZjxZcZerHMg8U6xgWhhemGgPN5cDye8dQ68,4
51
51
  ominfra/manage/bootstrap_.py,sha256=B9UfR9J7mS3J54PFaSe1MQS5lCnKgxt5dDRJ9mnHYwg,656
52
52
  ominfra/manage/config.py,sha256=1y2N_8nXHBZc6YbW6BaRZoDDCTBmiHuWtTOQ7zdr5VE,184
53
53
  ominfra/manage/inject.py,sha256=_FVaMZUBKi-oObv14H77luWYCodxNJJD1t4pNQzckFE,2030
54
- ominfra/manage/main.py,sha256=1-PIAWnmd9XIy8pVcWGsME9xNTSj_t0sWWQTq9GYIzc,4403
54
+ ominfra/manage/main.py,sha256=eZ2YpXlFaDxV_O5oNRKJ_6r5kS6GsQ0bQJflhxAIXDw,4380
55
55
  ominfra/manage/marshal.py,sha256=WKj7IU9bo4fBMSSzT6ZMm_WFalXIJZ-V7j8oi92fNhk,305
56
56
  ominfra/manage/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
57
57
  ominfra/manage/commands/base.py,sha256=LtaI0AgnplttQK7gNncNItq8yuTZQimJTaprVpZktI8,3993
@@ -112,7 +112,7 @@ ominfra/manage/targets/inject.py,sha256=P4597xWM-V3I_gCt2O71OLhYQkkXtuJvkYRsIbhh
112
112
  ominfra/manage/targets/targets.py,sha256=7GP6UAZyJFEhpkJN6UQdpr_WN3p7C76v-s445y-WB6U,1885
113
113
  ominfra/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
114
114
  ominfra/scripts/journald2aws.py,sha256=Bo_24qN3YI_72BcZYBHid9_SJWnCAmbKRJ3-wE6dGMU,166250
115
- ominfra/scripts/manage.py,sha256=QlG02s1uAJ4sFTRuR50HpinKp-B7-P0yAEHxikRonA0,357276
115
+ ominfra/scripts/manage.py,sha256=im_mk71R0LwN2yi8BUnejFjwH9KGxEV3JgLvq41SXNY,357674
116
116
  ominfra/scripts/supervisor.py,sha256=6OQnZfnHfXT-hHsGQA_OhA_BjOs01vzInkmEZWYhiVY,291847
117
117
  ominfra/supervisor/LICENSE.txt,sha256=ZrHY15PVR98y26Yg6iQfa-SXnUaYTDhrUsPVcEO5OKM,1874
118
118
  ominfra/supervisor/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
@@ -127,7 +127,7 @@ ominfra/supervisor/groupsimpl.py,sha256=PCDyc_Wc-pnvIj56_aEyiA5exCpK6n9iErqnJzO2
127
127
  ominfra/supervisor/http.py,sha256=Tl5eT6dyf4KuQXKbhGo1B6CFEzUDtPl_DZAuUFVD9zI,3453
128
128
  ominfra/supervisor/inject.py,sha256=IeR-WKvK1sGNxMe6G2OBT5kSP7EUP5ipkDgcUFmDPCA,4838
129
129
  ominfra/supervisor/io.py,sha256=moaGNaPuYXEAUzLg8Qjo05DEIcOUNYUj8SSr8eT0d24,3198
130
- ominfra/supervisor/main.py,sha256=--oFVmoCfJuyenet4u5x2pCv9rXbYuVxuUT5tnUQOPw,4404
130
+ ominfra/supervisor/main.py,sha256=zCVuHZG2kGIPHwTLH4EUr5xpN4vJYessmKO2P0NE5RU,4381
131
131
  ominfra/supervisor/pipes.py,sha256=2ZihNTnRNjnIPOtPbm3_pyqO15f7BNs7WnNtO5V8ahM,2231
132
132
  ominfra/supervisor/privileges.py,sha256=kaRTHI7XjqzxEWCeHp3_0J0Vc4gSPugRbXEwxuw6MYE,2054
133
133
  ominfra/supervisor/process.py,sha256=UaubVxsxVqDnbuWVpTH0DTGbJGLO0vGJ9mNcvy2kCXM,217
@@ -155,9 +155,9 @@ ominfra/tailscale/api.py,sha256=C5-t_b6jZXUWcy5k8bXm7CFnk73pSdrlMOgGDeGVrpw,1370
155
155
  ominfra/tailscale/cli.py,sha256=3FnJbgpLw6gInTfhERd1mDy9ijjMUGxkdYVo43Tnxx4,3555
156
156
  ominfra/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
157
157
  ominfra/tools/listresources.py,sha256=4qVg5txsb10EHhvqXXeM6gJ2jx9LbroEnPydDv1uXs0,6176
158
- ominfra-0.0.0.dev208.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
159
- ominfra-0.0.0.dev208.dist-info/METADATA,sha256=IflJBH_kEotpmWrQv_WumlZPvsFfMaTQpVFCXRV99zQ,767
160
- ominfra-0.0.0.dev208.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
161
- ominfra-0.0.0.dev208.dist-info/entry_points.txt,sha256=kgecQ2MgGrM9qK744BoKS3tMesaC3yjLnl9pa5CRczg,37
162
- ominfra-0.0.0.dev208.dist-info/top_level.txt,sha256=E-b2OHkk_AOBLXHYZQ2EOFKl-_6uOGd8EjeG-Zy6h_w,8
163
- ominfra-0.0.0.dev208.dist-info/RECORD,,
158
+ ominfra-0.0.0.dev210.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
159
+ ominfra-0.0.0.dev210.dist-info/METADATA,sha256=JCnayAtU1v9TA67Xl_LDihmc5j9FknNziWtRPwRN2vw,731
160
+ ominfra-0.0.0.dev210.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
161
+ ominfra-0.0.0.dev210.dist-info/entry_points.txt,sha256=kgecQ2MgGrM9qK744BoKS3tMesaC3yjLnl9pa5CRczg,37
162
+ ominfra-0.0.0.dev210.dist-info/top_level.txt,sha256=E-b2OHkk_AOBLXHYZQ2EOFKl-_6uOGd8EjeG-Zy6h_w,8
163
+ ominfra-0.0.0.dev210.dist-info/RECORD,,