ez-a-sync 0.32.11__cp311-cp311-musllinux_1_2_i686.whl → 0.32.13__cp311-cp311-musllinux_1_2_i686.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.
Potentially problematic release.
This version of ez-a-sync might be problematic. Click here for more details.
- a_sync/_smart.c +1122 -1133
- a_sync/_smart.cpython-311-i386-linux-musl.so +0 -0
- a_sync/_smart.pyx +11 -10
- a_sync/asyncio/create_task.c +735 -579
- a_sync/asyncio/create_task.cpython-311-i386-linux-musl.so +0 -0
- a_sync/asyncio/create_task.pyx +7 -4
- a_sync/debugging.c +3 -2
- a_sync/debugging.cpython-311-i386-linux-musl.so +0 -0
- a_sync/iter.c +216 -81
- a_sync/iter.cpython-311-i386-linux-musl.so +0 -0
- a_sync/iter.pxd +2 -0
- a_sync/primitives/locks/event.c +426 -428
- a_sync/primitives/locks/event.cpython-311-i386-linux-musl.so +0 -0
- a_sync/primitives/locks/event.pyx +3 -1
- a_sync/primitives/locks/prio_semaphore.c +2623 -1503
- a_sync/primitives/locks/prio_semaphore.cpython-311-i386-linux-musl.so +0 -0
- a_sync/primitives/locks/prio_semaphore.pxd +9 -8
- a_sync/primitives/locks/prio_semaphore.pyx +65 -22
- a_sync/primitives/locks/semaphore.c +1048 -1051
- a_sync/primitives/locks/semaphore.cpython-311-i386-linux-musl.so +0 -0
- a_sync/primitives/locks/semaphore.pyx +4 -2
- a_sync/task.py +22 -6
- {ez_a_sync-0.32.11.dist-info → ez_a_sync-0.32.13.dist-info}/METADATA +1 -1
- {ez_a_sync-0.32.11.dist-info → ez_a_sync-0.32.13.dist-info}/RECORD +27 -27
- {ez_a_sync-0.32.11.dist-info → ez_a_sync-0.32.13.dist-info}/WHEEL +1 -1
- {ez_a_sync-0.32.11.dist-info → ez_a_sync-0.32.13.dist-info}/licenses/LICENSE.txt +0 -0
- {ez_a_sync-0.32.11.dist-info → ez_a_sync-0.32.13.dist-info}/top_level.txt +0 -0
|
Binary file
|
|
@@ -10,6 +10,8 @@ from libc.string cimport strcpy
|
|
|
10
10
|
from libc.stdlib cimport malloc, free
|
|
11
11
|
from typing import Container, Literal, List, Optional, Set
|
|
12
12
|
|
|
13
|
+
from cpython.unicode cimport PyUnicode_CompareWithASCIIString
|
|
14
|
+
|
|
13
15
|
from a_sync._typing import CoroFn, P, T
|
|
14
16
|
from a_sync.functools cimport wraps
|
|
15
17
|
from a_sync.primitives._debug cimport _DebugDaemonMixin, _LoopBoundMixin
|
|
@@ -320,10 +322,10 @@ cdef class Semaphore(_DebugDaemonMixin):
|
|
|
320
322
|
|
|
321
323
|
|
|
322
324
|
cdef inline bint _is_not_done(fut: Future):
|
|
323
|
-
return
|
|
325
|
+
return PyUnicode_CompareWithASCIIString(fut._state, b"PENDING") == 0
|
|
324
326
|
|
|
325
327
|
cdef inline bint _is_not_cancelled(fut: Future):
|
|
326
|
-
return
|
|
328
|
+
return PyUnicode_CompareWithASCIIString(fut._state, b"CANCELLED") != 0
|
|
327
329
|
|
|
328
330
|
|
|
329
331
|
cdef class DummySemaphore(Semaphore):
|
a_sync/task.py
CHANGED
|
@@ -43,6 +43,9 @@ logger = getLogger(__name__)
|
|
|
43
43
|
MappingFn = Callable[Concatenate[K, P], Awaitable[V]]
|
|
44
44
|
|
|
45
45
|
|
|
46
|
+
_args = WeakKeyDictionary()
|
|
47
|
+
|
|
48
|
+
|
|
46
49
|
class TaskMapping(DefaultDict[K, "Task[V]"], AsyncIterable[Tuple[K, V]]):
|
|
47
50
|
"""
|
|
48
51
|
A mapping of keys to asynchronous tasks with additional functionality.
|
|
@@ -157,6 +160,9 @@ class TaskMapping(DefaultDict[K, "Task[V]"], AsyncIterable[Tuple[K, V]]):
|
|
|
157
160
|
|
|
158
161
|
if iterables:
|
|
159
162
|
|
|
163
|
+
set_next = self._next.set
|
|
164
|
+
clear_next = self._next.clear
|
|
165
|
+
|
|
160
166
|
@wraps(wrapped_func)
|
|
161
167
|
async def _wrapped_set_next(
|
|
162
168
|
*args: P.args, __a_sync_recursion: int = 0, **kwargs: P.kwargs
|
|
@@ -167,17 +173,27 @@ class TaskMapping(DefaultDict[K, "Task[V]"], AsyncIterable[Tuple[K, V]]):
|
|
|
167
173
|
e.args = *e.args, f"wrapped:{self.__wrapped__}"
|
|
168
174
|
raise
|
|
169
175
|
except TypeError as e:
|
|
170
|
-
if
|
|
171
|
-
|
|
172
|
-
|
|
176
|
+
if (
|
|
177
|
+
args is None
|
|
178
|
+
or __a_sync_recursion > 2
|
|
179
|
+
or not (
|
|
180
|
+
str(e).startswith(wrapped_func.__name__)
|
|
181
|
+
and "got multiple values for argument" in str(e)
|
|
182
|
+
)
|
|
173
183
|
):
|
|
174
184
|
raise
|
|
185
|
+
|
|
175
186
|
# NOTE: args ordering is clashing with provided kwargs. We can handle this in a hacky way.
|
|
176
187
|
# TODO: perform this check earlier and pre-prepare the args/kwargs ordering
|
|
188
|
+
try:
|
|
189
|
+
argspec = _args[self.__wrapped__]
|
|
190
|
+
except KeyError:
|
|
191
|
+
argspec = _args[self.__wrapped__] = getfullargspec(self.__wrapped__).args
|
|
192
|
+
|
|
177
193
|
new_args = list(args)
|
|
178
194
|
new_kwargs = dict(kwargs)
|
|
179
195
|
try:
|
|
180
|
-
for i, arg in enumerate(
|
|
196
|
+
for i, arg in enumerate(argspec):
|
|
181
197
|
if arg in kwargs:
|
|
182
198
|
new_args.insert(i, new_kwargs.pop(arg))
|
|
183
199
|
else:
|
|
@@ -194,8 +210,8 @@ class TaskMapping(DefaultDict[K, "Task[V]"], AsyncIterable[Tuple[K, V]]):
|
|
|
194
210
|
else e2.with_traceback(e2.__traceback__)
|
|
195
211
|
)
|
|
196
212
|
finally:
|
|
197
|
-
|
|
198
|
-
|
|
213
|
+
set_next()
|
|
214
|
+
clear_next()
|
|
199
215
|
|
|
200
216
|
self._wrapped_func = _wrapped_set_next
|
|
201
217
|
init_loader_queue: Queue[Tuple[K, "Future[V]"]] = Queue()
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
a_sync/ENVIRONMENT_VARIABLES.py,sha256=YgIB8mQRqQBLbD3DdwMjx4ylqO8pK3GUvSNCerWJzx8,1280
|
|
2
2
|
a_sync/__init__.pxd,sha256=ol4jqkvuweaaU8GQU_Mq9rak8IIsagYTdhYhbKK74ac,81
|
|
3
3
|
a_sync/__init__.py,sha256=UrDqNkHGqvSY4O9wM9ObaoOP00cLq1sM-ucRnUvLyKk,5726
|
|
4
|
-
a_sync/_smart.c,sha256=
|
|
5
|
-
a_sync/_smart.cpython-311-i386-linux-musl.so,sha256=
|
|
4
|
+
a_sync/_smart.c,sha256=v4LKFLjQiZylytn_f7uoWYvziiKnwJK6lj6gNhIyWKw,913352
|
|
5
|
+
a_sync/_smart.cpython-311-i386-linux-musl.so,sha256=YTA1PIla2Xyi3qASqD8r0CAIHFIInuo68x4evLzZOXg,976104
|
|
6
6
|
a_sync/_smart.pxd,sha256=3FlPqSvAtmGXIDFzfm7wpkvL6xt8z8w-vwow4Lura2g,76
|
|
7
7
|
a_sync/_smart.pyi,sha256=mUQwUiiSsMsbtJTKdXm076ua5B2A9USaKgjZq1Se_ZQ,5390
|
|
8
|
-
a_sync/_smart.pyx,sha256=
|
|
8
|
+
a_sync/_smart.pyx,sha256=H69s97xyiuYZcF5k_pXv8c50g40kkooKkSAsSH7359U,19459
|
|
9
9
|
a_sync/_typing.py,sha256=x24VIVjxz8sUWPmQR072pHAQxJO769Nn02f3eakFpe8,6850
|
|
10
10
|
a_sync/aliases.py,sha256=TbLyuLeFfJEmcC5-NP6h4DQ9QXlQjGny2NUP_x1tflw,212
|
|
11
|
-
a_sync/debugging.c,sha256=
|
|
12
|
-
a_sync/debugging.cpython-311-i386-linux-musl.so,sha256=
|
|
11
|
+
a_sync/debugging.c,sha256=RfJnHds7wZdPmWg5PYc26nqjOQijqdOMMbGk43tvUhU,589339
|
|
12
|
+
a_sync/debugging.cpython-311-i386-linux-musl.so,sha256=0oIl5vPIWOVEpIkc1YIeFDnLy0QI3v7EyUiWvpIXmis,620932
|
|
13
13
|
a_sync/debugging.pyi,sha256=82AWVId_ghlFnIZkB3IQiEPqW9Yn3gKwknWNX6CCRLM,2257
|
|
14
14
|
a_sync/debugging.pyx,sha256=Z29Lek1NyUXVFHjfk9O6XWxPNk1uRFyY6tK6fTfgxGM,3045
|
|
15
15
|
a_sync/exceptions.c,sha256=7juaOwpPuyUNyMcN3KavW1QM6uUIDHYKwTQBf3PYpH8,550527
|
|
@@ -23,13 +23,13 @@ a_sync/functools.pxd,sha256=hhygzVpa5tXnDWR1pi_WLkOBd_1mC60K3279wYFEfA8,187
|
|
|
23
23
|
a_sync/functools.pyi,sha256=HGM208HKg5FOUbu9CbfnIOx3sdQB1OwO1t-0tZKd-T4,1404
|
|
24
24
|
a_sync/functools.pyx,sha256=F-Vp5JrhEt4jaFQDx48FadI7NGLlPfoIPWRWHTQob0Q,4837
|
|
25
25
|
a_sync/future.py,sha256=CK3t7BE1AfuFhWLFw50rFaCox0IRYW2x0HqVpOJC6o8,48675
|
|
26
|
-
a_sync/iter.c,sha256=
|
|
27
|
-
a_sync/iter.cpython-311-i386-linux-musl.so,sha256=
|
|
28
|
-
a_sync/iter.pxd,sha256=
|
|
26
|
+
a_sync/iter.c,sha256=WS1z9wYxIBs9XcQBsfZnQCmDdkM5GqM-AbVZR-4-4Bk,1617426
|
|
27
|
+
a_sync/iter.cpython-311-i386-linux-musl.so,sha256=BHaw-zwqLQgd5HaMux6fxh5t3X7IUvzOEbGAw3RpJGI,1944284
|
|
28
|
+
a_sync/iter.pxd,sha256=VQKDAzm1M4snbrL9vwhU2zl04H4LeJrWtqksw6yGWOc,427
|
|
29
29
|
a_sync/iter.pyi,sha256=785C3RAcRT69ngv3LfEE56Sf8hyLqapxS94uqfz1na8,15412
|
|
30
30
|
a_sync/iter.pyx,sha256=TKzdMQkI74oKdgW-Us1WSgE5_KdS_7dOUykAmTHiXgU,37486
|
|
31
31
|
a_sync/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
32
|
-
a_sync/task.py,sha256=
|
|
32
|
+
a_sync/task.py,sha256=0aPqOe-nswQniHk1wzZ_pCVKXlWPgOSftYA4CHMertU,35045
|
|
33
33
|
a_sync/a_sync/__init__.py,sha256=P8AO0TBmYPW5BYVk0TohOwLq8jurpRKfXnaPO-qDMJw,2200
|
|
34
34
|
a_sync/a_sync/_descriptor.c,sha256=BIV7KxjkbqOuOsjuSy1Lspvhv4Z-kwhoYZp4fUlPvZQ,843727
|
|
35
35
|
a_sync/a_sync/_descriptor.cpython-311-i386-linux-musl.so,sha256=HTaJCRVj3iFhZY91WLgapImGcjuzutSFlndVdvH5NK0,954148
|
|
@@ -109,11 +109,11 @@ a_sync/asyncio/as_completed.cpython-311-i386-linux-musl.so,sha256=WnoEoT4DXwwqSX
|
|
|
109
109
|
a_sync/asyncio/as_completed.pxd,sha256=mISE2jdb2jOS0q3TKg0F_k-Zf-d3hzdBNKU1PT-Tn40,162
|
|
110
110
|
a_sync/asyncio/as_completed.pyi,sha256=-VdtfMlX0XdkqJbJm8C0gEAi_BfRbkz3Xkdver6vHs4,3753
|
|
111
111
|
a_sync/asyncio/as_completed.pyx,sha256=ar0gJ3iN6-4Jw8xy6i7KVJ54RnAGt1JWE85Wh6kPF48,9052
|
|
112
|
-
a_sync/asyncio/create_task.c,sha256=
|
|
113
|
-
a_sync/asyncio/create_task.cpython-311-i386-linux-musl.so,sha256=
|
|
112
|
+
a_sync/asyncio/create_task.c,sha256=KpPjTlsDn2GHSRAxB4BwQNCOSC8sWHSpJhKZkpO08Sw,606164
|
|
113
|
+
a_sync/asyncio/create_task.cpython-311-i386-linux-musl.so,sha256=Ig9lyXDuT3KPhGw1bIymNQGgx6GdCNuUmQUPUXpGzBU,632488
|
|
114
114
|
a_sync/asyncio/create_task.pxd,sha256=x-sZVX-26NoqxYb5mH33uh2Mg-3AqqdYGXx4Ai7xZwU,143
|
|
115
115
|
a_sync/asyncio/create_task.pyi,sha256=5H2z4k_2dGG2QTGjGEgP1N6ITuClYYWzkPbzaeQwKks,1864
|
|
116
|
-
a_sync/asyncio/create_task.pyx,sha256=
|
|
116
|
+
a_sync/asyncio/create_task.pyx,sha256=tMvH96pSYgxQamU5Vfaeq-5SdyC3aBXtBdi-PF5CwrA,8597
|
|
117
117
|
a_sync/asyncio/gather.c,sha256=MLhPvLSGGCpxgMNtiA8Xcx3nniDOLzMSVYnFbSFWukE,637555
|
|
118
118
|
a_sync/asyncio/gather.cpython-311-i386-linux-musl.so,sha256=qbyve2axcrcTM1MjD1s9oEcH9jfdilwJvfTH_rHZfB4,654992
|
|
119
119
|
a_sync/asyncio/gather.pyi,sha256=7P_GapnZAz4z3xDZeg4wKpM1zD-6nVd15tRzG6b_jKk,4515
|
|
@@ -147,21 +147,21 @@ a_sync/primitives/locks/counter.cpython-311-i386-linux-musl.so,sha256=KBVX3xmu8U
|
|
|
147
147
|
a_sync/primitives/locks/counter.pxd,sha256=_HoPXPMTRY3Gw3GPUB2jAx7lUpjJ4QyO75YiR_BehAQ,409
|
|
148
148
|
a_sync/primitives/locks/counter.pyi,sha256=d83iZwFj5mK9fIohh7n1uRdRiGAnfi2FNMZSyKtli9A,5077
|
|
149
149
|
a_sync/primitives/locks/counter.pyx,sha256=H_3LN50-zDvBSgHoKXXOMlUKs78aZSFDhu8gQrhWV5Y,9055
|
|
150
|
-
a_sync/primitives/locks/event.c,sha256=
|
|
151
|
-
a_sync/primitives/locks/event.cpython-311-i386-linux-musl.so,sha256
|
|
150
|
+
a_sync/primitives/locks/event.c,sha256=1KiOCYD4Y0YwNJ42fMo0oSnpdXmpmpeqS6ckoOOcvL8,655928
|
|
151
|
+
a_sync/primitives/locks/event.cpython-311-i386-linux-musl.so,sha256=XI46wCoEgrPiJnau24by5dfzrT-DSeJoartggrtA8iM,653084
|
|
152
152
|
a_sync/primitives/locks/event.pxd,sha256=Wk1wLD8P6Nml1mzrRM6H34bD06LZWovjEYKnRhGcXE4,696
|
|
153
153
|
a_sync/primitives/locks/event.pyi,sha256=cWK5LPzpbERpaXjYh5LqDcDuJDIexJjhP606mYMbKBw,1456
|
|
154
|
-
a_sync/primitives/locks/event.pyx,sha256=
|
|
155
|
-
a_sync/primitives/locks/prio_semaphore.c,sha256=
|
|
156
|
-
a_sync/primitives/locks/prio_semaphore.cpython-311-i386-linux-musl.so,sha256=
|
|
157
|
-
a_sync/primitives/locks/prio_semaphore.pxd,sha256=
|
|
154
|
+
a_sync/primitives/locks/event.pyx,sha256=PFQoQVZ9DozV2LOdKK-03fWpX_MrvBqxikKk4k3PjHs,6049
|
|
155
|
+
a_sync/primitives/locks/prio_semaphore.c,sha256=xzwXUNqHvWCUuORdnEuia0oRE7PIYVj2a5dn0AvwXZw,1161447
|
|
156
|
+
a_sync/primitives/locks/prio_semaphore.cpython-311-i386-linux-musl.so,sha256=lboM8c3i-rFuv4PG3t55c9Sd2ZK4uoOqsYiNJzQy0AI,1179536
|
|
157
|
+
a_sync/primitives/locks/prio_semaphore.pxd,sha256=SZXX1jH12m9PKH9VmrKpLdTctY0c_wYS75YGWoDdlzE,1041
|
|
158
158
|
a_sync/primitives/locks/prio_semaphore.pyi,sha256=w3xGj3-kdFEjw4k8vzt4TiWsG8j5KC6erXBNNrEhaL0,7644
|
|
159
|
-
a_sync/primitives/locks/prio_semaphore.pyx,sha256=
|
|
160
|
-
a_sync/primitives/locks/semaphore.c,sha256=
|
|
161
|
-
a_sync/primitives/locks/semaphore.cpython-311-i386-linux-musl.so,sha256=
|
|
159
|
+
a_sync/primitives/locks/prio_semaphore.pyx,sha256=DAgcufTedvvPBj5BfM56chjplEi0QUd1qAV49bSb-oM,22096
|
|
160
|
+
a_sync/primitives/locks/semaphore.c,sha256=PdVvYfEJ-gng0U32kj4yNJb_GtsTVCiGl-b5a-QhfDM,1135566
|
|
161
|
+
a_sync/primitives/locks/semaphore.cpython-311-i386-linux-musl.so,sha256=0emUCY5d5ZZ14d0uybqXjOBkRlDPMU1Kj8s4wbKXot8,1191164
|
|
162
162
|
a_sync/primitives/locks/semaphore.pxd,sha256=zy-PgktLUsFaXxvrSbB3m6gxisgzchCpKrcX8Zzwq_I,585
|
|
163
163
|
a_sync/primitives/locks/semaphore.pyi,sha256=ynHIA0k9HMzbsTfhMAwCEfpZSECVhXxhcNAwwQmsSlI,5975
|
|
164
|
-
a_sync/primitives/locks/semaphore.pyx,sha256=
|
|
164
|
+
a_sync/primitives/locks/semaphore.pyx,sha256=eQX6J5SdWK5qnXNPs6frO6BpQf9RuExNwZIjMlkNnHI,14965
|
|
165
165
|
a_sync/sphinx/__init__.py,sha256=UvdsakVmkn0Lw4vEd3jA3_Acymde95-78o87lel8ikk,49
|
|
166
166
|
a_sync/sphinx/ext.py,sha256=E93N5AmGcfGksN1J3oUsvewJZVZ3dNYcr0mwKJQ3ALk,8917
|
|
167
167
|
a_sync/utils/__init__.py,sha256=Y6R-IcD5ROzp2Zs3ZMv3bapkcfOpJHlBeD838bntd-Q,3213
|
|
@@ -170,8 +170,8 @@ a_sync/utils/repr.c,sha256=4HDcDzNN4_R5Z_QrhMy9kxWXK7iALDKpa--_D0k6_-Y,571751
|
|
|
170
170
|
a_sync/utils/repr.cpython-311-i386-linux-musl.so,sha256=h0_7VzWP6qRe6_eLjq_PPnito-C4_HCMw-Iiz_CZRcM,574456
|
|
171
171
|
a_sync/utils/repr.pyi,sha256=PWdsa6sF9_3nBqEgLaxtaHty7o7gwL--jPqvcelHY10,131
|
|
172
172
|
a_sync/utils/repr.pyx,sha256=xdsVdK75Zi5pAoh-8qRG0q7F0ySAq1zDkksZw37FoL4,2632
|
|
173
|
-
ez_a_sync-0.32.
|
|
174
|
-
ez_a_sync-0.32.
|
|
175
|
-
ez_a_sync-0.32.
|
|
176
|
-
ez_a_sync-0.32.
|
|
177
|
-
ez_a_sync-0.32.
|
|
173
|
+
ez_a_sync-0.32.13.dist-info/METADATA,sha256=UR-xEgaccDdRssgXeftsqT0ChtluUZW0hDBbFW03HW0,13197
|
|
174
|
+
ez_a_sync-0.32.13.dist-info/WHEEL,sha256=Tvo3dPyAZeB4pKSMLyEy9dJwCWISj00zkZVfm-ErvBw,110
|
|
175
|
+
ez_a_sync-0.32.13.dist-info/top_level.txt,sha256=ew2xVyFeZE_a5XMEL64h7-vJIbaBQieaFcvBAWUpU_s,7
|
|
176
|
+
ez_a_sync-0.32.13.dist-info/RECORD,,
|
|
177
|
+
ez_a_sync-0.32.13.dist-info/licenses/LICENSE.txt,sha256=1on6-17OUMlja6vSPTcmlmeT_DwujCZJijYxaplBvZk,1075
|
|
File without changes
|
|
File without changes
|