ominfra 0.0.0.dev428__py3-none-any.whl → 0.0.0.dev429__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.
@@ -2691,19 +2691,16 @@ def format_num_bytes(num_bytes: int) -> str:
2691
2691
  ##
2692
2692
 
2693
2693
 
2694
- class _LoggingContextInfo:
2695
- def __mro_entries__(self, bases):
2696
- return ()
2697
-
2698
-
2699
- LoggingContextInfo: type = ta.cast(ta.Any, _LoggingContextInfo())
2694
+ def logging_context_info(cls):
2695
+ return cls
2700
2696
 
2701
2697
 
2702
2698
  ##
2703
2699
 
2704
2700
 
2701
+ @logging_context_info
2705
2702
  @ta.final
2706
- class LoggingSourceFileInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
2703
+ class LoggingSourceFileInfo(ta.NamedTuple):
2707
2704
  file_name: str
2708
2705
  module: str
2709
2706
 
@@ -2728,8 +2725,9 @@ class LoggingSourceFileInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[
2728
2725
  ##
2729
2726
 
2730
2727
 
2728
+ @logging_context_info
2731
2729
  @ta.final
2732
- class LoggingThreadInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
2730
+ class LoggingThreadInfo(ta.NamedTuple):
2733
2731
  ident: int
2734
2732
  native_id: ta.Optional[int]
2735
2733
  name: str
@@ -2746,8 +2744,9 @@ class LoggingThreadInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc
2746
2744
  ##
2747
2745
 
2748
2746
 
2747
+ @logging_context_info
2749
2748
  @ta.final
2750
- class LoggingProcessInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
2749
+ class LoggingProcessInfo(ta.NamedTuple):
2751
2750
  pid: int
2752
2751
 
2753
2752
  @classmethod
@@ -2760,8 +2759,9 @@ class LoggingProcessInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[mis
2760
2759
  ##
2761
2760
 
2762
2761
 
2762
+ @logging_context_info
2763
2763
  @ta.final
2764
- class LoggingMultiprocessingInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
2764
+ class LoggingMultiprocessingInfo(ta.NamedTuple):
2765
2765
  process_name: str
2766
2766
 
2767
2767
  @classmethod
@@ -2778,8 +2778,9 @@ class LoggingMultiprocessingInfo(LoggingContextInfo, ta.NamedTuple): # type: ig
2778
2778
  ##
2779
2779
 
2780
2780
 
2781
+ @logging_context_info
2781
2782
  @ta.final
2782
- class LoggingAsyncioTaskInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
2783
+ class LoggingAsyncioTaskInfo(ta.NamedTuple):
2783
2784
  name: str
2784
2785
 
2785
2786
  @classmethod
@@ -4912,7 +4913,9 @@ def check_lite_runtime_version() -> None:
4912
4913
  ##
4913
4914
 
4914
4915
 
4915
- class LoggingCaller(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
4916
+ @logging_context_info
4917
+ @ta.final
4918
+ class LoggingCaller(ta.NamedTuple):
4916
4919
  file_path: str
4917
4920
  line_no: int
4918
4921
  name: str
@@ -5036,7 +5039,9 @@ class JsonLoggingFormatter(logging.Formatter):
5036
5039
  ##
5037
5040
 
5038
5041
 
5039
- class LoggingTimeFields(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
5042
+ @logging_context_info
5043
+ @ta.final
5044
+ class LoggingTimeFields(ta.NamedTuple):
5040
5045
  """Maps directly to stdlib `logging.LogRecord` fields, and must be kept in sync with it."""
5041
5046
 
5042
5047
  created: float
@@ -5729,8 +5734,9 @@ def subprocess_maybe_shell_wrap_exec(*cmd: str) -> ta.Tuple[str, ...]:
5729
5734
 
5730
5735
 
5731
5736
  class AnyLogger(Abstract, ta.Generic[T]):
5737
+ @ta.final
5732
5738
  def is_enabled_for(self, level: LogLevel) -> bool:
5733
- return self.get_effective_level() >= level
5739
+ return level >= self.get_effective_level()
5734
5740
 
5735
5741
  @abc.abstractmethod
5736
5742
  def get_effective_level(self) -> LogLevel:
ominfra/scripts/manage.py CHANGED
@@ -3993,19 +3993,16 @@ def typing_annotations_attr() -> str:
3993
3993
  ##
3994
3994
 
3995
3995
 
3996
- class _LoggingContextInfo:
3997
- def __mro_entries__(self, bases):
3998
- return ()
3999
-
4000
-
4001
- LoggingContextInfo: type = ta.cast(ta.Any, _LoggingContextInfo())
3996
+ def logging_context_info(cls):
3997
+ return cls
4002
3998
 
4003
3999
 
4004
4000
  ##
4005
4001
 
4006
4002
 
4003
+ @logging_context_info
4007
4004
  @ta.final
4008
- class LoggingSourceFileInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
4005
+ class LoggingSourceFileInfo(ta.NamedTuple):
4009
4006
  file_name: str
4010
4007
  module: str
4011
4008
 
@@ -4030,8 +4027,9 @@ class LoggingSourceFileInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[
4030
4027
  ##
4031
4028
 
4032
4029
 
4030
+ @logging_context_info
4033
4031
  @ta.final
4034
- class LoggingThreadInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
4032
+ class LoggingThreadInfo(ta.NamedTuple):
4035
4033
  ident: int
4036
4034
  native_id: ta.Optional[int]
4037
4035
  name: str
@@ -4048,8 +4046,9 @@ class LoggingThreadInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc
4048
4046
  ##
4049
4047
 
4050
4048
 
4049
+ @logging_context_info
4051
4050
  @ta.final
4052
- class LoggingProcessInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
4051
+ class LoggingProcessInfo(ta.NamedTuple):
4053
4052
  pid: int
4054
4053
 
4055
4054
  @classmethod
@@ -4062,8 +4061,9 @@ class LoggingProcessInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[mis
4062
4061
  ##
4063
4062
 
4064
4063
 
4064
+ @logging_context_info
4065
4065
  @ta.final
4066
- class LoggingMultiprocessingInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
4066
+ class LoggingMultiprocessingInfo(ta.NamedTuple):
4067
4067
  process_name: str
4068
4068
 
4069
4069
  @classmethod
@@ -4080,8 +4080,9 @@ class LoggingMultiprocessingInfo(LoggingContextInfo, ta.NamedTuple): # type: ig
4080
4080
  ##
4081
4081
 
4082
4082
 
4083
+ @logging_context_info
4083
4084
  @ta.final
4084
- class LoggingAsyncioTaskInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
4085
+ class LoggingAsyncioTaskInfo(ta.NamedTuple):
4085
4086
  name: str
4086
4087
 
4087
4088
  @classmethod
@@ -7590,7 +7591,9 @@ class PredicateTimeout(Timeout):
7590
7591
  ##
7591
7592
 
7592
7593
 
7593
- class LoggingCaller(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
7594
+ @logging_context_info
7595
+ @ta.final
7596
+ class LoggingCaller(ta.NamedTuple):
7594
7597
  file_path: str
7595
7598
  line_no: int
7596
7599
  name: str
@@ -7745,7 +7748,9 @@ class JsonLoggingFormatter(logging.Formatter):
7745
7748
  ##
7746
7749
 
7747
7750
 
7748
- class LoggingTimeFields(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
7751
+ @logging_context_info
7752
+ @ta.final
7753
+ class LoggingTimeFields(ta.NamedTuple):
7749
7754
  """Maps directly to stdlib `logging.LogRecord` fields, and must be kept in sync with it."""
7750
7755
 
7751
7756
  created: float
@@ -10965,8 +10970,9 @@ class DeploySpec(DeploySpecKeyed[DeployKey]):
10965
10970
 
10966
10971
 
10967
10972
  class AnyLogger(Abstract, ta.Generic[T]):
10973
+ @ta.final
10968
10974
  def is_enabled_for(self, level: LogLevel) -> bool:
10969
- return self.get_effective_level() >= level
10975
+ return level >= self.get_effective_level()
10970
10976
 
10971
10977
  @abc.abstractmethod
10972
10978
  def get_effective_level(self) -> LogLevel:
@@ -3076,19 +3076,16 @@ def typing_annotations_attr() -> str:
3076
3076
  ##
3077
3077
 
3078
3078
 
3079
- class _LoggingContextInfo:
3080
- def __mro_entries__(self, bases):
3081
- return ()
3082
-
3083
-
3084
- LoggingContextInfo: type = ta.cast(ta.Any, _LoggingContextInfo())
3079
+ def logging_context_info(cls):
3080
+ return cls
3085
3081
 
3086
3082
 
3087
3083
  ##
3088
3084
 
3089
3085
 
3086
+ @logging_context_info
3090
3087
  @ta.final
3091
- class LoggingSourceFileInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
3088
+ class LoggingSourceFileInfo(ta.NamedTuple):
3092
3089
  file_name: str
3093
3090
  module: str
3094
3091
 
@@ -3113,8 +3110,9 @@ class LoggingSourceFileInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[
3113
3110
  ##
3114
3111
 
3115
3112
 
3113
+ @logging_context_info
3116
3114
  @ta.final
3117
- class LoggingThreadInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
3115
+ class LoggingThreadInfo(ta.NamedTuple):
3118
3116
  ident: int
3119
3117
  native_id: ta.Optional[int]
3120
3118
  name: str
@@ -3131,8 +3129,9 @@ class LoggingThreadInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc
3131
3129
  ##
3132
3130
 
3133
3131
 
3132
+ @logging_context_info
3134
3133
  @ta.final
3135
- class LoggingProcessInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
3134
+ class LoggingProcessInfo(ta.NamedTuple):
3136
3135
  pid: int
3137
3136
 
3138
3137
  @classmethod
@@ -3145,8 +3144,9 @@ class LoggingProcessInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[mis
3145
3144
  ##
3146
3145
 
3147
3146
 
3147
+ @logging_context_info
3148
3148
  @ta.final
3149
- class LoggingMultiprocessingInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
3149
+ class LoggingMultiprocessingInfo(ta.NamedTuple):
3150
3150
  process_name: str
3151
3151
 
3152
3152
  @classmethod
@@ -3163,8 +3163,9 @@ class LoggingMultiprocessingInfo(LoggingContextInfo, ta.NamedTuple): # type: ig
3163
3163
  ##
3164
3164
 
3165
3165
 
3166
+ @logging_context_info
3166
3167
  @ta.final
3167
- class LoggingAsyncioTaskInfo(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
3168
+ class LoggingAsyncioTaskInfo(ta.NamedTuple):
3168
3169
  name: str
3169
3170
 
3170
3171
  @classmethod
@@ -6177,7 +6178,9 @@ def check_lite_runtime_version() -> None:
6177
6178
  ##
6178
6179
 
6179
6180
 
6180
- class LoggingCaller(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
6181
+ @logging_context_info
6182
+ @ta.final
6183
+ class LoggingCaller(ta.NamedTuple):
6181
6184
  file_path: str
6182
6185
  line_no: int
6183
6186
  name: str
@@ -6332,7 +6335,9 @@ class JsonLoggingFormatter(logging.Formatter):
6332
6335
  ##
6333
6336
 
6334
6337
 
6335
- class LoggingTimeFields(LoggingContextInfo, ta.NamedTuple): # type: ignore[misc]
6338
+ @logging_context_info
6339
+ @ta.final
6340
+ class LoggingTimeFields(ta.NamedTuple):
6336
6341
  """Maps directly to stdlib `logging.LogRecord` fields, and must be kept in sync with it."""
6337
6342
 
6338
6343
  created: float
@@ -9573,8 +9578,9 @@ class CoroHttpServer:
9573
9578
 
9574
9579
 
9575
9580
  class AnyLogger(Abstract, ta.Generic[T]):
9581
+ @ta.final
9576
9582
  def is_enabled_for(self, level: LogLevel) -> bool:
9577
- return self.get_effective_level() >= level
9583
+ return level >= self.get_effective_level()
9578
9584
 
9579
9585
  @abc.abstractmethod
9580
9586
  def get_effective_level(self) -> LogLevel:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ominfra
3
- Version: 0.0.0.dev428
3
+ Version: 0.0.0.dev429
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.dev428
18
- Requires-Dist: omlish==0.0.0.dev428
17
+ Requires-Dist: omdev==0.0.0.dev429
18
+ Requires-Dist: omlish==0.0.0.dev429
19
19
  Provides-Extra: all
20
20
  Requires-Dist: paramiko~=4.0; extra == "all"
21
21
  Requires-Dist: asyncssh~=2.21; extra == "all"
@@ -112,9 +112,9 @@ ominfra/manage/targets/connection.py,sha256=mOHCsDVG-DZBhl3Mb7TTr1vhPb0gxDOOMW1x
112
112
  ominfra/manage/targets/inject.py,sha256=3M4wBkxtvymq_yhiotHlTN8iydELMjVCndyp9Bq-4eo,1572
113
113
  ominfra/manage/targets/targets.py,sha256=LjSQrDsHEjEQMDHcxtNKmLjy0YGLXJRGPFdUjazzFIM,1918
114
114
  ominfra/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
115
- ominfra/scripts/journald2aws.py,sha256=iUjxqPegHGyvIgUNWMPAeN2-P_sLfe_Nmf6naYicg7c,225783
116
- ominfra/scripts/manage.py,sha256=PopDg9ZR_2hAFOqr-HQF6Y_rasAUvPL_A8I1aXWYLZ8,449470
117
- ominfra/scripts/supervisor.py,sha256=51HD1rLxo5PhSXceIatbpVoatzs7Hf3cAJYuJ84dRFA,359209
115
+ ominfra/scripts/journald2aws.py,sha256=PcwfGVueNPjOLOsig6J9phO2BMC7KGhag4mij0YVFFQ,225572
116
+ ominfra/scripts/manage.py,sha256=LNPJYbNiIW_sYtXN7_Top02C4ry3-ftE3kOQKb-x9zY,449259
117
+ ominfra/scripts/supervisor.py,sha256=Qbn0go8hCer5wO2r5EY-T8pszD33q8NGUIGwbTcOFi8,358998
118
118
  ominfra/supervisor/LICENSE.txt,sha256=ZrHY15PVR98y26Yg6iQfa-SXnUaYTDhrUsPVcEO5OKM,1874
119
119
  ominfra/supervisor/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
120
120
  ominfra/supervisor/__main__.py,sha256=I0yFw-C08OOiZ3BF6lF1Oiv789EQXu-_j6whDhQUTEA,66
@@ -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=ePmo7cUAiBZARkM_3K4GKYZXxV73An_aioS1m-AAJis,6181
159
- ominfra-0.0.0.dev428.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
160
- ominfra-0.0.0.dev428.dist-info/METADATA,sha256=DgoChKK9hL_QYLqC-3iF7P2A56nIQLlawcecm_Kd_00,2377
161
- ominfra-0.0.0.dev428.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
162
- ominfra-0.0.0.dev428.dist-info/entry_points.txt,sha256=kgecQ2MgGrM9qK744BoKS3tMesaC3yjLnl9pa5CRczg,37
163
- ominfra-0.0.0.dev428.dist-info/top_level.txt,sha256=E-b2OHkk_AOBLXHYZQ2EOFKl-_6uOGd8EjeG-Zy6h_w,8
164
- ominfra-0.0.0.dev428.dist-info/RECORD,,
159
+ ominfra-0.0.0.dev429.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
160
+ ominfra-0.0.0.dev429.dist-info/METADATA,sha256=1aOXl62enLVpevDZyuNFqKG_Y1aLk7pc7SzBYpqiBQE,2377
161
+ ominfra-0.0.0.dev429.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
162
+ ominfra-0.0.0.dev429.dist-info/entry_points.txt,sha256=kgecQ2MgGrM9qK744BoKS3tMesaC3yjLnl9pa5CRczg,37
163
+ ominfra-0.0.0.dev429.dist-info/top_level.txt,sha256=E-b2OHkk_AOBLXHYZQ2EOFKl-_6uOGd8EjeG-Zy6h_w,8
164
+ ominfra-0.0.0.dev429.dist-info/RECORD,,