ominfra 0.0.0.dev178__py3-none-any.whl → 0.0.0.dev179__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- ominfra/manage/deploy/driver.py +7 -16
- ominfra/manage/deploy/inject.py +53 -19
- ominfra/manage/deploy/interp.py +2 -2
- ominfra/manage/deploy/venvs.py +2 -2
- ominfra/scripts/manage.py +788 -653
- ominfra/scripts/supervisor.py +31 -30
- {ominfra-0.0.0.dev178.dist-info → ominfra-0.0.0.dev179.dist-info}/METADATA +3 -3
- {ominfra-0.0.0.dev178.dist-info → ominfra-0.0.0.dev179.dist-info}/RECORD +12 -12
- {ominfra-0.0.0.dev178.dist-info → ominfra-0.0.0.dev179.dist-info}/LICENSE +0 -0
- {ominfra-0.0.0.dev178.dist-info → ominfra-0.0.0.dev179.dist-info}/WHEEL +0 -0
- {ominfra-0.0.0.dev178.dist-info → ominfra-0.0.0.dev179.dist-info}/entry_points.txt +0 -0
- {ominfra-0.0.0.dev178.dist-info → ominfra-0.0.0.dev179.dist-info}/top_level.txt +0 -0
ominfra/scripts/supervisor.py
CHANGED
@@ -4291,30 +4291,6 @@ def as_injector_bindings(*args: InjectorBindingOrBindings) -> InjectorBindings:
|
|
4291
4291
|
##
|
4292
4292
|
|
4293
4293
|
|
4294
|
-
@dc.dataclass(frozen=True)
|
4295
|
-
class OverridesInjectorBindings(InjectorBindings):
|
4296
|
-
p: InjectorBindings
|
4297
|
-
m: ta.Mapping[InjectorKey, InjectorBinding]
|
4298
|
-
|
4299
|
-
def bindings(self) -> ta.Iterator[InjectorBinding]:
|
4300
|
-
for b in self.p.bindings():
|
4301
|
-
yield self.m.get(b.key, b)
|
4302
|
-
|
4303
|
-
|
4304
|
-
def injector_override(p: InjectorBindings, *args: InjectorBindingOrBindings) -> InjectorBindings:
|
4305
|
-
m: ta.Dict[InjectorKey, InjectorBinding] = {}
|
4306
|
-
|
4307
|
-
for b in as_injector_bindings(*args).bindings():
|
4308
|
-
if b.key in m:
|
4309
|
-
raise DuplicateInjectorKeyError(b.key)
|
4310
|
-
m[b.key] = b
|
4311
|
-
|
4312
|
-
return OverridesInjectorBindings(p, m)
|
4313
|
-
|
4314
|
-
|
4315
|
-
##
|
4316
|
-
|
4317
|
-
|
4318
4294
|
def build_injector_provider_map(bs: InjectorBindings) -> ta.Mapping[InjectorKey, InjectorProvider]:
|
4319
4295
|
pm: ta.Dict[InjectorKey, InjectorProvider] = {}
|
4320
4296
|
am: ta.Dict[InjectorKey, ta.List[InjectorProvider]] = {}
|
@@ -4338,6 +4314,31 @@ def build_injector_provider_map(bs: InjectorBindings) -> ta.Mapping[InjectorKey,
|
|
4338
4314
|
return pm
|
4339
4315
|
|
4340
4316
|
|
4317
|
+
###
|
4318
|
+
# overrides
|
4319
|
+
|
4320
|
+
|
4321
|
+
@dc.dataclass(frozen=True)
|
4322
|
+
class OverridesInjectorBindings(InjectorBindings):
|
4323
|
+
p: InjectorBindings
|
4324
|
+
m: ta.Mapping[InjectorKey, InjectorBinding]
|
4325
|
+
|
4326
|
+
def bindings(self) -> ta.Iterator[InjectorBinding]:
|
4327
|
+
for b in self.p.bindings():
|
4328
|
+
yield self.m.get(b.key, b)
|
4329
|
+
|
4330
|
+
|
4331
|
+
def injector_override(p: InjectorBindings, *args: InjectorBindingOrBindings) -> InjectorBindings:
|
4332
|
+
m: ta.Dict[InjectorKey, InjectorBinding] = {}
|
4333
|
+
|
4334
|
+
for b in as_injector_bindings(*args).bindings():
|
4335
|
+
if b.key in m:
|
4336
|
+
raise DuplicateInjectorKeyError(b.key)
|
4337
|
+
m[b.key] = b
|
4338
|
+
|
4339
|
+
return OverridesInjectorBindings(p, m)
|
4340
|
+
|
4341
|
+
|
4341
4342
|
###
|
4342
4343
|
# scopes
|
4343
4344
|
|
@@ -4362,7 +4363,7 @@ class InjectorScope(abc.ABC): # noqa
|
|
4362
4363
|
@dc.dataclass(frozen=True)
|
4363
4364
|
class State:
|
4364
4365
|
seeds: ta.Dict[InjectorKey, ta.Any]
|
4365
|
-
|
4366
|
+
provisions: ta.Dict[InjectorKey, ta.Any] = dc.field(default_factory=dict)
|
4366
4367
|
|
4367
4368
|
def new_state(self, vs: ta.Mapping[InjectorKey, ta.Any]) -> State:
|
4368
4369
|
vs = dict(vs)
|
@@ -4442,11 +4443,11 @@ class ScopedInjectorProvider(InjectorProvider):
|
|
4442
4443
|
def pfn(i: Injector) -> ta.Any:
|
4443
4444
|
st = i[self.sc].state()
|
4444
4445
|
try:
|
4445
|
-
return st.
|
4446
|
+
return st.provisions[self.k]
|
4446
4447
|
except KeyError:
|
4447
4448
|
pass
|
4448
4449
|
v = ufn(i)
|
4449
|
-
st.
|
4450
|
+
st.provisions[self.k] = v
|
4450
4451
|
return v
|
4451
4452
|
|
4452
4453
|
ufn = self.p.provider_fn()
|
@@ -4470,9 +4471,7 @@ class _ScopeSeedInjectorProvider(InjectorProvider):
|
|
4470
4471
|
|
4471
4472
|
|
4472
4473
|
def bind_injector_scope(sc: ta.Type[InjectorScope]) -> InjectorBindingOrBindings:
|
4473
|
-
return
|
4474
|
-
InjectorBinder.bind(sc, singleton=True),
|
4475
|
-
)
|
4474
|
+
return InjectorBinder.bind(sc, singleton=True)
|
4476
4475
|
|
4477
4476
|
|
4478
4477
|
#
|
@@ -5012,6 +5011,8 @@ class InjectionApi:
|
|
5012
5011
|
def as_bindings(self, *args: InjectorBindingOrBindings) -> InjectorBindings:
|
5013
5012
|
return as_injector_bindings(*args)
|
5014
5013
|
|
5014
|
+
# overrides
|
5015
|
+
|
5015
5016
|
def override(self, p: InjectorBindings, *args: InjectorBindingOrBindings) -> InjectorBindings:
|
5016
5017
|
return injector_override(p, *args)
|
5017
5018
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ominfra
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev179
|
4
4
|
Summary: ominfra
|
5
5
|
Author: wrmsr
|
6
6
|
License: BSD-3-Clause
|
@@ -12,8 +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.
|
16
|
-
Requires-Dist: omlish==0.0.0.
|
15
|
+
Requires-Dist: omdev==0.0.0.dev179
|
16
|
+
Requires-Dist: omlish==0.0.0.dev179
|
17
17
|
Provides-Extra: all
|
18
18
|
Requires-Dist: paramiko~=3.5; extra == "all"
|
19
19
|
Requires-Dist: asyncssh~=2.18; extra == "all"
|
@@ -49,15 +49,15 @@ ominfra/manage/deploy/commands.py,sha256=U74HYQ4nhvH7znAKyXGOmZfdnll2gMWxKWVW4Gz
|
|
49
49
|
ominfra/manage/deploy/conf.py,sha256=fNfFlIb-bB3KAzaYZcjrbqaqKSiSq0Lpk0mIF6WgXiw,5410
|
50
50
|
ominfra/manage/deploy/config.py,sha256=kPpl8TRisz295cM4oj-RHA6oh5jdcJ_N9pVpkl_doO8,114
|
51
51
|
ominfra/manage/deploy/deploy.py,sha256=vyBTbBm51HhRE-MQNvxEt39F8uOYsB4ToqZ3zmVkpqU,819
|
52
|
-
ominfra/manage/deploy/driver.py,sha256=
|
52
|
+
ominfra/manage/deploy/driver.py,sha256=kSriXFC8L_EpOcHFGxNZDBGyxV_fZAAF95y-czisnwE,1352
|
53
53
|
ominfra/manage/deploy/git.py,sha256=g4wzUuSu9HwWSDhdVX-7BvA2htMwtWbRcHaoDy-xOJ4,3960
|
54
|
-
ominfra/manage/deploy/inject.py,sha256=
|
55
|
-
ominfra/manage/deploy/interp.py,sha256=
|
54
|
+
ominfra/manage/deploy/inject.py,sha256=eTQC8Kyk8S8ogTJqti2lTwD2j7ha5qQG6KxqeIpLoxU,3610
|
55
|
+
ominfra/manage/deploy/interp.py,sha256=_5fuHrY5ZA0eGbnNcOqAhAMSWI1UNvbm0l29eDjE5fI,1037
|
56
56
|
ominfra/manage/deploy/specs.py,sha256=usi5AmTlv8OGFcwhVHnu8Qrz1Criu5QP6_ScNMi9ehM,3748
|
57
57
|
ominfra/manage/deploy/tags.py,sha256=NVEJhHKMwoDuCFd8lInH_jIe99FQILBX3wrulh3GiDg,5166
|
58
58
|
ominfra/manage/deploy/tmp.py,sha256=FqXoVpIpVe8-KWNu7kXt37A4jKdK_y7h_YFvtrUoOG8,729
|
59
59
|
ominfra/manage/deploy/types.py,sha256=ZcIoheZ3zW7n0IZiqTRW_Uo3JyWWeWg5nyKGryvGc2I,112
|
60
|
-
ominfra/manage/deploy/venvs.py,sha256=
|
60
|
+
ominfra/manage/deploy/venvs.py,sha256=1Ic3yKap9bTduqHorz1MpmSiQPh9x-vxhLLxgpVpRdc,1592
|
61
61
|
ominfra/manage/deploy/paths/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
62
62
|
ominfra/manage/deploy/paths/inject.py,sha256=X81C-Qhef1LQ7tILWvkomBwFTvgooLVmWRnKL7TeVoI,596
|
63
63
|
ominfra/manage/deploy/paths/manager.py,sha256=Dnl8euyZQYDGwDzkMvgPAwOssseducr5kP6T0qzVXQk,929
|
@@ -87,8 +87,8 @@ ominfra/manage/targets/inject.py,sha256=P4597xWM-V3I_gCt2O71OLhYQkkXtuJvkYRsIbhh
|
|
87
87
|
ominfra/manage/targets/targets.py,sha256=7GP6UAZyJFEhpkJN6UQdpr_WN3p7C76v-s445y-WB6U,1885
|
88
88
|
ominfra/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
89
89
|
ominfra/scripts/journald2aws.py,sha256=yEnBAd0Q_3lBkVoTvlJ_uCcUxz7Ckn2qoSWZVhMihvQ,157696
|
90
|
-
ominfra/scripts/manage.py,sha256=
|
91
|
-
ominfra/scripts/supervisor.py,sha256=
|
90
|
+
ominfra/scripts/manage.py,sha256=8amo3uZzto1lHwrPANYIiQANnI4tg7d2tYPZpLQxOek,327303
|
91
|
+
ominfra/scripts/supervisor.py,sha256=fjUREQahtEy3FmuIVJsJIDNKNt002dCSjQO6OYq64SY,281855
|
92
92
|
ominfra/supervisor/LICENSE.txt,sha256=yvqaMNsDhWxziHa9ien6qCW1SkZv-DQlAg96XjfSee8,1746
|
93
93
|
ominfra/supervisor/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
|
94
94
|
ominfra/supervisor/__main__.py,sha256=I0yFw-C08OOiZ3BF6lF1Oiv789EQXu-_j6whDhQUTEA,66
|
@@ -130,9 +130,9 @@ ominfra/tailscale/api.py,sha256=C5-t_b6jZXUWcy5k8bXm7CFnk73pSdrlMOgGDeGVrpw,1370
|
|
130
130
|
ominfra/tailscale/cli.py,sha256=h6akQJMl0KuWLHS7Ur6WcBZ2JwF0DJQhsPTnFBdGyNk,3571
|
131
131
|
ominfra/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
132
132
|
ominfra/tools/listresources.py,sha256=4qVg5txsb10EHhvqXXeM6gJ2jx9LbroEnPydDv1uXs0,6176
|
133
|
-
ominfra-0.0.0.
|
134
|
-
ominfra-0.0.0.
|
135
|
-
ominfra-0.0.0.
|
136
|
-
ominfra-0.0.0.
|
137
|
-
ominfra-0.0.0.
|
138
|
-
ominfra-0.0.0.
|
133
|
+
ominfra-0.0.0.dev179.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
134
|
+
ominfra-0.0.0.dev179.dist-info/METADATA,sha256=DToWITQGiSWlecrUHlTZfyqAdadg-kSWUpZb8auv38g,731
|
135
|
+
ominfra-0.0.0.dev179.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
136
|
+
ominfra-0.0.0.dev179.dist-info/entry_points.txt,sha256=kgecQ2MgGrM9qK744BoKS3tMesaC3yjLnl9pa5CRczg,37
|
137
|
+
ominfra-0.0.0.dev179.dist-info/top_level.txt,sha256=E-b2OHkk_AOBLXHYZQ2EOFKl-_6uOGd8EjeG-Zy6h_w,8
|
138
|
+
ominfra-0.0.0.dev179.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|