ez-a-sync 0.32.11__cp39-cp39-win32.whl → 0.32.13__cp39-cp39-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 +1122 -1133
- a_sync/_smart.cp39-win32.pyd +0 -0
- a_sync/_smart.pyx +11 -10
- a_sync/a_sync/_descriptor.cp39-win32.pyd +0 -0
- a_sync/a_sync/_flags.cp39-win32.pyd +0 -0
- a_sync/a_sync/_helpers.cp39-win32.pyd +0 -0
- a_sync/a_sync/_kwargs.cp39-win32.pyd +0 -0
- a_sync/a_sync/abstract.cp39-win32.pyd +0 -0
- a_sync/a_sync/base.cp39-win32.pyd +0 -0
- a_sync/a_sync/flags.cp39-win32.pyd +0 -0
- a_sync/a_sync/function.cp39-win32.pyd +0 -0
- a_sync/a_sync/method.cp39-win32.pyd +0 -0
- a_sync/a_sync/modifiers/manager.cp39-win32.pyd +0 -0
- a_sync/a_sync/property.cp39-win32.pyd +0 -0
- a_sync/async_property/cached.cp39-win32.pyd +0 -0
- a_sync/async_property/proxy.cp39-win32.pyd +0 -0
- a_sync/asyncio/as_completed.cp39-win32.pyd +0 -0
- a_sync/asyncio/create_task.c +735 -579
- a_sync/asyncio/create_task.cp39-win32.pyd +0 -0
- a_sync/asyncio/create_task.pyx +7 -4
- a_sync/asyncio/gather.cp39-win32.pyd +0 -0
- a_sync/asyncio/igather.cp39-win32.pyd +0 -0
- a_sync/asyncio/sleep.cp39-win32.pyd +0 -0
- a_sync/debugging.c +3 -2
- a_sync/debugging.cp39-win32.pyd +0 -0
- a_sync/exceptions.cp39-win32.pyd +0 -0
- a_sync/functools.cp39-win32.pyd +0 -0
- a_sync/iter.c +216 -81
- a_sync/iter.cp39-win32.pyd +0 -0
- a_sync/iter.pxd +2 -0
- a_sync/primitives/_debug.cp39-win32.pyd +0 -0
- a_sync/primitives/_loggable.cp39-win32.pyd +0 -0
- a_sync/primitives/locks/counter.cp39-win32.pyd +0 -0
- a_sync/primitives/locks/event.c +426 -428
- a_sync/primitives/locks/event.cp39-win32.pyd +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.cp39-win32.pyd +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.cp39-win32.pyd +0 -0
- a_sync/primitives/locks/semaphore.pyx +4 -2
- a_sync/task.py +22 -6
- a_sync/utils/repr.cp39-win32.pyd +0 -0
- {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 +50 -50
- {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
a_sync/_smart.cp39-win32.pyd
CHANGED
|
Binary file
|
a_sync/_smart.pyx
CHANGED
|
@@ -14,6 +14,7 @@ from types import TracebackType
|
|
|
14
14
|
cimport cython
|
|
15
15
|
from cpython.object cimport PyObject
|
|
16
16
|
from cpython.ref cimport Py_DECREF, Py_INCREF
|
|
17
|
+
from cpython.unicode cimport PyUnicode_CompareWithASCIIString
|
|
17
18
|
|
|
18
19
|
from a_sync._typing import T
|
|
19
20
|
|
|
@@ -155,7 +156,7 @@ cdef inline bint _is_done(fut: Future):
|
|
|
155
156
|
Done means either that a result / exception are available, or that the
|
|
156
157
|
future was cancelled.
|
|
157
158
|
"""
|
|
158
|
-
return
|
|
159
|
+
return PyUnicode_CompareWithASCIIString(fut._state, b"PENDING") != 0
|
|
159
160
|
|
|
160
161
|
|
|
161
162
|
@cython.linetrace(False)
|
|
@@ -165,13 +166,13 @@ cdef inline bint _is_not_done(fut: Future):
|
|
|
165
166
|
Done means either that a result / exception are available, or that the
|
|
166
167
|
future was cancelled.
|
|
167
168
|
"""
|
|
168
|
-
return
|
|
169
|
+
return PyUnicode_CompareWithASCIIString(fut._state, b"PENDING") == 0
|
|
169
170
|
|
|
170
171
|
|
|
171
172
|
@cython.linetrace(False)
|
|
172
173
|
cdef inline bint _is_cancelled(fut: Future):
|
|
173
174
|
"""Return True if the future was cancelled."""
|
|
174
|
-
return
|
|
175
|
+
return PyUnicode_CompareWithASCIIString(fut._state, b"CANCELLED") == 0
|
|
175
176
|
|
|
176
177
|
|
|
177
178
|
@cython.linetrace(False)
|
|
@@ -183,17 +184,17 @@ cdef object _get_result(fut: Union["SmartFuture", "SmartTask"]):
|
|
|
183
184
|
the future is done and has an exception set, this exception is raised.
|
|
184
185
|
"""
|
|
185
186
|
cdef str state = fut._state
|
|
186
|
-
if state
|
|
187
|
-
fut._Future__log_traceback = False
|
|
187
|
+
if PyUnicode_CompareWithASCIIString(state, b"FINISHED") == 0:
|
|
188
188
|
exc = fut._exception
|
|
189
189
|
if exc is not None:
|
|
190
190
|
cached_traceback = fut.__traceback__
|
|
191
191
|
if cached_traceback is None:
|
|
192
|
+
fut._Future__log_traceback = False
|
|
192
193
|
cached_traceback = exc.__traceback__
|
|
193
194
|
fut.__traceback__ = cached_traceback
|
|
194
195
|
raise exc.with_traceback(cached_traceback) from exc.__cause__
|
|
195
196
|
return fut._result
|
|
196
|
-
if state
|
|
197
|
+
if PyUnicode_CompareWithASCIIString(state, b"CANCELLED") == 0:
|
|
197
198
|
raise fut._make_cancelled_error()
|
|
198
199
|
raise InvalidStateError('Result is not ready.')
|
|
199
200
|
|
|
@@ -207,10 +208,10 @@ cdef object _get_exception(fut: Future):
|
|
|
207
208
|
InvalidStateError.
|
|
208
209
|
"""
|
|
209
210
|
cdef str state = fut._state
|
|
210
|
-
if state
|
|
211
|
+
if PyUnicode_CompareWithASCIIString(state, b"FINISHED") == 0:
|
|
211
212
|
fut._Future__log_traceback = False
|
|
212
213
|
return fut._exception
|
|
213
|
-
if state
|
|
214
|
+
if PyUnicode_CompareWithASCIIString(state, b"CANCELLED") == 0:
|
|
214
215
|
raise fut._make_cancelled_error()
|
|
215
216
|
raise InvalidStateError('Exception is not set.')
|
|
216
217
|
|
|
@@ -300,7 +301,7 @@ class SmartFuture(Future, Generic[T]):
|
|
|
300
301
|
|
|
301
302
|
def __await__(self) -> Generator[Any, None, T]:
|
|
302
303
|
"""
|
|
303
|
-
Await the
|
|
304
|
+
Await the future, handling waiters and logging.
|
|
304
305
|
|
|
305
306
|
Yields:
|
|
306
307
|
The result of the future or task.
|
|
@@ -450,7 +451,7 @@ class SmartTask(Task, Generic[T]):
|
|
|
450
451
|
|
|
451
452
|
def __await__(self) -> Generator[Any, None, T]:
|
|
452
453
|
"""
|
|
453
|
-
Await the
|
|
454
|
+
Await the task, handling waiters and logging.
|
|
454
455
|
|
|
455
456
|
Yields:
|
|
456
457
|
The result of the future or task.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|