omlish 0.0.0.dev420__py3-none-any.whl → 0.0.0.dev421__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.
Files changed (93) hide show
  1. omlish/__about__.py +2 -2
  2. omlish/asyncs/bluelet/core.py +2 -2
  3. omlish/asyncs/bluelet/events.py +4 -3
  4. omlish/asyncs/bluelet/files.py +2 -2
  5. omlish/asyncs/bluelet/sockets.py +2 -2
  6. omlish/collections/frozen.py +1 -1
  7. omlish/collections/kv/base.py +1 -1
  8. omlish/collections/multimaps.py +1 -1
  9. omlish/collections/persistent/treapmap.py +2 -1
  10. omlish/concurrent/threadlets.py +2 -2
  11. omlish/configs/formats.py +5 -4
  12. omlish/configs/processing/flattening.py +2 -1
  13. omlish/configs/processing/rewriting.py +2 -2
  14. omlish/configs/shadow.py +3 -2
  15. omlish/daemons/spawning.py +2 -2
  16. omlish/daemons/targets.py +1 -1
  17. omlish/daemons/waiting.py +2 -1
  18. omlish/dataclasses/impl/generation/base.py +3 -2
  19. omlish/dataclasses/impl/generation/compilation.py +2 -1
  20. omlish/dataclasses/impl/generation/ops.py +2 -2
  21. omlish/dataclasses/impl/generation/processor.py +1 -1
  22. omlish/dataclasses/metaclass/meta.py +1 -0
  23. omlish/dataclasses/tools/static.py +5 -1
  24. omlish/formats/dotenv.py +3 -1
  25. omlish/formats/logfmt.py +111 -0
  26. omlish/formats/yaml.py +1 -1
  27. omlish/funcs/builders.py +2 -1
  28. omlish/funcs/match.py +1 -1
  29. omlish/funcs/pairs.py +41 -23
  30. omlish/funcs/pipes.py +3 -1
  31. omlish/http/asgi.py +2 -1
  32. omlish/http/coro/client/io.py +3 -2
  33. omlish/http/coro/server/server.py +2 -2
  34. omlish/http/handlers.py +2 -1
  35. omlish/http/jwt.py +1 -1
  36. omlish/http/parsing.py +2 -2
  37. omlish/io/compress/base.py +3 -2
  38. omlish/io/coro/readers.py +4 -3
  39. omlish/io/fdio/handlers.py +3 -2
  40. omlish/io/fdio/pollers.py +3 -1
  41. omlish/lang/__init__.py +20 -8
  42. omlish/lang/attrs.py +3 -1
  43. omlish/lang/casing.py +3 -1
  44. omlish/lang/classes/abstract.py +35 -96
  45. omlish/lang/classes/virtual.py +2 -2
  46. omlish/lang/contextmanagers.py +6 -4
  47. omlish/lang/generators.py +2 -2
  48. omlish/lang/iterables.py +6 -6
  49. omlish/lang/objects.py +0 -58
  50. omlish/lang/outcomes.py +3 -1
  51. omlish/lang/typing.py +5 -24
  52. omlish/lite/abstract.py +119 -0
  53. omlish/lite/contextmanagers.py +4 -1
  54. omlish/lite/inject.py +9 -9
  55. omlish/lite/marshal.py +230 -114
  56. omlish/lite/maybes.py +3 -1
  57. omlish/lite/maysync.py +4 -2
  58. omlish/lite/objects.py +81 -0
  59. omlish/lite/reflect.py +0 -15
  60. omlish/lite/timeouts.py +3 -1
  61. omlish/lite/wrappers.py +23 -0
  62. omlish/logs/abc.py +21 -5
  63. omlish/logs/all.py +14 -3
  64. omlish/logs/configs.py +13 -10
  65. omlish/logs/levels.py +4 -0
  66. omlish/logs/protocol.py +77 -39
  67. omlish/marshal/__init__.py +1 -0
  68. omlish/os/atomics.py +3 -2
  69. omlish/os/deathpacts/base.py +4 -2
  70. omlish/os/forkhooks.py +2 -2
  71. omlish/os/pidfiles/pinning.py +2 -1
  72. omlish/reflect/types.py +4 -3
  73. omlish/secrets/crypto.py +1 -1
  74. omlish/sockets/bind.py +2 -1
  75. omlish/sockets/handlers.py +3 -2
  76. omlish/sockets/server/handlers.py +2 -1
  77. omlish/sockets/server/server.py +4 -3
  78. omlish/sql/api/base.py +2 -2
  79. omlish/subprocesses/asyncs.py +2 -1
  80. omlish/subprocesses/base.py +2 -2
  81. omlish/subprocesses/maysync.py +1 -2
  82. omlish/subprocesses/run.py +2 -1
  83. omlish/subprocesses/sync.py +2 -1
  84. omlish/term/coloring.py +3 -1
  85. omlish/testing/pytest/plugins/asyncs/backends/base.py +3 -1
  86. omlish/testing/unittest/loading.py +2 -2
  87. omlish/text/asdl.py +4 -3
  88. {omlish-0.0.0.dev420.dist-info → omlish-0.0.0.dev421.dist-info}/METADATA +1 -1
  89. {omlish-0.0.0.dev420.dist-info → omlish-0.0.0.dev421.dist-info}/RECORD +93 -88
  90. {omlish-0.0.0.dev420.dist-info → omlish-0.0.0.dev421.dist-info}/WHEEL +0 -0
  91. {omlish-0.0.0.dev420.dist-info → omlish-0.0.0.dev421.dist-info}/entry_points.txt +0 -0
  92. {omlish-0.0.0.dev420.dist-info → omlish-0.0.0.dev421.dist-info}/licenses/LICENSE +0 -0
  93. {omlish-0.0.0.dev420.dist-info → omlish-0.0.0.dev421.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,5 @@
1
1
  # ruff: noqa: UP006 UP007 UP045
2
2
  # @omlish-lite
3
- import abc
4
3
  import contextlib
5
4
  import logging
6
5
  import os
@@ -8,6 +7,7 @@ import subprocess
8
7
  import time
9
8
  import typing as ta
10
9
 
10
+ from ..lite.abstract import Abstract
11
11
  from ..lite.timeouts import Timeout
12
12
  from .wrap import subprocess_maybe_shell_wrap_exec
13
13
 
@@ -54,7 +54,7 @@ class VerboseCalledProcessError(subprocess.CalledProcessError):
54
54
  return msg
55
55
 
56
56
 
57
- class BaseSubprocesses(abc.ABC): # noqa
57
+ class BaseSubprocesses(Abstract):
58
58
  DEFAULT_LOGGER: ta.ClassVar[ta.Optional[logging.Logger]] = None
59
59
 
60
60
  def __init__(
@@ -1,6 +1,5 @@
1
1
  # ruff: noqa: UP006 UP007 UP045
2
2
  # @omlish-lite
3
- import abc
4
3
  import sys
5
4
  import typing as ta
6
5
 
@@ -14,7 +13,7 @@ from .sync import AbstractSubprocesses
14
13
  ##
15
14
 
16
15
 
17
- class MaysyncSubprocesses(AbstractAsyncSubprocesses, abc.ABC):
16
+ class MaysyncSubprocesses(AbstractAsyncSubprocesses):
18
17
  def __init__(
19
18
  self,
20
19
  subprocesses: AbstractSubprocesses,
@@ -4,6 +4,7 @@ import abc
4
4
  import dataclasses as dc
5
5
  import typing as ta
6
6
 
7
+ from ..lite.abstract import Abstract
7
8
  from ..lite.check import check
8
9
  from ..lite.timeouts import TimeoutLike
9
10
 
@@ -123,7 +124,7 @@ SubprocessRun._FIELD_NAMES = frozenset(fld.name for fld in dc.fields(SubprocessR
123
124
  ##
124
125
 
125
126
 
126
- class SubprocessRunnable(abc.ABC, ta.Generic[T]):
127
+ class SubprocessRunnable(Abstract, ta.Generic[T]):
127
128
  @abc.abstractmethod
128
129
  def make_run(self) -> SubprocessRun:
129
130
  raise NotImplementedError
@@ -10,6 +10,7 @@ import subprocess
10
10
  import sys
11
11
  import typing as ta
12
12
 
13
+ from ..lite.abstract import Abstract
13
14
  from ..lite.timeouts import TimeoutLike
14
15
  from .base import BaseSubprocesses
15
16
  from .run import SubprocessRun
@@ -19,7 +20,7 @@ from .run import SubprocessRunOutput
19
20
  ##
20
21
 
21
22
 
22
- class AbstractSubprocesses(BaseSubprocesses, abc.ABC):
23
+ class AbstractSubprocesses(BaseSubprocesses, Abstract):
23
24
  @abc.abstractmethod
24
25
  def run_(self, run: SubprocessRun) -> SubprocessRunOutput:
25
26
  raise NotImplementedError
omlish/term/coloring.py CHANGED
@@ -4,6 +4,8 @@ import enum
4
4
  import os
5
5
  import typing as ta
6
6
 
7
+ from ..lite.abstract import Abstract
8
+
7
9
 
8
10
  ##
9
11
 
@@ -15,7 +17,7 @@ class TermColor(enum.Enum):
15
17
  BLUE = enum.auto()
16
18
 
17
19
 
18
- class TermColoring(abc.ABC):
20
+ class TermColoring(Abstract):
19
21
  @abc.abstractmethod
20
22
  def color(self, c: TermColor, s: str) -> str:
21
23
  raise NotImplementedError
@@ -1,10 +1,12 @@
1
1
  import abc
2
2
 
3
+ from ...... import lang
4
+
3
5
 
4
6
  ##
5
7
 
6
8
 
7
- class AsyncsBackend(abc.ABC):
9
+ class AsyncsBackend(lang.Abstract):
8
10
  @property
9
11
  @abc.abstractmethod
10
12
  def name(self) -> str:
@@ -37,12 +37,12 @@ https://docs.python.org/3/library/unittest.html#command-line-interface
37
37
  #
38
38
  # 8. By copying, installing or otherwise using Python, Licensee agrees to be bound by the terms and conditions of this
39
39
  # License Agreement.
40
- import abc
41
40
  import dataclasses as dc
42
41
  import types
43
42
  import typing as ta
44
43
  import unittest
45
44
 
45
+ from ...lite.abstract import Abstract
46
46
  from .types import UnittestTest
47
47
 
48
48
 
@@ -65,7 +65,7 @@ class UnittestTargetLoader:
65
65
 
66
66
  #
67
67
 
68
- class Target(abc.ABC): # noqa
68
+ class Target(Abstract):
69
69
  pass
70
70
 
71
71
  class ModuleTarget(Target):
omlish/text/asdl.py CHANGED
@@ -1,3 +1,4 @@
1
+ # ruff: noqa: N802
1
2
  """
2
3
  https://github.com/python/cpython/blob/21d2a9ab2f4dcbf1be462d3b7f7a231a46bc1cb7/Parser/asdl.py
3
4
 
@@ -54,7 +55,6 @@ constructor ::= ConstructorId [fields]
54
55
  #
55
56
  # 8. By copying, installing or otherwise using Python, Licensee agrees to be bound by the terms and conditions of this
56
57
  # License Agreement.
57
- # ruff: noqa: N802
58
58
  import abc
59
59
  import dataclasses as dc
60
60
  import enum
@@ -63,6 +63,7 @@ import typing as ta
63
63
 
64
64
  from .. import cached
65
65
  from .. import check
66
+ from .. import lang
66
67
 
67
68
 
68
69
  ##
@@ -73,7 +74,7 @@ from .. import check
73
74
  # parsed. This module parses Asdl files and uses a simple AST to represent them. See the EBNF at the top of the file to
74
75
  # understand the logical connection between the various node types.
75
76
 
76
- class Ast(abc.ABC):
77
+ class Ast(lang.Abstract):
77
78
  @abc.abstractmethod
78
79
  def __repr__(self) -> str:
79
80
  raise NotImplementedError
@@ -434,7 +435,7 @@ class FlatField:
434
435
 
435
436
 
436
437
  @dc.dataclass(frozen=True)
437
- class FlatNode(abc.ABC):
438
+ class FlatNode(lang.Abstract):
438
439
  name: str
439
440
  fields: ta.Sequence[FlatField] = dc.field(default=(), kw_only=True)
440
441
  attributes: ta.Sequence[FlatField] = dc.field(default=(), kw_only=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omlish
3
- Version: 0.0.0.dev420
3
+ Version: 0.0.0.dev421
4
4
  Summary: omlish
5
5
  Author: wrmsr
6
6
  License-Expression: BSD-3-Clause