ominfra 0.0.0.dev122__tar.gz → 0.0.0.dev124__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. {ominfra-0.0.0.dev122/ominfra.egg-info → ominfra-0.0.0.dev124}/PKG-INFO +3 -3
  2. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/_executor.py +8 -5
  3. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/poly/_main.py +2 -4
  4. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/journald/messages.py +1 -1
  5. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/pyremote/_runcommands.py +8 -5
  6. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/scripts/journald2aws.py +9 -6
  7. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/scripts/supervisor.py +2799 -1536
  8. ominfra-0.0.0.dev124/ominfra/supervisor/LICENSE.txt +28 -0
  9. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/supervisor/context.py +16 -41
  10. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/supervisor/dispatchers.py +88 -58
  11. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/supervisor/events.py +59 -70
  12. ominfra-0.0.0.dev124/ominfra/supervisor/groups.py +162 -0
  13. ominfra-0.0.0.dev124/ominfra/supervisor/inject.py +81 -0
  14. ominfra-0.0.0.dev124/ominfra/supervisor/main.py +90 -0
  15. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/supervisor/poller.py +51 -53
  16. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/supervisor/process.py +267 -352
  17. ominfra-0.0.0.dev124/ominfra/supervisor/signals.py +52 -0
  18. ominfra-0.0.0.dev124/ominfra/supervisor/states.py +57 -0
  19. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/supervisor/supervisor.py +105 -81
  20. ominfra-0.0.0.dev124/ominfra/supervisor/types.py +105 -0
  21. ominfra-0.0.0.dev122/ominfra/supervisor/compat.py → ominfra-0.0.0.dev124/ominfra/supervisor/utils.py +34 -53
  22. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124/ominfra.egg-info}/PKG-INFO +3 -3
  23. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra.egg-info/SOURCES.txt +5 -1
  24. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra.egg-info/requires.txt +2 -2
  25. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/pyproject.toml +4 -3
  26. ominfra-0.0.0.dev122/ominfra/supervisor/main.py +0 -139
  27. ominfra-0.0.0.dev122/ominfra/supervisor/states.py +0 -78
  28. ominfra-0.0.0.dev122/ominfra/supervisor/types.py +0 -54
  29. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/LICENSE +0 -0
  30. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/MANIFEST.in +0 -0
  31. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/README.rst +0 -0
  32. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/.manifests.json +0 -0
  33. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/__about__.py +0 -0
  34. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/__init__.py +0 -0
  35. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/clouds/__init__.py +0 -0
  36. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/clouds/aws/__init__.py +0 -0
  37. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/clouds/aws/__main__.py +0 -0
  38. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/clouds/aws/auth.py +0 -0
  39. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/clouds/aws/cli.py +0 -0
  40. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/clouds/aws/dataclasses.py +0 -0
  41. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/clouds/aws/journald2aws/__init__.py +0 -0
  42. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/clouds/aws/journald2aws/__main__.py +0 -0
  43. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/clouds/aws/journald2aws/cursor.py +0 -0
  44. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/clouds/aws/journald2aws/driver.py +0 -0
  45. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/clouds/aws/journald2aws/main.py +0 -0
  46. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/clouds/aws/journald2aws/poster.py +0 -0
  47. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/clouds/aws/logs.py +0 -0
  48. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/clouds/aws/metadata.py +0 -0
  49. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/clouds/gcp/__init__.py +0 -0
  50. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/clouds/gcp/auth.py +0 -0
  51. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/cmds.py +0 -0
  52. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/configs.py +0 -0
  53. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/__init__.py +0 -0
  54. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/configs.py +0 -0
  55. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/executor/__init__.py +0 -0
  56. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/executor/base.py +0 -0
  57. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/executor/concerns/__init__.py +0 -0
  58. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/executor/concerns/dirs.py +0 -0
  59. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/executor/concerns/nginx.py +0 -0
  60. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/executor/concerns/repo.py +0 -0
  61. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/executor/concerns/supervisor.py +0 -0
  62. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/executor/concerns/systemd.py +0 -0
  63. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/executor/concerns/user.py +0 -0
  64. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/executor/concerns/venv.py +0 -0
  65. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/executor/main.py +0 -0
  66. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/poly/__init__.py +0 -0
  67. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/poly/base.py +0 -0
  68. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/poly/configs.py +0 -0
  69. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/poly/deploy.py +0 -0
  70. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/poly/main.py +0 -0
  71. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/poly/nginx.py +0 -0
  72. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/poly/repo.py +0 -0
  73. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/poly/runtime.py +0 -0
  74. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/poly/site.py +0 -0
  75. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/poly/supervisor.py +0 -0
  76. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/poly/venv.py +0 -0
  77. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/deploy/remote.py +0 -0
  78. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/journald/__init__.py +0 -0
  79. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/journald/fields.py +0 -0
  80. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/journald/genmessages.py +0 -0
  81. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/journald/tailer.py +0 -0
  82. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/manage/__init__.py +0 -0
  83. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/manage/manage.py +0 -0
  84. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/pyremote/__init__.py +0 -0
  85. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/pyremote/bootstrap.py +0 -0
  86. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/pyremote/runcommands.py +0 -0
  87. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/scripts/__init__.py +0 -0
  88. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/ssh.py +0 -0
  89. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/supervisor/__init__.py +0 -0
  90. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/supervisor/__main__.py +0 -0
  91. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/supervisor/configs.py +0 -0
  92. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/supervisor/datatypes.py +0 -0
  93. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/supervisor/exceptions.py +0 -0
  94. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/tailscale/__init__.py +0 -0
  95. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/tailscale/api.py +0 -0
  96. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/tailscale/cli.py +0 -0
  97. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/threadworkers.py +0 -0
  98. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/tools/__init__.py +0 -0
  99. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra/tools/listresources.py +0 -0
  100. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra.egg-info/dependency_links.txt +0 -0
  101. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra.egg-info/entry_points.txt +0 -0
  102. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/ominfra.egg-info/top_level.txt +0 -0
  103. {ominfra-0.0.0.dev122 → ominfra-0.0.0.dev124}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ominfra
3
- Version: 0.0.0.dev122
3
+ Version: 0.0.0.dev124
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.dev122
16
- Requires-Dist: omlish==0.0.0.dev122
15
+ Requires-Dist: omdev==0.0.0.dev124
16
+ Requires-Dist: omlish==0.0.0.dev124
17
17
  Provides-Extra: all
18
18
  Requires-Dist: paramiko~=3.5; extra == "all"
19
19
  Requires-Dist: asyncssh~=2.18; extra == "all"
@@ -76,8 +76,7 @@ import weakref # noqa
76
76
 
77
77
 
78
78
  if sys.version_info < (3, 8):
79
- raise OSError(
80
- f'Requires python (3, 8), got {sys.version_info} from {sys.executable}') # noqa
79
+ raise OSError(f'Requires python (3, 8), got {sys.version_info} from {sys.executable}') # noqa
81
80
 
82
81
 
83
82
  ########################################
@@ -138,7 +137,7 @@ def cached_nullary(fn): # ta.Callable[..., T]) -> ta.Callable[..., T]:
138
137
  # ../../../../omlish/lite/check.py
139
138
 
140
139
 
141
- def check_isinstance(v: T, spec: ta.Union[ta.Type[T], tuple]) -> T:
140
+ def check_isinstance(v: ta.Any, spec: ta.Union[ta.Type[T], tuple]) -> T:
142
141
  if not isinstance(v, spec):
143
142
  raise TypeError(v)
144
143
  return v
@@ -150,6 +149,11 @@ def check_not_isinstance(v: T, spec: ta.Union[type, tuple]) -> T:
150
149
  return v
151
150
 
152
151
 
152
+ def check_none(v: T) -> None:
153
+ if v is not None:
154
+ raise ValueError(v)
155
+
156
+
153
157
  def check_not_none(v: ta.Optional[T]) -> T:
154
158
  if v is None:
155
159
  raise ValueError
@@ -904,8 +908,7 @@ REQUIRED_PYTHON_VERSION = (3, 8)
904
908
 
905
909
  def check_runtime_version() -> None:
906
910
  if sys.version_info < REQUIRED_PYTHON_VERSION:
907
- raise OSError(
908
- f'Requires python {REQUIRED_PYTHON_VERSION}, got {sys.version_info} from {sys.executable}') # noqa
911
+ raise OSError(f'Requires python {REQUIRED_PYTHON_VERSION}, got {sys.version_info} from {sys.executable}') # noqa
909
912
 
910
913
 
911
914
  ########################################
@@ -27,8 +27,7 @@ import typing as ta
27
27
 
28
28
 
29
29
  if sys.version_info < (3, 8):
30
- raise OSError(
31
- f'Requires python (3, 8), got {sys.version_info} from {sys.executable}') # noqa
30
+ raise OSError(f'Requires python (3, 8), got {sys.version_info} from {sys.executable}') # noqa
32
31
 
33
32
 
34
33
  ########################################
@@ -589,8 +588,7 @@ REQUIRED_PYTHON_VERSION = (3, 8)
589
588
 
590
589
  def check_runtime_version() -> None:
591
590
  if sys.version_info < REQUIRED_PYTHON_VERSION:
592
- raise OSError(
593
- f'Requires python {REQUIRED_PYTHON_VERSION}, got {sys.version_info} from {sys.executable}') # noqa
591
+ raise OSError(f'Requires python {REQUIRED_PYTHON_VERSION}, got {sys.version_info} from {sys.executable}') # noqa
594
592
 
595
593
 
596
594
  ########################################
@@ -74,5 +74,5 @@ class JournalctlMessageBuilder:
74
74
  def feed(self, data: bytes) -> ta.Sequence[JournalctlMessage]:
75
75
  ret: ta.List[JournalctlMessage] = []
76
76
  for line in self._buf.feed(data):
77
- ret.append(self._make_message(check_isinstance(line, bytes))) # type: ignore
77
+ ret.append(self._make_message(check_isinstance(line, bytes)))
78
78
  return ret
@@ -35,8 +35,7 @@ import zlib
35
35
 
36
36
 
37
37
  if sys.version_info < (3, 8):
38
- raise OSError(
39
- f'Requires python (3, 8), got {sys.version_info} from {sys.executable}') # noqa
38
+ raise OSError(f'Requires python (3, 8), got {sys.version_info} from {sys.executable}') # noqa
40
39
 
41
40
 
42
41
  ########################################
@@ -221,7 +220,7 @@ def cached_nullary(fn): # ta.Callable[..., T]) -> ta.Callable[..., T]:
221
220
  # ../../../omlish/lite/check.py
222
221
 
223
222
 
224
- def check_isinstance(v: T, spec: ta.Union[ta.Type[T], tuple]) -> T:
223
+ def check_isinstance(v: ta.Any, spec: ta.Union[ta.Type[T], tuple]) -> T:
225
224
  if not isinstance(v, spec):
226
225
  raise TypeError(v)
227
226
  return v
@@ -233,6 +232,11 @@ def check_not_isinstance(v: T, spec: ta.Union[type, tuple]) -> T:
233
232
  return v
234
233
 
235
234
 
235
+ def check_none(v: T) -> None:
236
+ if v is not None:
237
+ raise ValueError(v)
238
+
239
+
236
240
  def check_not_none(v: ta.Optional[T]) -> T:
237
241
  if v is None:
238
242
  raise ValueError
@@ -987,8 +991,7 @@ REQUIRED_PYTHON_VERSION = (3, 8)
987
991
 
988
992
  def check_runtime_version() -> None:
989
993
  if sys.version_info < REQUIRED_PYTHON_VERSION:
990
- raise OSError(
991
- f'Requires python {REQUIRED_PYTHON_VERSION}, got {sys.version_info} from {sys.executable}') # noqa
994
+ raise OSError(f'Requires python {REQUIRED_PYTHON_VERSION}, got {sys.version_info} from {sys.executable}') # noqa
992
995
 
993
996
 
994
997
  ########################################
@@ -45,8 +45,7 @@ import weakref # noqa
45
45
 
46
46
 
47
47
  if sys.version_info < (3, 8):
48
- raise OSError(
49
- f'Requires python (3, 8), got {sys.version_info} from {sys.executable}') # noqa
48
+ raise OSError(f'Requires python (3, 8), got {sys.version_info} from {sys.executable}') # noqa
50
49
 
51
50
 
52
51
  ########################################
@@ -917,7 +916,7 @@ def cached_nullary(fn): # ta.Callable[..., T]) -> ta.Callable[..., T]:
917
916
  # ../../../../../omlish/lite/check.py
918
917
 
919
918
 
920
- def check_isinstance(v: T, spec: ta.Union[ta.Type[T], tuple]) -> T:
919
+ def check_isinstance(v: ta.Any, spec: ta.Union[ta.Type[T], tuple]) -> T:
921
920
  if not isinstance(v, spec):
922
921
  raise TypeError(v)
923
922
  return v
@@ -929,6 +928,11 @@ def check_not_isinstance(v: T, spec: ta.Union[type, tuple]) -> T:
929
928
  return v
930
929
 
931
930
 
931
+ def check_none(v: T) -> None:
932
+ if v is not None:
933
+ raise ValueError(v)
934
+
935
+
932
936
  def check_not_none(v: ta.Optional[T]) -> T:
933
937
  if v is None:
934
938
  raise ValueError
@@ -2354,8 +2358,7 @@ REQUIRED_PYTHON_VERSION = (3, 8)
2354
2358
 
2355
2359
  def check_runtime_version() -> None:
2356
2360
  if sys.version_info < REQUIRED_PYTHON_VERSION:
2357
- raise OSError(
2358
- f'Requires python {REQUIRED_PYTHON_VERSION}, got {sys.version_info} from {sys.executable}') # noqa
2361
+ raise OSError(f'Requires python {REQUIRED_PYTHON_VERSION}, got {sys.version_info} from {sys.executable}') # noqa
2359
2362
 
2360
2363
 
2361
2364
  ########################################
@@ -2704,7 +2707,7 @@ class JournalctlMessageBuilder:
2704
2707
  def feed(self, data: bytes) -> ta.Sequence[JournalctlMessage]:
2705
2708
  ret: ta.List[JournalctlMessage] = []
2706
2709
  for line in self._buf.feed(data):
2707
- ret.append(self._make_message(check_isinstance(line, bytes))) # type: ignore
2710
+ ret.append(self._make_message(check_isinstance(line, bytes)))
2708
2711
  return ret
2709
2712
 
2710
2713