omlish 0.0.0.dev362__py3-none-any.whl → 0.0.0.dev363__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.

Potentially problematic release.


This version of omlish might be problematic. Click here for more details.

Files changed (106) hide show
  1. omlish/.manifests.json +1 -1
  2. omlish/__about__.py +2 -2
  3. omlish/algorithm/distribute.py +3 -0
  4. omlish/algorithm/toposort.py +3 -0
  5. omlish/algorithm/unify.py +3 -0
  6. omlish/codecs/chain.py +3 -0
  7. omlish/codecs/funcs.py +3 -0
  8. omlish/concurrent/executors.py +3 -0
  9. omlish/configs/nginx.py +3 -0
  10. omlish/configs/types.py +1 -1
  11. omlish/daemons/reparent.py +3 -0
  12. omlish/dataclasses/api/classes/conversion.py +1 -1
  13. omlish/dataclasses/processing/priority.py +3 -0
  14. omlish/diag/pydevd.py +3 -0
  15. omlish/diag/replserver/console.py +3 -0
  16. omlish/diag/replserver/server.py +3 -0
  17. omlish/docker/cli.py +3 -0
  18. omlish/docker/compose.py +3 -0
  19. omlish/docker/manifests.py +3 -0
  20. omlish/formats/json/backends/base.py +3 -0
  21. omlish/formats/json/literals.py +1 -1
  22. omlish/formats/json5/__init__.py +4 -0
  23. omlish/formats/json5/codec.py +19 -0
  24. omlish/formats/json5/rendering.py +1 -1
  25. omlish/formats/props.py +3 -0
  26. omlish/formats/toml/writer.py +3 -0
  27. omlish/http/coro/fdio.py +3 -0
  28. omlish/http/coro/simple.py +3 -0
  29. omlish/http/dates.py +3 -0
  30. omlish/http/multipart.py +3 -0
  31. omlish/http/versions.py +3 -0
  32. omlish/io/compress/base.py +3 -0
  33. omlish/io/fileno.py +3 -0
  34. omlish/io/pyio.py +3 -0
  35. omlish/lang/__init__.py +1 -1
  36. omlish/lang/strings.py +1 -1
  37. omlish/lifecycles/abstract.py +3 -0
  38. omlish/lifecycles/base.py +3 -0
  39. omlish/lifecycles/contextmanagers.py +3 -0
  40. omlish/lifecycles/controller.py +3 -0
  41. omlish/lifecycles/manager.py +3 -0
  42. omlish/lifecycles/states.py +3 -0
  43. omlish/lifecycles/transitions.py +3 -0
  44. omlish/lite/pycharm.py +3 -0
  45. omlish/lite/runtime.py +3 -0
  46. omlish/lite/secrets.py +3 -0
  47. omlish/manifests/types.py +3 -0
  48. omlish/marshal/naming.py +3 -0
  49. omlish/marshal/proxy.py +3 -0
  50. omlish/marshal/registries.py +3 -0
  51. omlish/multiprocessing/proxies.py +3 -0
  52. omlish/multiprocessing/spawn.py +3 -0
  53. omlish/os/deathsig.py +3 -0
  54. omlish/os/fcntl.py +3 -0
  55. omlish/os/filemodes.py +3 -0
  56. omlish/os/files.py +3 -0
  57. omlish/os/linux.py +3 -0
  58. omlish/os/mangle.py +1 -1
  59. omlish/os/paths.py +3 -0
  60. omlish/os/pidfiles/cli.py +3 -0
  61. omlish/os/signals.py +3 -0
  62. omlish/os/sizes.py +3 -0
  63. omlish/os/temp.py +3 -0
  64. omlish/reflect/ops.py +3 -0
  65. omlish/reflect/subst.py +3 -0
  66. omlish/specs/irc/messages/messages.py +1 -1
  67. omlish/specs/irc/numerics/formats.py +3 -0
  68. omlish/specs/irc/protocol/message.py +3 -0
  69. omlish/specs/irc/protocol/nuh.py +3 -0
  70. omlish/specs/irc/protocol/parsing.py +3 -0
  71. omlish/specs/irc/protocol/rendering.py +3 -0
  72. omlish/specs/irc/protocol/tags.py +3 -0
  73. omlish/specs/irc/protocol/utils.py +3 -0
  74. omlish/specs/jsonrpc/errors.py +3 -0
  75. omlish/specs/jsonrpc/marshal.py +3 -0
  76. omlish/sql/alchemy/asyncs.py +6 -3
  77. omlish/sql/alchemy/duckdb.py +3 -0
  78. omlish/sql/alchemy/exprs.py +3 -0
  79. omlish/sql/alchemy/secrets.py +4 -1
  80. omlish/sql/alchemy/sqlean.py +3 -0
  81. omlish/sql/tabledefs/alchemy.py +3 -0
  82. omlish/sql/tabledefs/dtypes.py +3 -0
  83. omlish/sql/tabledefs/lower.py +3 -0
  84. omlish/sql/tabledefs/marshal.py +3 -0
  85. omlish/term/vt100/c.py +3 -0
  86. omlish/testing/pytest/marks.py +3 -0
  87. omlish/testing/pytest/plugins/asyncs/backends/asyncio.py +3 -0
  88. omlish/testing/pytest/plugins/asyncs/backends/base.py +3 -0
  89. omlish/testing/pytest/plugins/asyncs/backends/trio.py +3 -0
  90. omlish/testing/pytest/plugins/asyncs/backends/trio_asyncio.py +3 -0
  91. omlish/testing/pytest/plugins/asyncs/utils.py +3 -0
  92. omlish/testing/pytest/plugins/depskip.py +3 -0
  93. omlish/testing/pytest/plugins/logging.py +3 -0
  94. omlish/testing/pytest/plugins/managermarks.py +3 -0
  95. omlish/testing/pytest/plugins/pydevd.py +3 -0
  96. omlish/testing/pytest/plugins/repeat.py +3 -0
  97. omlish/testing/pytest/plugins/skips.py +3 -0
  98. omlish/testing/pytest/plugins/spacing.py +3 -0
  99. omlish/testing/pytest/plugins/utils.py +3 -0
  100. omlish/text/go/quoting.py +3 -0
  101. {omlish-0.0.0.dev362.dist-info → omlish-0.0.0.dev363.dist-info}/METADATA +1 -1
  102. {omlish-0.0.0.dev362.dist-info → omlish-0.0.0.dev363.dist-info}/RECORD +106 -106
  103. {omlish-0.0.0.dev362.dist-info → omlish-0.0.0.dev363.dist-info}/WHEEL +0 -0
  104. {omlish-0.0.0.dev362.dist-info → omlish-0.0.0.dev363.dist-info}/entry_points.txt +0 -0
  105. {omlish-0.0.0.dev362.dist-info → omlish-0.0.0.dev363.dist-info}/licenses/LICENSE +0 -0
  106. {omlish-0.0.0.dev362.dist-info → omlish-0.0.0.dev363.dist-info}/top_level.txt +0 -0
omlish/os/pidfiles/cli.py CHANGED
@@ -12,6 +12,9 @@ from ..pidfiles.pinning import PidfilePinner
12
12
  from ..signals import parse_signal
13
13
 
14
14
 
15
+ ##
16
+
17
+
15
18
  class Cli(ap.Cli):
16
19
  _PIDFILE_ARGS: ta.ClassVar[ta.Sequence[ap.Arg]] = [
17
20
  ap.arg('pid-file'),
omlish/os/signals.py CHANGED
@@ -4,6 +4,9 @@ import signal
4
4
  import typing as ta
5
5
 
6
6
 
7
+ ##
8
+
9
+
7
10
  def parse_signal(s: ta.Union[int, str]) -> int:
8
11
  if isinstance(s, int):
9
12
  return s
omlish/os/sizes.py CHANGED
@@ -1,6 +1,9 @@
1
1
  import resource
2
2
 
3
3
 
4
+ ##
5
+
6
+
4
7
  PAGE_SIZE = resource.getpagesize()
5
8
 
6
9
 
omlish/os/temp.py CHANGED
@@ -9,6 +9,9 @@ import typing as ta
9
9
  from .files import unlink_if_exists
10
10
 
11
11
 
12
+ ##
13
+
14
+
12
15
  def make_temp_file(**kwargs: ta.Any) -> str:
13
16
  file_fd, file = tempfile.mkstemp(**kwargs)
14
17
  os.close(file_fd)
omlish/reflect/ops.py CHANGED
@@ -13,6 +13,9 @@ from .types import get_type_var_bound
13
13
  from .types import type_
14
14
 
15
15
 
16
+ ##
17
+
18
+
16
19
  def strip_objs(ty: Type) -> Type:
17
20
  if isinstance(ty, (type, ta.TypeVar, NewType, Any)):
18
21
  return ty
omlish/reflect/subst.py CHANGED
@@ -22,6 +22,9 @@ else:
22
22
  cache = lang.proxy_import('.collections.cache', __package__)
23
23
 
24
24
 
25
+ ##
26
+
27
+
25
28
  def get_type_var_replacements(ty: Type) -> ta.Mapping[ta.TypeVar, Type]:
26
29
  if isinstance(ty, Generic):
27
30
  return dict(zip(ty.params, ty.args))
@@ -18,7 +18,7 @@ from .base import MessageFormat
18
18
  from .base import list_pair_params_unpacker
19
19
 
20
20
 
21
- #
21
+ ##
22
22
 
23
23
 
24
24
  _REGISTERED_IRC_MESSAGES_BY_NAME: dict[str, list[type['Message']]] = {}
@@ -9,6 +9,9 @@ FormatPart: ta.TypeAlias = ta.Union[str, 'Formats.Optional', 'Formats.Variadic']
9
9
  FormatParts: ta.TypeAlias = ta.Sequence[FormatPart]
10
10
 
11
11
 
12
+ ##
13
+
14
+
12
15
  class Formats(lang.Namespace):
13
16
  @dc.dataclass(frozen=True)
14
17
  class Name:
@@ -6,6 +6,9 @@ import dataclasses as dc
6
6
  import typing as ta
7
7
 
8
8
 
9
+ ##
10
+
11
+
9
12
  @dc.dataclass(frozen=True)
10
13
  class Message:
11
14
  source: str | None
@@ -4,6 +4,9 @@ import typing as ta
4
4
  from .errors import MalformedNuhError
5
5
 
6
6
 
7
+ ##
8
+
9
+
7
10
  @dc.dataclass(frozen=True)
8
11
  class Nuh:
9
12
  name: str | None = None
@@ -12,6 +12,9 @@ from .utils import trim_initial_spaces
12
12
  from .utils import truncate_utf8_safe
13
13
 
14
14
 
15
+ ##
16
+
17
+
15
18
  class ParsedLine(ta.NamedTuple):
16
19
  message: Message
17
20
 
@@ -15,6 +15,9 @@ from .tags import validate_tag_value
15
15
  from .utils import find_utf8_truncation_point
16
16
 
17
17
 
18
+ ##
19
+
20
+
18
21
  def param_requires_trailing(param: str) -> bool:
19
22
  return len(param) == 0 or ' ' in param or param[0] == ':'
20
23
 
@@ -1,6 +1,9 @@
1
1
  from .errors import InvalidTagContentError
2
2
 
3
3
 
4
+ ##
5
+
6
+
4
7
  # Mapping for escaping tag values
5
8
  TAG_VAL_TO_ESCAPE = {
6
9
  '\\': '\\\\',
@@ -2,6 +2,9 @@ import itertools
2
2
  import operator
3
3
 
4
4
 
5
+ ##
6
+
7
+
5
8
  def truncate_utf8_safe(string: str, length: int) -> str:
6
9
  return string[:length] \
7
10
  .encode('utf-8', 'ignore') \
@@ -2,6 +2,9 @@ from ... import dataclasses as dc
2
2
  from ... import lang
3
3
 
4
4
 
5
+ ##
6
+
7
+
5
8
  @dc.dataclass(frozen=True)
6
9
  class KnownError:
7
10
  code: int
@@ -9,6 +9,9 @@ from ...funcs import match as mfs
9
9
  from .types import NotSpecified
10
10
 
11
11
 
12
+ ##
13
+
14
+
12
15
  _NOT_SPECIFIED_RTY = rfl.type_(type[NotSpecified])
13
16
 
14
17
 
@@ -16,9 +16,12 @@ T = ta.TypeVar('T')
16
16
  P = ta.ParamSpec('P')
17
17
 
18
18
 
19
- AsyncEngineLike = ta.Union[saa.AsyncEngine, 'AsyncEngine']
20
- AsyncConnectionLike = ta.Union[saa.AsyncConnection, 'AsyncConnection']
21
- AsyncTransactionLike = ta.Union[saa.AsyncTransaction, 'AsyncTransaction']
19
+ AsyncEngineLike: ta.TypeAlias = ta.Union[saa.AsyncEngine, 'AsyncEngine']
20
+ AsyncConnectionLike: ta.TypeAlias = ta.Union[saa.AsyncConnection, 'AsyncConnection']
21
+ AsyncTransactionLike: ta.TypeAlias = ta.Union[saa.AsyncTransaction, 'AsyncTransaction']
22
+
23
+
24
+ ##
22
25
 
23
26
 
24
27
  class AsyncTransaction:
@@ -17,6 +17,9 @@ else:
17
17
  duckdb = lang.proxy_import('duckdb')
18
18
 
19
19
 
20
+ ##
21
+
22
+
20
23
  class ConnectionWrapper:
21
24
  def __init__(self, c: 'duckdb.DuckDBPyConnection') -> None:
22
25
  super().__init__()
@@ -2,6 +2,9 @@ import sqlalchemy as sa
2
2
  import sqlalchemy.ext.compiler
3
3
 
4
4
 
5
+ ##
6
+
7
+
5
8
  class paren(sa.sql.expression.UnaryExpression): # noqa
6
9
  __visit_name__ = 'paren'
7
10
  inherit_cache = True
@@ -2,7 +2,10 @@
2
2
  TODO:
3
3
  - sync/async...
4
4
  """
5
- from ..secrets import all as sec
5
+ from ...secrets import all as sec
6
+
7
+
8
+ ##
6
9
 
7
10
 
8
11
  class SqlFunctionSecrets(sec.Secrets):
@@ -2,6 +2,9 @@ import sqlalchemy as sa
2
2
  from sqlalchemy.dialects import sqlite as sal
3
3
 
4
4
 
5
+ ##
6
+
7
+
5
8
  class SqleanDialect(sal.dialect): # type: ignore
6
9
  name = 'sqlite__sqlean'
7
10
  driver = 'sqlean_engine'
@@ -10,6 +10,9 @@ import sqlalchemy.sql.schema
10
10
  from .tabledefs import TableDef
11
11
 
12
12
 
13
+ ##
14
+
15
+
13
16
  def build_sa_table(
14
17
  td: TableDef,
15
18
  *,
@@ -2,6 +2,9 @@ from ... import dataclasses as dc
2
2
  from ... import lang
3
3
 
4
4
 
5
+ ##
6
+
7
+
5
8
  @dc.dataclass(frozen=True)
6
9
  class Dtype(lang.Abstract, lang.Sealed):
7
10
  pass
@@ -13,6 +13,9 @@ from .elements import UpdatedAtTrigger
13
13
  from .tabledefs import TableDef
14
14
 
15
15
 
16
+ ##
17
+
18
+
16
19
  def lower_table_elements(td: TableDef) -> TableDef:
17
20
  todo: list[Element] = list(td.elements)[::-1]
18
21
  out: list[Element] = []
@@ -4,6 +4,9 @@ from .dtypes import Dtype
4
4
  from .elements import Element
5
5
 
6
6
 
7
+ ##
8
+
9
+
7
10
  def _install_poly(cls: type) -> None:
8
11
  p = msh.polymorphism_from_subclasses(cls, naming=msh.Naming.SNAKE)
9
12
  msh.install_standard_factories(
omlish/term/vt100/c.py CHANGED
@@ -9,6 +9,9 @@ from .states import StateTransition
9
9
  from .states import check_state_tables
10
10
 
11
11
 
12
+ ##
13
+
14
+
12
15
  def _pad(s: str, length: int) -> str:
13
16
  return s + ' ' * (length - len(s))
14
17
 
@@ -6,6 +6,9 @@ import pytest
6
6
  from .plugins.managermarks import ManagerMark
7
7
 
8
8
 
9
+ ##
10
+
11
+
9
12
  class gc_collect_after(ManagerMark): # noqa
10
13
  def __call__(self, item: pytest.Function) -> ta.Iterator[None]:
11
14
  try:
@@ -13,6 +13,9 @@ else:
13
13
  asyncio = lang.proxy_import('asyncio')
14
14
 
15
15
 
16
+ ##
17
+
18
+
16
19
  class AsyncioAsyncsBackend(AsyncsBackend):
17
20
  name = 'asyncio'
18
21
 
@@ -1,6 +1,9 @@
1
1
  import abc
2
2
 
3
3
 
4
+ ##
5
+
6
+
4
7
  class AsyncsBackend(abc.ABC):
5
8
  @property
6
9
  @abc.abstractmethod
@@ -34,6 +34,9 @@ else:
34
34
  trio = lang.proxy_import('trio', extras=['abc'])
35
35
 
36
36
 
37
+ ##
38
+
39
+
37
40
  class TrioAsyncsBackend(AsyncsBackend):
38
41
  name = 'trio'
39
42
 
@@ -36,6 +36,9 @@ else:
36
36
  trio_asyncio = lang.proxy_import('trio_asyncio')
37
37
 
38
38
 
39
+ ##
40
+
41
+
39
42
  class TrioAsyncioAsyncsBackend(AsyncsBackend):
40
43
  name = 'trio_asyncio'
41
44
 
@@ -2,6 +2,9 @@ import inspect
2
2
  import typing as ta
3
3
 
4
4
 
5
+ ##
6
+
7
+
5
8
  def is_coroutine_function(func: ta.Any) -> bool:
6
9
  return inspect.iscoroutinefunction(func) or getattr(func, '_is_coroutine', False)
7
10
 
@@ -16,6 +16,9 @@ from ._registry import register as register_plugin
16
16
  from .utils import find_plugin
17
17
 
18
18
 
19
+ ##
20
+
21
+
19
22
  @register_plugin
20
23
  class DepSkipPlugin:
21
24
  @dc.dataclass(frozen=True)
@@ -2,6 +2,9 @@ from ....logs import all as logs
2
2
  from ._registry import register
3
3
 
4
4
 
5
+ ##
6
+
7
+
5
8
  @register
6
9
  class LoggingPlugin:
7
10
  def pytest_addoption(self, parser):
@@ -8,6 +8,9 @@ from .... import lang
8
8
  from ._registry import register
9
9
 
10
10
 
11
+ ##
12
+
13
+
11
14
  class ManagerMark(lang.Abstract):
12
15
  def __init_subclass__(cls, **kwargs):
13
16
  super().__init_subclass__(**kwargs)
@@ -2,6 +2,9 @@ from ....diag import pydevd as opd
2
2
  from ._registry import register
3
3
 
4
4
 
5
+ ##
6
+
7
+
5
8
  @register
6
9
  class PydevdPlugin:
7
10
  def pytest_addoption(self, parser):
@@ -1,6 +1,9 @@
1
1
  from ._registry import register
2
2
 
3
3
 
4
+ ##
5
+
6
+
4
7
  PARAM_NAME = '__repeat'
5
8
 
6
9
 
@@ -8,6 +8,9 @@ import pytest
8
8
  from ._registry import register
9
9
 
10
10
 
11
+ ##
12
+
13
+
11
14
  @register
12
15
  class SkipsPlugin:
13
16
  def pytest_collection_modifyitems(self, session, items):
@@ -1,6 +1,9 @@
1
1
  from ._registry import register
2
2
 
3
3
 
4
+ ##
5
+
6
+
4
7
  @register
5
8
  class SpacingPlugin:
6
9
  def pytest_addoption(self, parser):
@@ -6,6 +6,9 @@ import pytest
6
6
  T = ta.TypeVar('T')
7
7
 
8
8
 
9
+ ##
10
+
11
+
9
12
  def find_plugin(pm: pytest.PytestPluginManager, ty: type[T]) -> T | None:
10
13
  lst = [p for p in pm.get_plugins() if isinstance(p, ty)]
11
14
  if not lst:
omlish/text/go/quoting.py CHANGED
@@ -23,6 +23,9 @@ https:#github.com/golang/go/blob/3d33437c450aa74014ea1d41cd986b6ee6266984/src/st
23
23
  # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24
24
 
25
25
 
26
+ ##
27
+
28
+
26
29
  def unhex(b: str) -> int | None:
27
30
  c = ord(b)
28
31
  if ord('0') <= c <= ord('9'):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omlish
3
- Version: 0.0.0.dev362
3
+ Version: 0.0.0.dev363
4
4
  Summary: omlish
5
5
  Author: wrmsr
6
6
  License: BSD-3-Clause