omlish 0.0.0.dev377__py3-none-any.whl → 0.0.0.dev379__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 +3 -3
- omlish/asyncs/anyio/utils.py +1 -1
- omlish/dataclasses/__init__.py +22 -1
- omlish/dispatch/dispatch.py +2 -0
- omlish/dispatch/methods.py +15 -0
- omlish/marshal/objects/metadata.py +1 -1
- {omlish-0.0.0.dev377.dist-info → omlish-0.0.0.dev379.dist-info}/METADATA +5 -5
- {omlish-0.0.0.dev377.dist-info → omlish-0.0.0.dev379.dist-info}/RECORD +12 -12
- {omlish-0.0.0.dev377.dist-info → omlish-0.0.0.dev379.dist-info}/WHEEL +0 -0
- {omlish-0.0.0.dev377.dist-info → omlish-0.0.0.dev379.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev377.dist-info → omlish-0.0.0.dev379.dist-info}/licenses/LICENSE +0 -0
- {omlish-0.0.0.dev377.dist-info → omlish-0.0.0.dev379.dist-info}/top_level.txt +0 -0
omlish/__about__.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
__version__ = '0.0.0.
|
2
|
-
__revision__ = '
|
1
|
+
__version__ = '0.0.0.dev379'
|
2
|
+
__revision__ = '3b29e6acb4dbc2fa38be6032e7cc4b92615f2941'
|
3
3
|
|
4
4
|
|
5
5
|
#
|
@@ -32,7 +32,7 @@ class Project(ProjectBase):
|
|
32
32
|
|
33
33
|
optional_dependencies = {
|
34
34
|
'async': [
|
35
|
-
'anyio ~= 4.
|
35
|
+
'anyio ~= 4.10',
|
36
36
|
'sniffio ~= 1.3',
|
37
37
|
|
38
38
|
'greenlet ~= 3.2',
|
omlish/asyncs/anyio/utils.py
CHANGED
@@ -53,7 +53,7 @@ def get_current_task() -> anyio.TaskInfo | None:
|
|
53
53
|
##
|
54
54
|
|
55
55
|
|
56
|
-
async def call_with_task_group(
|
56
|
+
async def call_with_task_group( # type: ignore[return] # ????
|
57
57
|
fn: ta.Callable[ta.Concatenate[anyio.abc.TaskGroup, P], ta.Awaitable[T]],
|
58
58
|
*args: ta.Any,
|
59
59
|
**kwargs: ta.Any,
|
omlish/dataclasses/__init__.py
CHANGED
@@ -18,6 +18,8 @@ from dataclasses import ( # noqa
|
|
18
18
|
fields,
|
19
19
|
|
20
20
|
is_dataclass,
|
21
|
+
|
22
|
+
replace,
|
21
23
|
)
|
22
24
|
|
23
25
|
from .api import ( # noqa
|
@@ -34,7 +36,7 @@ from .tools.as_ import ( # noqa
|
|
34
36
|
)
|
35
37
|
|
36
38
|
from .concerns.replace import ( # noqa
|
37
|
-
replace,
|
39
|
+
replace as xreplace,
|
38
40
|
)
|
39
41
|
|
40
42
|
|
@@ -46,6 +48,8 @@ globals()['field'] = xfield
|
|
46
48
|
globals()['dataclass'] = xdataclass
|
47
49
|
globals()['make_dataclass'] = xmake_dataclass
|
48
50
|
|
51
|
+
globals()['replace'] = xreplace
|
52
|
+
|
49
53
|
|
50
54
|
##
|
51
55
|
# additional interface
|
@@ -91,6 +95,23 @@ from .reflection import ( # noqa
|
|
91
95
|
reflect,
|
92
96
|
)
|
93
97
|
|
98
|
+
from .specs import ( # noqa
|
99
|
+
CoerceFn,
|
100
|
+
ValidateFn,
|
101
|
+
ReprFn,
|
102
|
+
|
103
|
+
InitFn,
|
104
|
+
ClassValidateFn,
|
105
|
+
|
106
|
+
DefaultFactory,
|
107
|
+
|
108
|
+
FieldType,
|
109
|
+
|
110
|
+
FieldSpec,
|
111
|
+
|
112
|
+
ClassSpec,
|
113
|
+
)
|
114
|
+
|
94
115
|
from .tools.as_ import ( # noqa
|
95
116
|
shallow_asdict,
|
96
117
|
shallow_astuple,
|
omlish/dispatch/dispatch.py
CHANGED
@@ -13,6 +13,8 @@ T = ta.TypeVar('T')
|
|
13
13
|
|
14
14
|
|
15
15
|
class Dispatcher(ta.Generic[T]):
|
16
|
+
"""Shared dispatching system for functions and methods. Logic directly mimics `functools.singledispatch`."""
|
17
|
+
|
16
18
|
def __init__(self, find_impl: ta.Callable[[type, ta.Mapping[type, T]], T | None] | None = None) -> None:
|
17
19
|
super().__init__()
|
18
20
|
|
omlish/dispatch/methods.py
CHANGED
@@ -24,6 +24,21 @@ P = ta.ParamSpec('P')
|
|
24
24
|
|
25
25
|
|
26
26
|
class Method(ta.Generic[P, R]):
|
27
|
+
"""
|
28
|
+
MRO-honoring instancemethod singledispatch. There are many ways to do this, and this one is attr name based: a class
|
29
|
+
is considered to have method implementations that have been registered to a given method based on whether or not
|
30
|
+
they are accessible by a non-shadowed, MRO-resolved named attribute on that class.
|
31
|
+
|
32
|
+
Care must be taken when overriding registered implementations from superclasses in subclasses - shadowing the name
|
33
|
+
of the superclass method will not automatically register the new method with the same name to the dispatch method -
|
34
|
+
it must be explicitly `@register`'ed itself. This is a feature, allowing for selective de-registration of
|
35
|
+
implementations in subclasses via name shadowing.
|
36
|
+
|
37
|
+
Methods have ability to choose to allow external installation of implementations outside of direct subclasses. This
|
38
|
+
is to be used *extremely* rarely - basically only in the rare case of externally extensible type hierarchies with
|
39
|
+
visitors.
|
40
|
+
"""
|
41
|
+
|
27
42
|
def __init__(
|
28
43
|
self,
|
29
44
|
func: ta.Callable,
|
@@ -50,7 +50,7 @@ class FieldMetadata:
|
|
50
50
|
mkw = {k: v for k, v in kwargs.items() if k not in FIELD_OPTIONS_KWARGS}
|
51
51
|
return dc.replace(
|
52
52
|
self,
|
53
|
-
**(dict(options=dc.replace(self.options, **okw)) if okw else {}),
|
53
|
+
**(dict(options=dc.replace(self.options, **okw)) if okw else {}), # type: ignore[arg-type]
|
54
54
|
**mkw,
|
55
55
|
)
|
56
56
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: omlish
|
3
|
-
Version: 0.0.0.
|
3
|
+
Version: 0.0.0.dev379
|
4
4
|
Summary: omlish
|
5
5
|
Author: wrmsr
|
6
6
|
License: BSD-3-Clause
|
@@ -13,7 +13,7 @@ Classifier: Operating System :: POSIX
|
|
13
13
|
Requires-Python: >=3.13
|
14
14
|
License-File: LICENSE
|
15
15
|
Provides-Extra: all
|
16
|
-
Requires-Dist: anyio~=4.
|
16
|
+
Requires-Dist: anyio~=4.10; extra == "all"
|
17
17
|
Requires-Dist: sniffio~=1.3; extra == "all"
|
18
18
|
Requires-Dist: greenlet~=3.2; extra == "all"
|
19
19
|
Requires-Dist: trio~=0.30; extra == "all"
|
@@ -45,7 +45,7 @@ Requires-Dist: duckdb~=1.3; extra == "all"
|
|
45
45
|
Requires-Dist: markupsafe~=3.0; extra == "all"
|
46
46
|
Requires-Dist: jinja2~=3.1; extra == "all"
|
47
47
|
Requires-Dist: pytest~=8.4; extra == "all"
|
48
|
-
Requires-Dist: anyio~=4.
|
48
|
+
Requires-Dist: anyio~=4.10; extra == "all"
|
49
49
|
Requires-Dist: sniffio~=1.3; extra == "all"
|
50
50
|
Requires-Dist: asttokens~=3.0; extra == "all"
|
51
51
|
Requires-Dist: executing~=2.2; extra == "all"
|
@@ -53,7 +53,7 @@ Requires-Dist: orjson~=3.11; extra == "all"
|
|
53
53
|
Requires-Dist: pyyaml~=6.0; extra == "all"
|
54
54
|
Requires-Dist: wrapt~=1.17; extra == "all"
|
55
55
|
Provides-Extra: async
|
56
|
-
Requires-Dist: anyio~=4.
|
56
|
+
Requires-Dist: anyio~=4.10; extra == "async"
|
57
57
|
Requires-Dist: sniffio~=1.3; extra == "async"
|
58
58
|
Requires-Dist: greenlet~=3.2; extra == "async"
|
59
59
|
Requires-Dist: trio~=0.30; extra == "async"
|
@@ -96,7 +96,7 @@ Requires-Dist: jinja2~=3.1; extra == "templates"
|
|
96
96
|
Provides-Extra: testing
|
97
97
|
Requires-Dist: pytest~=8.4; extra == "testing"
|
98
98
|
Provides-Extra: plus
|
99
|
-
Requires-Dist: anyio~=4.
|
99
|
+
Requires-Dist: anyio~=4.10; extra == "plus"
|
100
100
|
Requires-Dist: sniffio~=1.3; extra == "plus"
|
101
101
|
Requires-Dist: asttokens~=3.0; extra == "plus"
|
102
102
|
Requires-Dist: executing~=2.2; extra == "plus"
|
@@ -1,5 +1,5 @@
|
|
1
1
|
omlish/.manifests.json,sha256=aT8yZ-Zh-9wfHl5Ym5ouiWC1i0cy7Q7RlhzavB6VLPI,8587
|
2
|
-
omlish/__about__.py,sha256=
|
2
|
+
omlish/__about__.py,sha256=HG9T6_zSB02ZXfYcsvgYBXFXBSGh4AQRp4Uu8oUyvHU,3479
|
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
|
@@ -36,7 +36,7 @@ omlish/asyncs/anyio/signals.py,sha256=ySSut5prdnoy0-5Ws5V1M4cC2ON_vY550vU10d2NHk
|
|
36
36
|
omlish/asyncs/anyio/streams.py,sha256=Zum2qd1t3EiH6yzGWFwxFw79m-IH2VY5sTUTiluFfIY,2164
|
37
37
|
omlish/asyncs/anyio/subprocesses.py,sha256=nyl1A9z3rymxQMvIekWHU3IAiKBu1CcEqm-Ag1cGRPY,3018
|
38
38
|
omlish/asyncs/anyio/sync.py,sha256=ZmSNhSsEkPwlXThrpefhtVTxw4GJ9F0P-yKyo5vbbSk,1574
|
39
|
-
omlish/asyncs/anyio/utils.py,sha256
|
39
|
+
omlish/asyncs/anyio/utils.py,sha256=-mveSB20De6znphfMlIuEd_rwITkcSjFNO07isshDjk,1704
|
40
40
|
omlish/asyncs/asyncio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
41
41
|
omlish/asyncs/asyncio/all.py,sha256=u2JpMEs-0AJ0Vd8yU10HvWD8rfKxdFfMiwBu2oDeuuQ,313
|
42
42
|
omlish/asyncs/asyncio/channels.py,sha256=oniTpmw_eeKK70APyEZLhRUChwLwebE4N0_uZiwSKgQ,1085
|
@@ -135,7 +135,7 @@ omlish/daemons/services.py,sha256=laoUeJU7eVHuWl1062FBjPSD7jchOjhpYDc5FT2B3dM,34
|
|
135
135
|
omlish/daemons/spawning.py,sha256=psR73zOYjMKTqNpx1bMib8uU9wAZz62tw5TaWHrTdyY,5337
|
136
136
|
omlish/daemons/targets.py,sha256=00KmtlknMhQ5PyyVAhWl3rpeTMPym0GxvHHq6mYPZ7c,3051
|
137
137
|
omlish/daemons/waiting.py,sha256=RfgD1L33QQVbD2431dkKZGE4w6DUcGvYeRXXi8puAP4,1676
|
138
|
-
omlish/dataclasses/__init__.py,sha256=
|
138
|
+
omlish/dataclasses/__init__.py,sha256=2qPNbUAgg973l0n458ZEov6FvihpDztVU6HRalntysk,2147
|
139
139
|
omlish/dataclasses/debug.py,sha256=giBiv6aXvX0IagwNCW64qBzNjfOFr3-VmgDy_KYlb-k,29
|
140
140
|
omlish/dataclasses/errors.py,sha256=tyv3WR6az66uGGiq9FIuCHvy1Ef-G7zeMY7mMG6hy2Y,2527
|
141
141
|
omlish/dataclasses/inspect.py,sha256=BlpPghVCU3w_YDnONEqqE99YHzJM2q3eoqe39YX25Ko,4596
|
@@ -223,10 +223,10 @@ omlish/diag/replserver/server.py,sha256=ukjk7yyceSG4LAJwxE-Een8b4tQ_2VJHArfKeTqK
|
|
223
223
|
omlish/dispatch/__init__.py,sha256=UwVT6SSk5HKk9xF9vc_UJD8BDSIQWSw98Ldx-G-6PC0,166
|
224
224
|
omlish/dispatch/_dispatch2.py,sha256=70k1tKKvuhxtAu6v4skECfHKIKVWrmlt7G_JKLUsKEs,1966
|
225
225
|
omlish/dispatch/_dispatch3.py,sha256=9Zjd7bINAC3keiaBdssc4v5dY0-8OI6XooV2DR9U7Z0,2818
|
226
|
-
omlish/dispatch/dispatch.py,sha256=
|
226
|
+
omlish/dispatch/dispatch.py,sha256=TzWihCt9Zr8wfIwVpKHVOOrYFVKpDXRevxYomtEfqYc,3176
|
227
227
|
omlish/dispatch/functions.py,sha256=cwNzGIg2ZIalEgn9I03cnJVbMTHjWloyDTaowlO3UPs,1524
|
228
228
|
omlish/dispatch/impls.py,sha256=K_okKvpZml4NkTHJmTVyMQSrIaIJcqTEgkreGwukaOw,1895
|
229
|
-
omlish/dispatch/methods.py,sha256=
|
229
|
+
omlish/dispatch/methods.py,sha256=nqLvpuktVO9sE3np79QuKqmPyTX8tluFzPr4MNBkljc,10296
|
230
230
|
omlish/docker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
231
231
|
omlish/docker/all.py,sha256=t5jBNZAzqCoB05-nwCuSZ6C3PBEBD6T3wsIJvIXJaRg,576
|
232
232
|
omlish/docker/cli.py,sha256=ws3ypayxdnp3nWeLww45jHG0Vwr5e4bUbLTqkpejAhc,2570
|
@@ -530,7 +530,7 @@ omlish/marshal/objects/__init__.py,sha256=F4wej8L_tedC8ETYxAnmKfdPR9TjsqIus9Z3nZ
|
|
530
530
|
omlish/marshal/objects/dataclasses.py,sha256=klXXY1zOKh_FYlw6L5ZNPjpXSk0ntUGxSOrm309WoiY,8953
|
531
531
|
omlish/marshal/objects/helpers.py,sha256=hj5I1pILt3QFSVkYJNrSO3wiCaalAopEYWPL17Ip4zs,1102
|
532
532
|
omlish/marshal/objects/marshal.py,sha256=JarKGecMgaFYSUHUj-ZUYVP9HK6u2rjpBb3DWX9Uhh0,2648
|
533
|
-
omlish/marshal/objects/metadata.py,sha256=
|
533
|
+
omlish/marshal/objects/metadata.py,sha256=b9hxmM0qV_GhgFnA6JXVxjI7odvWaZMGHjrQLgdK9L0,3368
|
534
534
|
omlish/marshal/objects/namedtuples.py,sha256=8de8L7rwmvr_LLBHHfOl2wHObxc_1yZ8fC_J25yZi7Q,2866
|
535
535
|
omlish/marshal/objects/unmarshal.py,sha256=IXIl_iokvVCSWYhkRORrWP_sE1DVklnrUErGWg_3MDc,3632
|
536
536
|
omlish/marshal/polymorphism/__init__.py,sha256=e2UTrSL0qp7w_1vkdxDWd7sXlWhep2KPV49-BB64ma8,130
|
@@ -890,9 +890,9 @@ omlish/typedvalues/marshal.py,sha256=AtBz7Jq-BfW8vwM7HSxSpR85JAXmxK2T0xDblmm1HI0
|
|
890
890
|
omlish/typedvalues/of_.py,sha256=UXkxSj504WI2UrFlqdZJbu2hyDwBhL7XVrc2qdR02GQ,1309
|
891
891
|
omlish/typedvalues/reflect.py,sha256=PAvKW6T4cW7u--iX80w3HWwZUS3SmIZ2_lQjT65uAyk,1026
|
892
892
|
omlish/typedvalues/values.py,sha256=ym46I-q2QJ_6l4UlERqv3yj87R-kp8nCKMRph0xQ3UA,1307
|
893
|
-
omlish-0.0.0.
|
894
|
-
omlish-0.0.0.
|
895
|
-
omlish-0.0.0.
|
896
|
-
omlish-0.0.0.
|
897
|
-
omlish-0.0.0.
|
898
|
-
omlish-0.0.0.
|
893
|
+
omlish-0.0.0.dev379.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
894
|
+
omlish-0.0.0.dev379.dist-info/METADATA,sha256=y-U_fsh6ZYrYzAZEmzZ0T-kCoC1aLyzbrcpccejNsAU,4420
|
895
|
+
omlish-0.0.0.dev379.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
896
|
+
omlish-0.0.0.dev379.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
|
897
|
+
omlish-0.0.0.dev379.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
|
898
|
+
omlish-0.0.0.dev379.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|