omlish 0.0.0.dev419__py3-none-any.whl → 0.0.0.dev420__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.
omlish/__about__.py CHANGED
@@ -1,5 +1,5 @@
1
- __version__ = '0.0.0.dev419'
2
- __revision__ = 'ec06deda53ea93f16a7dc690230fe51edce49e7b'
1
+ __version__ = '0.0.0.dev420'
2
+ __revision__ = '513bbdf392274f50320eb9577bd88bc0a683e1a5'
3
3
 
4
4
 
5
5
  #
omlish/configs/all.py CHANGED
@@ -1,47 +1,54 @@
1
- # ruff: noqa: I001
2
- from .classes import ( # noqa
3
- Configurable,
4
- )
1
+ # rufF: noqa: I001
2
+ from .. import lang as _lang
5
3
 
6
- from .formats import ( # noqa
7
- ConfigData as Data,
8
4
 
9
- ConfigLoader as Loader,
5
+ with _lang.auto_proxy_init(globals()):
6
+ ##
10
7
 
11
- ConfigRenderer as Renderer,
8
+ from .classes import ( # noqa
9
+ Configurable,
10
+ )
12
11
 
13
- ObjConfigData as ObjData,
12
+ from .formats import ( # noqa
13
+ ConfigData as Data,
14
14
 
15
- JsonConfigData as JsonData,
16
- JsonConfigLoader as JsonLoader,
17
- JsonConfigRenderer as JsonRenderer,
15
+ ConfigLoader as Loader,
18
16
 
19
- TomlConfigData as TomlData,
20
- TomlConfigLoader as TomlLoader,
21
- TomlConfigRenderer as TomlRenderer,
17
+ ConfigRenderer as Renderer,
22
18
 
23
- YamlConfigData as YamlData,
24
- YamlConfigLoader as YamlLoader,
25
- YamlConfigRenderer as YamlRenderer,
19
+ ObjConfigData as ObjData,
26
20
 
27
- IniConfigData as IniData,
28
- IniConfigLoader as IniLoader,
29
- IniConfigRenderer as IniRenderer,
21
+ JsonConfigData as JsonData,
22
+ JsonConfigLoader as JsonLoader,
23
+ JsonConfigRenderer as JsonRenderer,
30
24
 
31
- SwitchedConfigFileLoader as SwitchedFileLoader,
25
+ TomlConfigData as TomlData,
26
+ TomlConfigLoader as TomlLoader,
27
+ TomlConfigRenderer as TomlRenderer,
32
28
 
33
- DEFAULT_CONFIG_LOADERS as DEFAULT_LOADERS,
34
- DEFAULT_CONFIG_LOADER as DEFAULT_LOADER,
35
- DEFAULT_CONFIG_FILE_LOADER as DEFAULT_FILE_LOADER,
29
+ YamlConfigData as YamlData,
30
+ YamlConfigLoader as YamlLoader,
31
+ YamlConfigRenderer as YamlRenderer,
36
32
 
37
- SwitchedConfigRenderer as SwitchedRenderer,
33
+ IniConfigData as IniData,
34
+ IniConfigLoader as IniLoader,
35
+ IniConfigRenderer as IniRenderer,
38
36
 
39
- DEFAULT_CONFIG_RENDERERS as DEFAULT_RENDERERS,
40
- DEFAULT_CONFIG_RENDERER as DEFAULT_RENDERER,
41
- )
37
+ SwitchedConfigFileLoader as SwitchedFileLoader,
38
+
39
+ DEFAULT_CONFIG_LOADERS as DEFAULT_LOADERS,
40
+ DEFAULT_CONFIG_LOADER as DEFAULT_LOADER,
41
+ DEFAULT_CONFIG_FILE_LOADER as DEFAULT_FILE_LOADER,
42
+
43
+ SwitchedConfigRenderer as SwitchedRenderer,
44
+
45
+ DEFAULT_CONFIG_RENDERERS as DEFAULT_RENDERERS,
46
+ DEFAULT_CONFIG_RENDERER as DEFAULT_RENDERER,
47
+ )
48
+
49
+ from .types import ( # noqa
50
+ ConfigMap as Map,
51
+ )
42
52
 
43
- from .types import ( # noqa
44
- ConfigMap as Map,
45
- )
46
53
 
47
54
  from .processing import all as processing # noqa
@@ -1,37 +1,43 @@
1
1
  # ruff: noqa: I001
2
- from .flattening import ( # noqa
3
- ConfigFlattening as Flattening,
4
- )
2
+ from ... import lang as _lang
5
3
 
6
- from .inheritance import ( # noqa
7
- build_config_inherited_values as build_inherited_values,
8
- )
9
4
 
10
- from .matching import ( # noqa
11
- MatchingConfigRewriter as MatchingRewriter,
5
+ with _lang.auto_proxy_init(globals()):
6
+ ##
12
7
 
13
- matched_config_rewrite as matched_rewrite,
14
- )
8
+ from .flattening import ( # noqa
9
+ ConfigFlattening as Flattening,
10
+ )
15
11
 
16
- from .merging import ( # noqa
17
- merge_configs as merge,
18
- )
12
+ from .inheritance import ( # noqa
13
+ build_config_inherited_values as build_inherited_values,
14
+ )
19
15
 
20
- from .names import ( # noqa
21
- build_config_named_children as build_named_children,
22
- )
16
+ from .matching import ( # noqa
17
+ MatchingConfigRewriter as MatchingRewriter,
23
18
 
24
- from .rewriting import ( # noqa
25
- ConfigRewriterItem as RewriterItem,
26
- ConfigRewriterPath as RewriterPath,
19
+ matched_config_rewrite as matched_rewrite,
20
+ )
27
21
 
28
- RawConfigMetadata as RawMetadata,
22
+ from .merging import ( # noqa
23
+ merge_configs as merge,
24
+ )
29
25
 
30
- ConfigRewriter as Rewriter,
31
- )
26
+ from .names import ( # noqa
27
+ build_config_named_children as build_named_children,
28
+ )
32
29
 
33
- from .strings import ( # noqa
34
- StringConfigRewriter as StringRewriter,
30
+ from .rewriting import ( # noqa
31
+ ConfigRewriterItem as RewriterItem,
32
+ ConfigRewriterPath as RewriterPath,
35
33
 
36
- format_config_strings as format_strings,
37
- )
34
+ RawConfigMetadata as RawMetadata,
35
+
36
+ ConfigRewriter as Rewriter,
37
+ )
38
+
39
+ from .strings import ( # noqa
40
+ StringConfigRewriter as StringRewriter,
41
+
42
+ format_config_strings as format_strings,
43
+ )
@@ -2,9 +2,15 @@ import typing as ta
2
2
 
3
3
  from .... import lang
4
4
  from .base import Backend
5
- from .orjson import orjson_backend
6
5
  from .std import std_backend
7
- from .ujson import ujson_backend
6
+
7
+
8
+ if ta.TYPE_CHECKING:
9
+ from . import orjson as oj
10
+ from . import ujson as uj
11
+ else:
12
+ oj = lang.proxy_import('.orjson', __package__)
13
+ uj = lang.proxy_import('.ujson', __package__)
8
14
 
9
15
 
10
16
  ##
@@ -12,12 +18,13 @@ from .ujson import ujson_backend
12
18
 
13
19
  @lang.cached_function
14
20
  def default_backend() -> Backend:
15
- for fn in [
16
- orjson_backend,
17
- ujson_backend,
21
+ for (im, bm, fn) in [
22
+ ('orjson', oj, 'orjson_backend'),
23
+ ('ujson', uj, 'ujson_backend'),
18
24
  ]:
19
- if (be := fn()) is not None:
20
- return be
25
+ if lang.can_import(im):
26
+ if (be := getattr(bm, fn)()) is not None:
27
+ return be
21
28
 
22
29
  return std_backend()
23
30
 
omlish/logs/all.py CHANGED
@@ -1,50 +1,57 @@
1
- from .callers import ( # noqa
2
- LoggingCaller,
3
- )
1
+ # rufF: noqa: I001
2
+ from .. import lang as _lang
4
3
 
5
- from .color import ( # noqa
6
- ColorLogFormatter,
7
- )
8
4
 
9
- from .filters import ( # noqa
10
- TidLogFilter,
11
- )
5
+ with _lang.auto_proxy_init(globals()):
6
+ ##
12
7
 
13
- from .handlers import ( # noqa
14
- ListHandler,
15
- )
8
+ from .callers import ( # noqa
9
+ LoggingCaller,
10
+ )
16
11
 
17
- from .json import ( # noqa
18
- JsonLogFormatter,
19
- )
12
+ from .color import ( # noqa
13
+ ColorLogFormatter,
14
+ )
20
15
 
21
- from .noisy import ( # noqa
22
- silence_noisy_loggers,
23
- )
16
+ from .filters import ( # noqa
17
+ TidLogFilter,
18
+ )
24
19
 
25
- from .protocol import ( # noqa
26
- LogLevel,
20
+ from .handlers import ( # noqa
21
+ ListHandler,
22
+ )
27
23
 
28
- Logging,
29
- NopLogging,
30
- AbstractLogging,
31
- StdlibLogging,
32
- )
24
+ from .json import ( # noqa
25
+ JsonLogFormatter,
26
+ )
33
27
 
34
- from .proxy import ( # noqa
35
- ProxyLogFilterer,
36
- ProxyLogHandler,
37
- )
28
+ from .noisy import ( # noqa
29
+ silence_noisy_loggers,
30
+ )
38
31
 
39
- from .standard import ( # noqa
40
- STANDARD_LOG_FORMAT_PARTS,
41
- StandardLogFormatter,
32
+ from .protocol import ( # noqa
33
+ LogLevel,
42
34
 
43
- StandardConfiguredLogHandler,
35
+ Logging,
36
+ NopLogging,
37
+ AbstractLogging,
38
+ StdlibLogging,
39
+ )
44
40
 
45
- configure_standard_logging,
46
- )
41
+ from .proxy import ( # noqa
42
+ ProxyLogFilterer,
43
+ ProxyLogHandler,
44
+ )
47
45
 
48
- from .utils import ( # noqa
49
- error_logging,
50
- )
46
+ from .standard import ( # noqa
47
+ STANDARD_LOG_FORMAT_PARTS,
48
+ StandardLogFormatter,
49
+
50
+ StandardConfiguredLogHandler,
51
+
52
+ configure_standard_logging,
53
+ )
54
+
55
+ from .utils import ( # noqa
56
+ error_logging,
57
+ )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omlish
3
- Version: 0.0.0.dev419
3
+ Version: 0.0.0.dev420
4
4
  Summary: omlish
5
5
  Author: wrmsr
6
6
  License-Expression: BSD-3-Clause
@@ -1,5 +1,5 @@
1
1
  omlish/.manifests.json,sha256=FLw7xkPiSXuImZgqSP8BwrEib2R1doSzUPLUkc-QUIA,8410
2
- omlish/__about__.py,sha256=wXkYG_Y6_dahHEzlSoF0MBVQcUkILpOeAz1OmAcP31I,3568
2
+ omlish/__about__.py,sha256=uRm_VoSuoclAZNM7pOcNk1eSNpSB38wavUCPKhOLSgE,3568
3
3
  omlish/__init__.py,sha256=SsyiITTuK0v74XpKV8dqNaCmjOlan1JZKrHQv5rWKPA,253
4
4
  omlish/c3.py,sha256=rer-TPOFDU6fYq_AWio_AmA-ckZ8JDY5shIzQ_yXfzA,8414
5
5
  omlish/cached.py,sha256=MLap_p0rdGoDIMVhXVHm1tsbcWobJF0OanoodV03Ju8,542
@@ -112,14 +112,14 @@ omlish/concurrent/executors.py,sha256=j2V8f4UW3sJJG_qn7ldi1R2yY2QmUQA3UCuNQvLj1W
112
112
  omlish/concurrent/futures.py,sha256=870tx8ELI8THvMnTrQoYIlEFKO9hM4KUrlehckJqKBU,4238
113
113
  omlish/concurrent/threadlets.py,sha256=JfirbTDJgy9Ouokz_VmHeAAPS7cih8qMUJrN-owwXD4,2423
114
114
  omlish/configs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
115
- omlish/configs/all.py,sha256=xTfR7NySnlIeqhk0GlUOncPnWZ97cLhCtRDlN_Ny8og,1107
115
+ omlish/configs/all.py,sha256=wLwksF9kjWjh7pV8c7UA3KfvwvG1QaJMDXuVqbH1rM8,1310
116
116
  omlish/configs/classes.py,sha256=sWBL1K90Ix5E-N_A6Uz7s-djpkS2rKEzOLFYB8pHk9k,1173
117
117
  omlish/configs/formats.py,sha256=TenrNVqsgY5mwWJv3XBTaLTCbLxdKZEkH1U_9M1sNd8,5337
118
118
  omlish/configs/nginx.py,sha256=b4fMI8dIZBUgOjmveRINrmmwSt8DO3y7nfvd-__YxDo,2062
119
119
  omlish/configs/shadow.py,sha256=rc-loE5ex2GFwvdQJXqJsnSQa-MNF6Mizh4FlirSYUo,2234
120
120
  omlish/configs/types.py,sha256=vANNURlIos3fR3fgcL2EMW5t6RevzSHU-BnVZgwIDOM,110
121
121
  omlish/configs/processing/__init__.py,sha256=eUBm0L6oZuwwM4vEuYx0pcCNdSTXaF7luur7jQz1qoc,210
122
- omlish/configs/processing/all.py,sha256=L23FOGn24As3jcB3B11R7PcHWXbYjkItrNq5ZEylPjA,784
122
+ omlish/configs/processing/all.py,sha256=BCoWKxywH5mViWQrKmLHry8faS45ZW9jItaypPK197c,967
123
123
  omlish/configs/processing/flattening.py,sha256=Tc8nl0CcjcEhct79LXqxItTKK7McbIwhdgfwPksbGTE,5027
124
124
  omlish/configs/processing/inheritance.py,sha256=1h6iJYeRjWwfAXltnBprvi55LG4HOeGGls3-YwhX8uY,1224
125
125
  omlish/configs/processing/matching.py,sha256=FNgWaDOZ72Ay9rsYdHK3E_KdEi07mMEVdAfwf817dYo,1520
@@ -278,7 +278,7 @@ omlish/formats/json/_antlr/JsonVisitor.py,sha256=b97Pk5JKWm1a3b6WNYESTXvuqvJX_Jt
278
278
  omlish/formats/json/_antlr/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
279
279
  omlish/formats/json/backends/__init__.py,sha256=K5nAP-fCgUvaSylHqgRvmJp6j6PTWdMjrNhvMouKrFc,161
280
280
  omlish/formats/json/backends/base.py,sha256=Sv3lfDEx8X8t1yVerOGyN-ra3LeJDTKzuSsW9EBBxIk,1119
281
- omlish/formats/json/backends/default.py,sha256=PXVM8kM0LWRA1-aEAJ0JMfu9BDuHpPFCDgBme6JNdAw,1317
281
+ omlish/formats/json/backends/default.py,sha256=3AaANq69dQPUykvRN-U1VuLDM_TZORCdsiyl_HhSe1M,1538
282
282
  omlish/formats/json/backends/jiter.py,sha256=8qv_XWGpcupPtVm6Z_egHio_iY1Kk8eqkvXTF6fVZr4,1193
283
283
  omlish/formats/json/backends/orjson.py,sha256=X2jhKgUYYwaVuAppPQmfyncbOs2PJ7drqH5BioP-AYI,3831
284
284
  omlish/formats/json/backends/std.py,sha256=Hhiug5CkC1TXLFrE9rnMR2on7xP-RliSvfYA9ill_U0,3159
@@ -504,7 +504,7 @@ omlish/lite/types.py,sha256=QM9whf55r7TmmQBRApIWSlyVKsl1p_jcut_YheyZMFY,146
504
504
  omlish/lite/typing.py,sha256=m2CyJTz2OVOCPRvp-0UuEx7oleZgXqs3rYXijE0bTsA,1280
505
505
  omlish/logs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
506
506
  omlish/logs/abc.py,sha256=ho4ABKYMKX-V7g4sp1BByuOLzslYzLlQ0MESmjEpT-o,8005
507
- omlish/logs/all.py,sha256=Er2NIcDvlMpuAcRr9b_uMHeoERU7I6lu5oLrDGRdV0U,728
507
+ omlish/logs/all.py,sha256=-T07Nytk6bhSbK5qS2Ayuyr4LGoPd_J3hFbRNUgJDBU,977
508
508
  omlish/logs/callers.py,sha256=CBYX1PE5u7rneVzP8Qi472xMhI-k2JmXfJAzUxpdN7I,1154
509
509
  omlish/logs/color.py,sha256=u1-6ulsxTWMPyeKu-pCQyF5_ljuEeuG4FG7i6DTzHe0,670
510
510
  omlish/logs/configs.py,sha256=XOc8rWxfPpPMxJESVD2mLCUoLtbQnGnZwvYhhqe7DD8,772
@@ -923,9 +923,9 @@ omlish/typedvalues/marshal.py,sha256=AtBz7Jq-BfW8vwM7HSxSpR85JAXmxK2T0xDblmm1HI0
923
923
  omlish/typedvalues/of_.py,sha256=UXkxSj504WI2UrFlqdZJbu2hyDwBhL7XVrc2qdR02GQ,1309
924
924
  omlish/typedvalues/reflect.py,sha256=PAvKW6T4cW7u--iX80w3HWwZUS3SmIZ2_lQjT65uAyk,1026
925
925
  omlish/typedvalues/values.py,sha256=ym46I-q2QJ_6l4UlERqv3yj87R-kp8nCKMRph0xQ3UA,1307
926
- omlish-0.0.0.dev419.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
927
- omlish-0.0.0.dev419.dist-info/METADATA,sha256=G3EL-J9uLveMopCZ00adkjfg8wh3IqMtmQm8iyZ0iGc,19242
928
- omlish-0.0.0.dev419.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
929
- omlish-0.0.0.dev419.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
930
- omlish-0.0.0.dev419.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
931
- omlish-0.0.0.dev419.dist-info/RECORD,,
926
+ omlish-0.0.0.dev420.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
927
+ omlish-0.0.0.dev420.dist-info/METADATA,sha256=ZwplIFVjMYcmGhKiRh67ax-8ORx9DtfzyrB2WcPlzps,19242
928
+ omlish-0.0.0.dev420.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
929
+ omlish-0.0.0.dev420.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
930
+ omlish-0.0.0.dev420.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
931
+ omlish-0.0.0.dev420.dist-info/RECORD,,