omlish 0.0.0.dev378__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 CHANGED
@@ -1,5 +1,5 @@
1
- __version__ = '0.0.0.dev378'
2
- __revision__ = '68656a20484255b8c2b94a33e964ad007247d478'
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.9',
35
+ 'anyio ~= 4.10',
36
36
  'sniffio ~= 1.3',
37
37
 
38
38
  'greenlet ~= 3.2',
@@ -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,
@@ -95,6 +95,23 @@ from .reflection import ( # noqa
95
95
  reflect,
96
96
  )
97
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
+
98
115
  from .tools.as_ import ( # noqa
99
116
  shallow_asdict,
100
117
  shallow_astuple,
@@ -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
 
@@ -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,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: omlish
3
- Version: 0.0.0.dev378
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.9; extra == "all"
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.9; extra == "all"
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.9; extra == "async"
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.9; extra == "plus"
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=7ZYuXmE8RfkmO7Z1KJIMIJKPRO9hoWBwulwAyFfWcac,3478
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=X2Rz1DGrCJ0zkt1O5cHoMRaYKTPndBj6dzLhb09mVtE,1672
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=-sQ9PO1ZIJosNQxKz9--eZFG3DDONp2yUCsTp_c3aC0,1970
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=KA5l49AiGLRjp4J7RDJW9RiDp9WUD1ewR1AOPEF8g38,3062
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=GdVsC-Zo3N-OorE0mr3lFI70dATkD2aWqZ8TvExiR5k,9297
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
@@ -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.dev378.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
894
- omlish-0.0.0.dev378.dist-info/METADATA,sha256=n0FMZEirHsCNdkJmSNQkc38ytAoJc1nuFeI9BIFtBXQ,4416
895
- omlish-0.0.0.dev378.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
896
- omlish-0.0.0.dev378.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
897
- omlish-0.0.0.dev378.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
898
- omlish-0.0.0.dev378.dist-info/RECORD,,
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,,