ez-a-sync 0.32.10__cp311-cp311-win32.whl → 0.32.11__cp311-cp311-win32.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 +1364 -1482
- a_sync/_smart.cp311-win32.pyd +0 -0
- a_sync/_smart.pyx +17 -6
- a_sync/a_sync/_descriptor.cp311-win32.pyd +0 -0
- a_sync/a_sync/_flags.cp311-win32.pyd +0 -0
- a_sync/a_sync/_helpers.cp311-win32.pyd +0 -0
- a_sync/a_sync/_kwargs.cp311-win32.pyd +0 -0
- a_sync/a_sync/abstract.cp311-win32.pyd +0 -0
- a_sync/a_sync/base.cp311-win32.pyd +0 -0
- a_sync/a_sync/flags.cp311-win32.pyd +0 -0
- a_sync/a_sync/function.cp311-win32.pyd +0 -0
- a_sync/a_sync/method.cp311-win32.pyd +0 -0
- a_sync/a_sync/modifiers/manager.c +614 -937
- a_sync/a_sync/modifiers/manager.cp311-win32.pyd +0 -0
- a_sync/a_sync/modifiers/manager.pyx +4 -1
- a_sync/a_sync/property.c +250 -244
- a_sync/a_sync/property.cp311-win32.pyd +0 -0
- a_sync/a_sync/property.pyx +4 -4
- a_sync/async_property/cached.cp311-win32.pyd +0 -0
- a_sync/async_property/proxy.cp311-win32.pyd +0 -0
- a_sync/asyncio/as_completed.cp311-win32.pyd +0 -0
- a_sync/asyncio/create_task.cp311-win32.pyd +0 -0
- a_sync/asyncio/gather.cp311-win32.pyd +0 -0
- a_sync/asyncio/igather.cp311-win32.pyd +0 -0
- a_sync/asyncio/sleep.cp311-win32.pyd +0 -0
- a_sync/debugging.cp311-win32.pyd +0 -0
- a_sync/exceptions.cp311-win32.pyd +0 -0
- a_sync/functools.cp311-win32.pyd +0 -0
- a_sync/iter.cp311-win32.pyd +0 -0
- a_sync/primitives/_debug.cp311-win32.pyd +0 -0
- a_sync/primitives/_loggable.cp311-win32.pyd +0 -0
- a_sync/primitives/locks/counter.cp311-win32.pyd +0 -0
- a_sync/primitives/locks/event.cp311-win32.pyd +0 -0
- a_sync/primitives/locks/prio_semaphore.cp311-win32.pyd +0 -0
- a_sync/primitives/locks/semaphore.cp311-win32.pyd +0 -0
- a_sync/utils/repr.cp311-win32.pyd +0 -0
- {ez_a_sync-0.32.10.dist-info → ez_a_sync-0.32.11.dist-info}/METADATA +1 -1
- {ez_a_sync-0.32.10.dist-info → ez_a_sync-0.32.11.dist-info}/RECORD +41 -41
- {ez_a_sync-0.32.10.dist-info → ez_a_sync-0.32.11.dist-info}/WHEEL +0 -0
- {ez_a_sync-0.32.10.dist-info → ez_a_sync-0.32.11.dist-info}/licenses/LICENSE.txt +0 -0
- {ez_a_sync-0.32.10.dist-info → ez_a_sync-0.32.11.dist-info}/top_level.txt +0 -0
a_sync/_smart.cp311-win32.pyd
CHANGED
|
Binary file
|
a_sync/_smart.pyx
CHANGED
|
@@ -9,14 +9,15 @@ import asyncio
|
|
|
9
9
|
import typing
|
|
10
10
|
import weakref
|
|
11
11
|
from logging import getLogger
|
|
12
|
+
from types import TracebackType
|
|
12
13
|
|
|
13
14
|
cimport cython
|
|
14
15
|
from cpython.object cimport PyObject
|
|
15
16
|
from cpython.ref cimport Py_DECREF, Py_INCREF
|
|
16
17
|
|
|
17
|
-
from a_sync._typing import
|
|
18
|
+
from a_sync._typing import T
|
|
18
19
|
|
|
19
|
-
if TYPE_CHECKING:
|
|
20
|
+
if typing.TYPE_CHECKING:
|
|
20
21
|
from a_sync import SmartProcessingQueue
|
|
21
22
|
|
|
22
23
|
cdef extern from "weakrefobject.h":
|
|
@@ -50,6 +51,7 @@ del getLogger
|
|
|
50
51
|
cdef object Any = typing.Any
|
|
51
52
|
cdef object Generic = typing.Generic
|
|
52
53
|
cdef object Tuple = typing.Tuple
|
|
54
|
+
cdef object Union = typing.Union
|
|
53
55
|
del typing
|
|
54
56
|
|
|
55
57
|
|
|
@@ -173,7 +175,7 @@ cdef inline bint _is_cancelled(fut: Future):
|
|
|
173
175
|
|
|
174
176
|
|
|
175
177
|
@cython.linetrace(False)
|
|
176
|
-
cdef object _get_result(fut:
|
|
178
|
+
cdef object _get_result(fut: Union["SmartFuture", "SmartTask"]):
|
|
177
179
|
"""Return the result this future represents.
|
|
178
180
|
|
|
179
181
|
If the future has been cancelled, raises CancelledError. If the
|
|
@@ -185,7 +187,11 @@ cdef object _get_result(fut: Future):
|
|
|
185
187
|
fut._Future__log_traceback = False
|
|
186
188
|
exc = fut._exception
|
|
187
189
|
if exc is not None:
|
|
188
|
-
|
|
190
|
+
cached_traceback = fut.__traceback__
|
|
191
|
+
if cached_traceback is None:
|
|
192
|
+
cached_traceback = exc.__traceback__
|
|
193
|
+
fut.__traceback__ = cached_traceback
|
|
194
|
+
raise exc.with_traceback(cached_traceback) from exc.__cause__
|
|
189
195
|
return fut._result
|
|
190
196
|
if state == "CANCELLED":
|
|
191
197
|
raise fut._make_cancelled_error()
|
|
@@ -230,6 +236,8 @@ class SmartFuture(Future, Generic[T]):
|
|
|
230
236
|
_key: Optional[Key] = None
|
|
231
237
|
|
|
232
238
|
_waiters: "weakref.WeakSet[SmartTask[T]]"
|
|
239
|
+
|
|
240
|
+
__traceback__: Optional[TracebackType] = None
|
|
233
241
|
|
|
234
242
|
def __init__(
|
|
235
243
|
self,
|
|
@@ -408,7 +416,10 @@ class SmartTask(Task, Generic[T]):
|
|
|
408
416
|
See Also:
|
|
409
417
|
- :class:`asyncio.Task`
|
|
410
418
|
"""
|
|
419
|
+
|
|
411
420
|
_waiters: Set["Task[T]"]
|
|
421
|
+
|
|
422
|
+
__traceback__: Optional[TracebackType] = None
|
|
412
423
|
|
|
413
424
|
@cython.linetrace(False)
|
|
414
425
|
def __init__(
|
|
@@ -623,7 +634,7 @@ cdef tuple _get_done_callbacks(inner: Task, outer: Future):
|
|
|
623
634
|
if _is_cancelled(outer):
|
|
624
635
|
if not _is_cancelled(inner):
|
|
625
636
|
# Mark inner's result as retrieved.
|
|
626
|
-
|
|
637
|
+
inner._Future__log_traceback = False
|
|
627
638
|
return
|
|
628
639
|
|
|
629
640
|
if _is_cancelled(inner):
|
|
@@ -633,7 +644,7 @@ cdef tuple _get_done_callbacks(inner: Task, outer: Future):
|
|
|
633
644
|
if exc is not None:
|
|
634
645
|
outer.set_exception(exc)
|
|
635
646
|
else:
|
|
636
|
-
outer.set_result(
|
|
647
|
+
outer.set_result(inner._result)
|
|
637
648
|
|
|
638
649
|
def _outer_done_callback(outer):
|
|
639
650
|
if _is_not_done(inner):
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|