omlish 0.0.0.dev259__py3-none-any.whl → 0.0.0.dev260__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 +2 -2
- omlish/asyncs/all.py +5 -1
- omlish/asyncs/bridge.py +1 -1
- omlish/asyncs/buffers.py +4 -0
- omlish/asyncs/{asyncs.py → sync.py} +3 -0
- omlish/asyncs/utils.py +18 -0
- {omlish-0.0.0.dev259.dist-info → omlish-0.0.0.dev260.dist-info}/METADATA +1 -1
- {omlish-0.0.0.dev259.dist-info → omlish-0.0.0.dev260.dist-info}/RECORD +12 -11
- {omlish-0.0.0.dev259.dist-info → omlish-0.0.0.dev260.dist-info}/WHEEL +1 -1
- {omlish-0.0.0.dev259.dist-info → omlish-0.0.0.dev260.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev259.dist-info → omlish-0.0.0.dev260.dist-info}/licenses/LICENSE +0 -0
- {omlish-0.0.0.dev259.dist-info → omlish-0.0.0.dev260.dist-info}/top_level.txt +0 -0
omlish/__about__.py
CHANGED
omlish/asyncs/all.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from .
|
1
|
+
from .sync import ( # noqa
|
2
2
|
SyncableIterable,
|
3
3
|
async_list,
|
4
4
|
sync_await,
|
@@ -33,3 +33,7 @@ from .flavors import ( # noqa
|
|
33
33
|
mark_trio,
|
34
34
|
with_adapter_loop,
|
35
35
|
)
|
36
|
+
|
37
|
+
from .utils import ( # noqa
|
38
|
+
call_with_async_exit_stack,
|
39
|
+
)
|
omlish/asyncs/bridge.py
CHANGED
omlish/asyncs/buffers.py
CHANGED
@@ -37,6 +37,8 @@ class AsyncBufferedReader:
|
|
37
37
|
return r
|
38
38
|
o = r
|
39
39
|
b = await self._read()
|
40
|
+
if not b:
|
41
|
+
raise EOFError
|
40
42
|
self._buf.feed(b)
|
41
43
|
|
42
44
|
async def read_exact(
|
@@ -52,4 +54,6 @@ class AsyncBufferedReader:
|
|
52
54
|
if r is not None:
|
53
55
|
return r
|
54
56
|
b = await self._read()
|
57
|
+
if not b:
|
58
|
+
raise EOFError
|
55
59
|
self._buf.feed(b)
|
omlish/asyncs/utils.py
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
import contextlib
|
2
|
+
import typing as ta
|
3
|
+
|
4
|
+
|
5
|
+
P = ta.ParamSpec('P')
|
6
|
+
T = ta.TypeVar('T')
|
7
|
+
|
8
|
+
|
9
|
+
##
|
10
|
+
|
11
|
+
|
12
|
+
async def call_with_async_exit_stack( # type: ignore[return] # ???
|
13
|
+
fn: ta.Callable[ta.Concatenate[contextlib.AsyncExitStack, P], ta.Awaitable[T]],
|
14
|
+
*args: ta.Any,
|
15
|
+
**kwargs: ta.Any,
|
16
|
+
) -> T:
|
17
|
+
async with contextlib.AsyncExitStack() as aes:
|
18
|
+
return await fn(aes, *args, **kwargs)
|
@@ -1,5 +1,5 @@
|
|
1
1
|
omlish/.manifests.json,sha256=x26AIwDzScUvnX-p4xlq6Zc5QYrAo0Vmgf1qHc1KL_M,8253
|
2
|
-
omlish/__about__.py,sha256=
|
2
|
+
omlish/__about__.py,sha256=TYkbJu3PdyieNOUbdum9MiWF15ojfJww_QglLmLSmD8,3380
|
3
3
|
omlish/__init__.py,sha256=SsyiITTuK0v74XpKV8dqNaCmjOlan1JZKrHQv5rWKPA,253
|
4
4
|
omlish/c3.py,sha256=ubu7lHwss5V4UznbejAI0qXhXahrU01MysuHOZI9C4U,8116
|
5
5
|
omlish/cached.py,sha256=MLap_p0rdGoDIMVhXVHm1tsbcWobJF0OanoodV03Ju8,542
|
@@ -90,13 +90,14 @@ omlish/argparse/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
90
90
|
omlish/argparse/all.py,sha256=NeeMM5MIebY7XDAHaCxUzeesEoUYwsf5i9PrBUcO1cI,1057
|
91
91
|
omlish/argparse/cli.py,sha256=vVLlhJPt0PKaNfIBrXTzz9cHyy2dFEY8hlQ3GvtKbwc,8704
|
92
92
|
omlish/asyncs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
93
|
-
omlish/asyncs/all.py,sha256=
|
94
|
-
omlish/asyncs/
|
95
|
-
omlish/asyncs/
|
96
|
-
omlish/asyncs/buffers.py,sha256=xQO6EDdLSus88Lg5Cw2wpZsSLXR1g4GCwc_1K1tSwV0,1312
|
93
|
+
omlish/asyncs/all.py,sha256=MjW0P9K8XBrw6AaH2X_qD5Y7hEZOF0cktqFv5BDGH-k,649
|
94
|
+
omlish/asyncs/bridge.py,sha256=oFCqwGY9u9JYB-tee7GS0gjtIFp19rdZD2Z0YPRjj9k,9738
|
95
|
+
omlish/asyncs/buffers.py,sha256=ip9oDRT-XbBDpeAa72osv-TtZXxdF_ggW4lHkGKxCwE,1418
|
97
96
|
omlish/asyncs/flavors.py,sha256=1mNxGNRVmjUHzA13K5ht8vdJv4CLEmzYTQ6BZXr1520,4866
|
97
|
+
omlish/asyncs/sync.py,sha256=qfK8zRMQ0B_huC-6CsMG8vhKB0ktw7Ttq0NnySdWPwQ,2039
|
98
98
|
omlish/asyncs/trio.py,sha256=fmZ5b_lKdVV8NQ3euCUutWgnkqTFzSnOjvJSA_jvmrE,367
|
99
99
|
omlish/asyncs/trio_asyncio.py,sha256=oqdOHy0slj9PjVxaDf3gJkq9AAgg7wYZbB469jOftVw,1327
|
100
|
+
omlish/asyncs/utils.py,sha256=1QQMQ1WJBG86QLu4hQZRBFeUg-AypCVhlB8-niHHE4s,400
|
100
101
|
omlish/asyncs/anyio/__init__.py,sha256=AkwRD3XFWmEzBeHV-eAzwpA4F04bl7xyyapigrxMR8g,1747
|
101
102
|
omlish/asyncs/anyio/backends.py,sha256=jJIymWoiedaEJJm82gvKiJ41EWLQZ-bcyNHpbDpKKi4,1584
|
102
103
|
omlish/asyncs/anyio/futures.py,sha256=Nm1gLerZEnHk-rlsmr0UfK168IWIK6zA8EebZFtoY_E,2052
|
@@ -767,9 +768,9 @@ omlish/text/parts.py,sha256=Q9NvoyEGQKIWgiPD4D_Qc66cWAuyEKE033dT9m7c3Wk,6662
|
|
767
768
|
omlish/text/random.py,sha256=jNWpqiaKjKyTdMXC-pWAsSC10AAP-cmRRPVhm59ZWLk,194
|
768
769
|
omlish/text/go/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
769
770
|
omlish/text/go/quoting.py,sha256=N9EYdnFdEX_A8fOviH-1w4jwV3XOQ7VU2WsoUNubYVY,9137
|
770
|
-
omlish-0.0.0.
|
771
|
-
omlish-0.0.0.
|
772
|
-
omlish-0.0.0.
|
773
|
-
omlish-0.0.0.
|
774
|
-
omlish-0.0.0.
|
775
|
-
omlish-0.0.0.
|
771
|
+
omlish-0.0.0.dev260.dist-info/licenses/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
772
|
+
omlish-0.0.0.dev260.dist-info/METADATA,sha256=2zWJ8R0gGrP9bm0OLlyCdul5gKb0ImQJ6zBgB5Tw7x8,4198
|
773
|
+
omlish-0.0.0.dev260.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
774
|
+
omlish-0.0.0.dev260.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
|
775
|
+
omlish-0.0.0.dev260.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
|
776
|
+
omlish-0.0.0.dev260.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|