ominfra 0.0.0.dev161__tar.gz → 0.0.0.dev162__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. {ominfra-0.0.0.dev161/ominfra.egg-info → ominfra-0.0.0.dev162}/PKG-INFO +3 -3
  2. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/scripts/manage.py +16 -29
  3. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/scripts/supervisor.py +16 -29
  4. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162/ominfra.egg-info}/PKG-INFO +3 -3
  5. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra.egg-info/requires.txt +2 -2
  6. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/pyproject.toml +3 -3
  7. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/LICENSE +0 -0
  8. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/MANIFEST.in +0 -0
  9. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/README.rst +0 -0
  10. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/.manifests.json +0 -0
  11. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/__about__.py +0 -0
  12. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/__init__.py +0 -0
  13. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/clouds/__init__.py +0 -0
  14. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/clouds/aws/__init__.py +0 -0
  15. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/clouds/aws/__main__.py +0 -0
  16. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/clouds/aws/auth.py +0 -0
  17. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/clouds/aws/cli.py +0 -0
  18. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/clouds/aws/dataclasses.py +0 -0
  19. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/clouds/aws/journald2aws/__init__.py +0 -0
  20. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/clouds/aws/journald2aws/__main__.py +0 -0
  21. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/clouds/aws/journald2aws/cursor.py +0 -0
  22. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/clouds/aws/journald2aws/driver.py +0 -0
  23. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/clouds/aws/journald2aws/main.py +0 -0
  24. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/clouds/aws/journald2aws/poster.py +0 -0
  25. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/clouds/aws/logs.py +0 -0
  26. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/clouds/aws/metadata.py +0 -0
  27. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/clouds/gcp/__init__.py +0 -0
  28. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/clouds/gcp/auth.py +0 -0
  29. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/cmds.py +0 -0
  30. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/configs.py +0 -0
  31. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/journald/__init__.py +0 -0
  32. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/journald/fields.py +0 -0
  33. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/journald/genmessages.py +0 -0
  34. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/journald/messages.py +0 -0
  35. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/journald/tailer.py +0 -0
  36. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/__init__.py +0 -0
  37. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/__main__.py +0 -0
  38. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/bootstrap.py +0 -0
  39. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/bootstrap_.py +0 -0
  40. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/commands/__init__.py +0 -0
  41. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/commands/base.py +0 -0
  42. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/commands/inject.py +0 -0
  43. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/commands/local.py +0 -0
  44. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/commands/marshal.py +0 -0
  45. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/commands/ping.py +0 -0
  46. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/commands/subprocess.py +0 -0
  47. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/commands/types.py +0 -0
  48. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/config.py +0 -0
  49. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/deploy/__init__.py +0 -0
  50. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/deploy/apps.py +0 -0
  51. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/deploy/commands.py +0 -0
  52. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/deploy/config.py +0 -0
  53. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/deploy/git.py +0 -0
  54. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/deploy/inject.py +0 -0
  55. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/deploy/interp.py +0 -0
  56. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/deploy/paths.py +0 -0
  57. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/deploy/specs.py +0 -0
  58. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/deploy/tmp.py +0 -0
  59. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/deploy/types.py +0 -0
  60. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/deploy/venvs.py +0 -0
  61. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/inject.py +0 -0
  62. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/main.py +0 -0
  63. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/marshal.py +0 -0
  64. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/remote/__init__.py +0 -0
  65. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/remote/_main.py +0 -0
  66. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/remote/channel.py +0 -0
  67. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/remote/config.py +0 -0
  68. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/remote/connection.py +0 -0
  69. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/remote/execution.py +0 -0
  70. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/remote/inject.py +0 -0
  71. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/remote/payload.py +0 -0
  72. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/remote/spawning.py +0 -0
  73. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/system/__init__.py +0 -0
  74. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/system/commands.py +0 -0
  75. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/system/config.py +0 -0
  76. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/system/inject.py +0 -0
  77. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/system/packages.py +0 -0
  78. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/system/platforms.py +0 -0
  79. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/targets/__init__.py +0 -0
  80. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/targets/connection.py +0 -0
  81. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/targets/inject.py +0 -0
  82. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/manage/targets/targets.py +0 -0
  83. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/pyremote.py +0 -0
  84. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/scripts/__init__.py +0 -0
  85. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/scripts/journald2aws.py +0 -0
  86. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/ssh.py +0 -0
  87. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/LICENSE.txt +0 -0
  88. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/__init__.py +0 -0
  89. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/__main__.py +0 -0
  90. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/configs.py +0 -0
  91. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/dispatchers.py +0 -0
  92. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/dispatchersimpl.py +0 -0
  93. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/events.py +0 -0
  94. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/exceptions.py +0 -0
  95. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/groups.py +0 -0
  96. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/groupsimpl.py +0 -0
  97. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/http.py +0 -0
  98. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/inject.py +0 -0
  99. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/io.py +0 -0
  100. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/main.py +0 -0
  101. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/pipes.py +0 -0
  102. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/privileges.py +0 -0
  103. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/process.py +0 -0
  104. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/processimpl.py +0 -0
  105. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/setup.py +0 -0
  106. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/setupimpl.py +0 -0
  107. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/signals.py +0 -0
  108. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/spawning.py +0 -0
  109. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/spawningimpl.py +0 -0
  110. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/states.py +0 -0
  111. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/supervisor.py +0 -0
  112. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/types.py +0 -0
  113. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/utils/__init__.py +0 -0
  114. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/utils/collections.py +0 -0
  115. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/utils/diag.py +0 -0
  116. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/utils/fds.py +0 -0
  117. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/utils/fs.py +0 -0
  118. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/utils/os.py +0 -0
  119. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/utils/ostypes.py +0 -0
  120. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/utils/signals.py +0 -0
  121. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/utils/strings.py +0 -0
  122. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/supervisor/utils/users.py +0 -0
  123. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/tailscale/__init__.py +0 -0
  124. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/tailscale/api.py +0 -0
  125. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/tailscale/cli.py +0 -0
  126. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/threadworkers.py +0 -0
  127. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/tools/__init__.py +0 -0
  128. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra/tools/listresources.py +0 -0
  129. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra.egg-info/SOURCES.txt +0 -0
  130. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra.egg-info/dependency_links.txt +0 -0
  131. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra.egg-info/entry_points.txt +0 -0
  132. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/ominfra.egg-info/top_level.txt +0 -0
  133. {ominfra-0.0.0.dev161 → ominfra-0.0.0.dev162}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ominfra
3
- Version: 0.0.0.dev161
3
+ Version: 0.0.0.dev162
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.dev161
16
- Requires-Dist: omlish==0.0.0.dev161
15
+ Requires-Dist: omdev==0.0.0.dev162
16
+ Requires-Dist: omlish==0.0.0.dev162
17
17
  Provides-Extra: all
18
18
  Requires-Dist: paramiko~=3.5; extra == "all"
19
19
  Requires-Dist: asyncssh~=2.18; extra == "all"
@@ -5489,7 +5489,7 @@ class InjectorBinder:
5489
5489
  def __new__(cls, *args, **kwargs): # noqa
5490
5490
  raise TypeError
5491
5491
 
5492
- _FN_TYPES: ta.Tuple[type, ...] = (
5492
+ _FN_TYPES: ta.ClassVar[ta.Tuple[type, ...]] = (
5493
5493
  types.FunctionType,
5494
5494
  types.MethodType,
5495
5495
 
@@ -5511,7 +5511,7 @@ class InjectorBinder:
5511
5511
  cls._FN_TYPES = (*cls._FN_TYPES, icls)
5512
5512
  return icls
5513
5513
 
5514
- _BANNED_BIND_TYPES: ta.Tuple[type, ...] = (
5514
+ _BANNED_BIND_TYPES: ta.ClassVar[ta.Tuple[type, ...]] = (
5515
5515
  InjectorProvider,
5516
5516
  )
5517
5517
 
@@ -5690,45 +5690,35 @@ def bind_injector_eager_key(key: ta.Any) -> InjectorBinding:
5690
5690
  ##
5691
5691
 
5692
5692
 
5693
- class Injection:
5694
- def __new__(cls, *args, **kwargs): # noqa
5695
- raise TypeError
5696
-
5693
+ class InjectionApi:
5697
5694
  # keys
5698
5695
 
5699
- @classmethod
5700
- def as_key(cls, o: ta.Any) -> InjectorKey:
5696
+ def as_key(self, o: ta.Any) -> InjectorKey:
5701
5697
  return as_injector_key(o)
5702
5698
 
5703
- @classmethod
5704
- def array(cls, o: ta.Any) -> InjectorKey:
5699
+ def array(self, o: ta.Any) -> InjectorKey:
5705
5700
  return dc.replace(as_injector_key(o), array=True)
5706
5701
 
5707
- @classmethod
5708
- def tag(cls, o: ta.Any, t: ta.Any) -> InjectorKey:
5702
+ def tag(self, o: ta.Any, t: ta.Any) -> InjectorKey:
5709
5703
  return dc.replace(as_injector_key(o), tag=t)
5710
5704
 
5711
5705
  # bindings
5712
5706
 
5713
- @classmethod
5714
- def as_bindings(cls, *args: InjectorBindingOrBindings) -> InjectorBindings:
5707
+ def as_bindings(self, *args: InjectorBindingOrBindings) -> InjectorBindings:
5715
5708
  return as_injector_bindings(*args)
5716
5709
 
5717
- @classmethod
5718
- def override(cls, p: InjectorBindings, *args: InjectorBindingOrBindings) -> InjectorBindings:
5710
+ def override(self, p: InjectorBindings, *args: InjectorBindingOrBindings) -> InjectorBindings:
5719
5711
  return injector_override(p, *args)
5720
5712
 
5721
5713
  # injector
5722
5714
 
5723
- @classmethod
5724
- def create_injector(cls, *args: InjectorBindingOrBindings, parent: ta.Optional[Injector] = None) -> Injector:
5715
+ def create_injector(self, *args: InjectorBindingOrBindings, parent: ta.Optional[Injector] = None) -> Injector:
5725
5716
  return _Injector(as_injector_bindings(*args), parent)
5726
5717
 
5727
5718
  # binder
5728
5719
 
5729
- @classmethod
5730
5720
  def bind(
5731
- cls,
5721
+ self,
5732
5722
  obj: ta.Any,
5733
5723
  *,
5734
5724
  key: ta.Any = None,
@@ -5763,35 +5753,32 @@ class Injection:
5763
5753
 
5764
5754
  # helpers
5765
5755
 
5766
- @classmethod
5767
5756
  def bind_factory(
5768
- cls,
5757
+ self,
5769
5758
  fn: ta.Callable[..., T],
5770
5759
  cls_: U,
5771
5760
  ann: ta.Any = None,
5772
5761
  ) -> InjectorBindingOrBindings:
5773
- return cls.bind(make_injector_factory(fn, cls_, ann))
5762
+ return self.bind(make_injector_factory(fn, cls_, ann))
5774
5763
 
5775
- @classmethod
5776
5764
  def bind_array(
5777
- cls,
5765
+ self,
5778
5766
  obj: ta.Any = None,
5779
5767
  *,
5780
5768
  tag: ta.Any = None,
5781
5769
  ) -> InjectorBindingOrBindings:
5782
5770
  return bind_injector_array(obj, tag=tag)
5783
5771
 
5784
- @classmethod
5785
5772
  def bind_array_type(
5786
- cls,
5773
+ self,
5787
5774
  ele: ta.Union[InjectorKey, InjectorKeyCls],
5788
5775
  cls_: U,
5789
5776
  ann: ta.Any = None,
5790
5777
  ) -> InjectorBindingOrBindings:
5791
- return cls.bind(make_injector_array_type(ele, cls_, ann))
5778
+ return self.bind(make_injector_array_type(ele, cls_, ann))
5792
5779
 
5793
5780
 
5794
- inj = Injection
5781
+ inj = InjectionApi()
5795
5782
 
5796
5783
 
5797
5784
  ########################################
@@ -4548,7 +4548,7 @@ class InjectorBinder:
4548
4548
  def __new__(cls, *args, **kwargs): # noqa
4549
4549
  raise TypeError
4550
4550
 
4551
- _FN_TYPES: ta.Tuple[type, ...] = (
4551
+ _FN_TYPES: ta.ClassVar[ta.Tuple[type, ...]] = (
4552
4552
  types.FunctionType,
4553
4553
  types.MethodType,
4554
4554
 
@@ -4570,7 +4570,7 @@ class InjectorBinder:
4570
4570
  cls._FN_TYPES = (*cls._FN_TYPES, icls)
4571
4571
  return icls
4572
4572
 
4573
- _BANNED_BIND_TYPES: ta.Tuple[type, ...] = (
4573
+ _BANNED_BIND_TYPES: ta.ClassVar[ta.Tuple[type, ...]] = (
4574
4574
  InjectorProvider,
4575
4575
  )
4576
4576
 
@@ -4749,45 +4749,35 @@ def bind_injector_eager_key(key: ta.Any) -> InjectorBinding:
4749
4749
  ##
4750
4750
 
4751
4751
 
4752
- class Injection:
4753
- def __new__(cls, *args, **kwargs): # noqa
4754
- raise TypeError
4755
-
4752
+ class InjectionApi:
4756
4753
  # keys
4757
4754
 
4758
- @classmethod
4759
- def as_key(cls, o: ta.Any) -> InjectorKey:
4755
+ def as_key(self, o: ta.Any) -> InjectorKey:
4760
4756
  return as_injector_key(o)
4761
4757
 
4762
- @classmethod
4763
- def array(cls, o: ta.Any) -> InjectorKey:
4758
+ def array(self, o: ta.Any) -> InjectorKey:
4764
4759
  return dc.replace(as_injector_key(o), array=True)
4765
4760
 
4766
- @classmethod
4767
- def tag(cls, o: ta.Any, t: ta.Any) -> InjectorKey:
4761
+ def tag(self, o: ta.Any, t: ta.Any) -> InjectorKey:
4768
4762
  return dc.replace(as_injector_key(o), tag=t)
4769
4763
 
4770
4764
  # bindings
4771
4765
 
4772
- @classmethod
4773
- def as_bindings(cls, *args: InjectorBindingOrBindings) -> InjectorBindings:
4766
+ def as_bindings(self, *args: InjectorBindingOrBindings) -> InjectorBindings:
4774
4767
  return as_injector_bindings(*args)
4775
4768
 
4776
- @classmethod
4777
- def override(cls, p: InjectorBindings, *args: InjectorBindingOrBindings) -> InjectorBindings:
4769
+ def override(self, p: InjectorBindings, *args: InjectorBindingOrBindings) -> InjectorBindings:
4778
4770
  return injector_override(p, *args)
4779
4771
 
4780
4772
  # injector
4781
4773
 
4782
- @classmethod
4783
- def create_injector(cls, *args: InjectorBindingOrBindings, parent: ta.Optional[Injector] = None) -> Injector:
4774
+ def create_injector(self, *args: InjectorBindingOrBindings, parent: ta.Optional[Injector] = None) -> Injector:
4784
4775
  return _Injector(as_injector_bindings(*args), parent)
4785
4776
 
4786
4777
  # binder
4787
4778
 
4788
- @classmethod
4789
4779
  def bind(
4790
- cls,
4780
+ self,
4791
4781
  obj: ta.Any,
4792
4782
  *,
4793
4783
  key: ta.Any = None,
@@ -4822,35 +4812,32 @@ class Injection:
4822
4812
 
4823
4813
  # helpers
4824
4814
 
4825
- @classmethod
4826
4815
  def bind_factory(
4827
- cls,
4816
+ self,
4828
4817
  fn: ta.Callable[..., T],
4829
4818
  cls_: U,
4830
4819
  ann: ta.Any = None,
4831
4820
  ) -> InjectorBindingOrBindings:
4832
- return cls.bind(make_injector_factory(fn, cls_, ann))
4821
+ return self.bind(make_injector_factory(fn, cls_, ann))
4833
4822
 
4834
- @classmethod
4835
4823
  def bind_array(
4836
- cls,
4824
+ self,
4837
4825
  obj: ta.Any = None,
4838
4826
  *,
4839
4827
  tag: ta.Any = None,
4840
4828
  ) -> InjectorBindingOrBindings:
4841
4829
  return bind_injector_array(obj, tag=tag)
4842
4830
 
4843
- @classmethod
4844
4831
  def bind_array_type(
4845
- cls,
4832
+ self,
4846
4833
  ele: ta.Union[InjectorKey, InjectorKeyCls],
4847
4834
  cls_: U,
4848
4835
  ann: ta.Any = None,
4849
4836
  ) -> InjectorBindingOrBindings:
4850
- return cls.bind(make_injector_array_type(ele, cls_, ann))
4837
+ return self.bind(make_injector_array_type(ele, cls_, ann))
4851
4838
 
4852
4839
 
4853
- inj = Injection
4840
+ inj = InjectionApi()
4854
4841
 
4855
4842
 
4856
4843
  ########################################
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ominfra
3
- Version: 0.0.0.dev161
3
+ Version: 0.0.0.dev162
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.dev161
16
- Requires-Dist: omlish==0.0.0.dev161
15
+ Requires-Dist: omdev==0.0.0.dev162
16
+ Requires-Dist: omlish==0.0.0.dev162
17
17
  Provides-Extra: all
18
18
  Requires-Dist: paramiko~=3.5; extra == "all"
19
19
  Requires-Dist: asyncssh~=2.18; extra == "all"
@@ -1,5 +1,5 @@
1
- omdev==0.0.0.dev161
2
- omlish==0.0.0.dev161
1
+ omdev==0.0.0.dev162
2
+ omlish==0.0.0.dev162
3
3
 
4
4
  [all]
5
5
  paramiko~=3.5
@@ -12,7 +12,7 @@ authors = [
12
12
  urls = {source = 'https://github.com/wrmsr/omlish'}
13
13
  license = {text = 'BSD-3-Clause'}
14
14
  requires-python = '>=3.12'
15
- version = '0.0.0.dev161'
15
+ version = '0.0.0.dev162'
16
16
  classifiers = [
17
17
  'License :: OSI Approved :: BSD License',
18
18
  'Development Status :: 2 - Pre-Alpha',
@@ -22,8 +22,8 @@ classifiers = [
22
22
  ]
23
23
  description = 'ominfra'
24
24
  dependencies = [
25
- 'omdev == 0.0.0.dev161',
26
- 'omlish == 0.0.0.dev161',
25
+ 'omdev == 0.0.0.dev162',
26
+ 'omlish == 0.0.0.dev162',
27
27
  ]
28
28
 
29
29
  [project.optional-dependencies]
File without changes
File without changes