omlish 0.0.0.dev196__py3-none-any.whl → 0.0.0.dev198__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/asyncio/all.py +0 -1
- omlish/asyncs/asyncio/asyncio.py +2 -6
- omlish/asyncs/bridge.py +2 -2
- omlish/testing/pytest/__init__.py +0 -4
- omlish/testing/pytest/plugins/managermarks.py +0 -14
- {omlish-0.0.0.dev196.dist-info → omlish-0.0.0.dev198.dist-info}/METADATA +1 -1
- {omlish-0.0.0.dev196.dist-info → omlish-0.0.0.dev198.dist-info}/RECORD +12 -13
- omlish/testing/pytest/marks.py +0 -18
- {omlish-0.0.0.dev196.dist-info → omlish-0.0.0.dev198.dist-info}/LICENSE +0 -0
- {omlish-0.0.0.dev196.dist-info → omlish-0.0.0.dev198.dist-info}/WHEEL +0 -0
- {omlish-0.0.0.dev196.dist-info → omlish-0.0.0.dev198.dist-info}/entry_points.txt +0 -0
- {omlish-0.0.0.dev196.dist-info → omlish-0.0.0.dev198.dist-info}/top_level.txt +0 -0
omlish/__about__.py
CHANGED
omlish/asyncs/asyncio/all.py
CHANGED
omlish/asyncs/asyncio/asyncio.py
CHANGED
@@ -20,13 +20,9 @@ def asyncio_once(fn: CallableT) -> CallableT:
|
|
20
20
|
return ta.cast(CallableT, inner)
|
21
21
|
|
22
22
|
|
23
|
-
def get_real_current_loop() -> asyncio.AbstractEventLoop | None:
|
24
|
-
return asyncio.get_event_loop_policy()._local._loop # type: ignore # noqa
|
25
|
-
|
26
|
-
|
27
23
|
def drain_tasks(loop=None):
|
28
24
|
if loop is None:
|
29
|
-
loop =
|
25
|
+
loop = asyncio.get_running_loop()
|
30
26
|
|
31
27
|
while loop._ready or loop._scheduled: # noqa
|
32
28
|
loop._run_once() # noqa
|
@@ -34,7 +30,7 @@ def drain_tasks(loop=None):
|
|
34
30
|
|
35
31
|
@contextlib.contextmanager
|
36
32
|
def draining_asyncio_tasks() -> ta.Iterator[None]:
|
37
|
-
loop =
|
33
|
+
loop = asyncio.get_running_loop()
|
38
34
|
try:
|
39
35
|
yield
|
40
36
|
finally:
|
omlish/asyncs/bridge.py
CHANGED
@@ -86,7 +86,7 @@ class BridgeAwaitRequiredError(Exception):
|
|
86
86
|
pass
|
87
87
|
|
88
88
|
|
89
|
-
class
|
89
|
+
class MissingBridgeThreadletError(Exception):
|
90
90
|
pass
|
91
91
|
|
92
92
|
|
@@ -224,7 +224,7 @@ def s_to_a_await(awaitable: ta.Awaitable[T]) -> T:
|
|
224
224
|
|
225
225
|
if not getattr(g.underlying, _BRIDGE_THREADLET_ATTR, False):
|
226
226
|
_safe_cancel_awaitable(awaitable)
|
227
|
-
raise
|
227
|
+
raise MissingBridgeThreadletError
|
228
228
|
|
229
229
|
return check.not_none(g.parent).switch(awaitable)
|
230
230
|
|
@@ -17,22 +17,8 @@ class ManagerMark(lang.Abstract):
|
|
17
17
|
raise NotImplementedError
|
18
18
|
|
19
19
|
|
20
|
-
def _deep_subclasses(cls):
|
21
|
-
ret = set()
|
22
|
-
|
23
|
-
def rec(cur):
|
24
|
-
for nxt in cur.__subclasses__():
|
25
|
-
if nxt not in ret:
|
26
|
-
ret.add(nxt)
|
27
|
-
rec(nxt)
|
28
|
-
|
29
|
-
rec(cls)
|
30
|
-
return ret
|
31
|
-
|
32
|
-
|
33
20
|
@register
|
34
21
|
class ManagerMarksPlugin:
|
35
|
-
|
36
22
|
@lang.cached_function
|
37
23
|
def mark_classes(self) -> ta.Mapping[str, type[ManagerMark]]:
|
38
24
|
return {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
omlish/.manifests.json,sha256=dyIpveH7Z8OnQp2pTn6NVv7LCDXVrozJWAzbk8PBavg,7950
|
2
|
-
omlish/__about__.py,sha256=
|
2
|
+
omlish/__about__.py,sha256=2l-ZMOw9Ow1ATtnEq25MKztlw3j8x4D9r2OdqjJH9WQ,3409
|
3
3
|
omlish/__init__.py,sha256=SsyiITTuK0v74XpKV8dqNaCmjOlan1JZKrHQv5rWKPA,253
|
4
4
|
omlish/c3.py,sha256=ubu7lHwss5V4UznbejAI0qXhXahrU01MysuHOZI9C4U,8116
|
5
5
|
omlish/cached.py,sha256=UI-XTFBwA6YXWJJJeBn-WkwBkfzDjLBBaZf4nIJA9y0,510
|
@@ -88,13 +88,13 @@ omlish/asyncs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
88
88
|
omlish/asyncs/all.py,sha256=uUz9ziKh4_QrgmdhKFMgq6j7mFbiZd3LiogguDCQsGI,587
|
89
89
|
omlish/asyncs/anyio.py,sha256=gfpx-D8QGmUfhnQxHEaHXcAP8zSMQjcGw4COFTGNnHI,8021
|
90
90
|
omlish/asyncs/asyncs.py,sha256=Tf7ZodTGepkM7HAuFcDNh9lLzzrMw6rELWvopGmFkh4,2035
|
91
|
-
omlish/asyncs/bridge.py,sha256=
|
91
|
+
omlish/asyncs/bridge.py,sha256=zVAhbFVDvw3qJjcvOKKY2mI8AwrmcmddKsW9KIzPdLI,9740
|
92
92
|
omlish/asyncs/flavors.py,sha256=1mNxGNRVmjUHzA13K5ht8vdJv4CLEmzYTQ6BZXr1520,4866
|
93
93
|
omlish/asyncs/trio.py,sha256=fmZ5b_lKdVV8NQ3euCUutWgnkqTFzSnOjvJSA_jvmrE,367
|
94
94
|
omlish/asyncs/trio_asyncio.py,sha256=oqdOHy0slj9PjVxaDf3gJkq9AAgg7wYZbB469jOftVw,1327
|
95
95
|
omlish/asyncs/asyncio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
96
|
-
omlish/asyncs/asyncio/all.py,sha256=
|
97
|
-
omlish/asyncs/asyncio/asyncio.py,sha256=
|
96
|
+
omlish/asyncs/asyncio/all.py,sha256=eZDtL8atzHqIdGCAAcQYWVmNvgRYerJB9Sy0reh-09k,115
|
97
|
+
omlish/asyncs/asyncio/asyncio.py,sha256=fvIc3M01Bo_qZTFz3Z2X7NrXC_9DnS0vtZKizGiV034,830
|
98
98
|
omlish/asyncs/asyncio/channels.py,sha256=ZbmsEmdK1fV96liHdcVpRqA2dAMkXJt4Q3rFAg3YOIw,1074
|
99
99
|
omlish/asyncs/asyncio/streams.py,sha256=Uc9PCWSfBqrK2kdVtfjjQU1eaYTWYmZm8QISDj2xiuw,1004
|
100
100
|
omlish/asyncs/asyncio/subprocesses.py,sha256=XlIWwSxpVB7sMVc75-f7dI6r08JkdipNFRWXUKS8zAw,6960
|
@@ -573,9 +573,8 @@ omlish/term/vt100/states.py,sha256=OxPUxfFTcfz56MhtDgIigEApChOtN6XO1g6R2H08mu4,8
|
|
573
573
|
omlish/term/vt100/terminal.py,sha256=KUlg331ele7P6SHsBKdbpdQFDKsxSply1Ds27NkppTs,9359
|
574
574
|
omlish/testing/__init__.py,sha256=M_BQrcCHkoL-ZvE-UpQ8XxXNYRRawhjUz4rCJnAqM2A,152
|
575
575
|
omlish/testing/testing.py,sha256=TT2wwSzPZ_KhIvKxpM1qc1yHKD-LHDNgGrcr_h8vs7c,2895
|
576
|
-
omlish/testing/pytest/__init__.py,sha256=
|
576
|
+
omlish/testing/pytest/__init__.py,sha256=rOpQYgp7jYjEIMjInzl-a_uIMqmOtVwGzDgJyCDpvxg,206
|
577
577
|
omlish/testing/pytest/helpers.py,sha256=TJpD60mBtLi9FtxX4TThfuXvg5FIRPSiZk1aeRwe-D4,197
|
578
|
-
omlish/testing/pytest/marks.py,sha256=4-3WgunN_fcmhkmQ6mtX_AFo5QRDwflNSH7NoyoXui4,432
|
579
578
|
omlish/testing/pytest/skip.py,sha256=NxTkAQiS3HKZR3sfFdxOR2LCFwtCveY6Ap-qtexiZbw,839
|
580
579
|
omlish/testing/pytest/inject/__init__.py,sha256=pdRKv1HcDmJ_yArKJbYITPXXZthRSGgBJWqITr0Er38,117
|
581
580
|
omlish/testing/pytest/inject/harness.py,sha256=_Qf7lLcYc_dpauYOE68u_a65jPCFWmQUYv9m_OOdNqs,5724
|
@@ -583,7 +582,7 @@ omlish/testing/pytest/plugins/__init__.py,sha256=ys1zXrYrNm7Uo6YOIVJ6Bd3dQo6kv38
|
|
583
582
|
omlish/testing/pytest/plugins/_registry.py,sha256=IK04KlBgiOJxKAyCCgjpX2R-9tE-btalYJkgjLc8Te8,77
|
584
583
|
omlish/testing/pytest/plugins/depskip.py,sha256=xithY-OMtjwhv8mcRNkv-WI_PSQtHldQ8H1s60MIXkk,2673
|
585
584
|
omlish/testing/pytest/plugins/logging.py,sha256=Y1I_3DiiuDSynObkm8bNPZxdvljUWXbqD6YUM5uI34o,391
|
586
|
-
omlish/testing/pytest/plugins/managermarks.py,sha256=
|
585
|
+
omlish/testing/pytest/plugins/managermarks.py,sha256=IzkspjT8-ToPIlHZs9cHt6RYbm51poJLjYVvkFPbJhE,1300
|
587
586
|
omlish/testing/pytest/plugins/pydevd.py,sha256=AXtN83M39ZKJ4VH3MJEhvPnAmYzD5u1r8ehz-0om50Q,842
|
588
587
|
omlish/testing/pytest/plugins/repeat.py,sha256=flSQzE9GFOWksVKz-mUGnpxJpv3yRqn1G4K8pW7JHs0,498
|
589
588
|
omlish/testing/pytest/plugins/skips.py,sha256=EoZDg1uWccgbAegmzqI85c7RliycD1e2J4Y7vfDRhwM,1041
|
@@ -608,9 +607,9 @@ omlish/text/indent.py,sha256=YjtJEBYWuk8--b9JU_T6q4yxV85_TR7VEVr5ViRCFwk,1336
|
|
608
607
|
omlish/text/minja.py,sha256=jZC-fp3Xuhx48ppqsf2Sf1pHbC0t8XBB7UpUUoOk2Qw,5751
|
609
608
|
omlish/text/parts.py,sha256=7vPF1aTZdvLVYJ4EwBZVzRSy8XB3YqPd7JwEnNGGAOo,6495
|
610
609
|
omlish/text/random.py,sha256=jNWpqiaKjKyTdMXC-pWAsSC10AAP-cmRRPVhm59ZWLk,194
|
611
|
-
omlish-0.0.0.
|
612
|
-
omlish-0.0.0.
|
613
|
-
omlish-0.0.0.
|
614
|
-
omlish-0.0.0.
|
615
|
-
omlish-0.0.0.
|
616
|
-
omlish-0.0.0.
|
610
|
+
omlish-0.0.0.dev198.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
|
611
|
+
omlish-0.0.0.dev198.dist-info/METADATA,sha256=DdG84lagt0fqcKUx-5Y5WBbViQubCiig7xFSBZNQu_o,4264
|
612
|
+
omlish-0.0.0.dev198.dist-info/WHEEL,sha256=A3WOREP4zgxI0fKrHUG8DC8013e3dK3n7a6HDbcEIwE,91
|
613
|
+
omlish-0.0.0.dev198.dist-info/entry_points.txt,sha256=Lt84WvRZJskWCAS7xnQGZIeVWksprtUHj0llrvVmod8,35
|
614
|
+
omlish-0.0.0.dev198.dist-info/top_level.txt,sha256=pePsKdLu7DvtUiecdYXJ78iO80uDNmBlqe-8hOzOmfs,7
|
615
|
+
omlish-0.0.0.dev198.dist-info/RECORD,,
|
omlish/testing/pytest/marks.py
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
import typing as ta
|
2
|
-
|
3
|
-
import pytest
|
4
|
-
|
5
|
-
from ... import lang # noqa
|
6
|
-
from .plugins.managermarks import ManagerMark # noqa
|
7
|
-
|
8
|
-
|
9
|
-
if ta.TYPE_CHECKING:
|
10
|
-
from ...asyncs.asyncio import all as aiu
|
11
|
-
else:
|
12
|
-
aiu = lang.proxy_import('...asyncs.asyncio.all', __package__)
|
13
|
-
|
14
|
-
|
15
|
-
class drain_asyncio(ManagerMark): # noqa
|
16
|
-
def __call__(self, item: pytest.Function) -> ta.Iterator[None]:
|
17
|
-
with aiu.draining_asyncio_tasks():
|
18
|
-
yield
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|