ez-a-sync 0.32.14__cp38-cp38-macosx_11_0_arm64.whl → 0.32.16__cp38-cp38-macosx_11_0_arm64.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.

Files changed (41) hide show
  1. a_sync/_smart.c +1360 -1606
  2. a_sync/_smart.cpython-38-darwin.so +0 -0
  3. a_sync/_smart.pyx +11 -18
  4. a_sync/a_sync/_descriptor.cpython-38-darwin.so +0 -0
  5. a_sync/a_sync/_flags.cpython-38-darwin.so +0 -0
  6. a_sync/a_sync/_helpers.cpython-38-darwin.so +0 -0
  7. a_sync/a_sync/_kwargs.cpython-38-darwin.so +0 -0
  8. a_sync/a_sync/abstract.cpython-38-darwin.so +0 -0
  9. a_sync/a_sync/base.cpython-38-darwin.so +0 -0
  10. a_sync/a_sync/flags.cpython-38-darwin.so +0 -0
  11. a_sync/a_sync/function.cpython-38-darwin.so +0 -0
  12. a_sync/a_sync/method.cpython-38-darwin.so +0 -0
  13. a_sync/a_sync/modifiers/manager.cpython-38-darwin.so +0 -0
  14. a_sync/a_sync/property.cpython-38-darwin.so +0 -0
  15. a_sync/async_property/cached.cpython-38-darwin.so +0 -0
  16. a_sync/async_property/proxy.cpython-38-darwin.so +0 -0
  17. a_sync/asyncio/as_completed.cpython-38-darwin.so +0 -0
  18. a_sync/asyncio/create_task.c +680 -759
  19. a_sync/asyncio/create_task.cpython-38-darwin.so +0 -0
  20. a_sync/asyncio/create_task.pyx +7 -2
  21. a_sync/asyncio/gather.cpython-38-darwin.so +0 -0
  22. a_sync/asyncio/igather.c +1039 -1389
  23. a_sync/asyncio/igather.cpython-38-darwin.so +0 -0
  24. a_sync/asyncio/igather.pyx +19 -12
  25. a_sync/asyncio/sleep.cpython-38-darwin.so +0 -0
  26. a_sync/debugging.cpython-38-darwin.so +0 -0
  27. a_sync/exceptions.cpython-38-darwin.so +0 -0
  28. a_sync/functools.cpython-38-darwin.so +0 -0
  29. a_sync/iter.cpython-38-darwin.so +0 -0
  30. a_sync/primitives/_debug.cpython-38-darwin.so +0 -0
  31. a_sync/primitives/_loggable.cpython-38-darwin.so +0 -0
  32. a_sync/primitives/locks/counter.cpython-38-darwin.so +0 -0
  33. a_sync/primitives/locks/event.cpython-38-darwin.so +0 -0
  34. a_sync/primitives/locks/prio_semaphore.cpython-38-darwin.so +0 -0
  35. a_sync/primitives/locks/semaphore.cpython-38-darwin.so +0 -0
  36. a_sync/utils/repr.cpython-38-darwin.so +0 -0
  37. {ez_a_sync-0.32.14.dist-info → ez_a_sync-0.32.16.dist-info}/METADATA +1 -1
  38. {ez_a_sync-0.32.14.dist-info → ez_a_sync-0.32.16.dist-info}/RECORD +41 -41
  39. {ez_a_sync-0.32.14.dist-info → ez_a_sync-0.32.16.dist-info}/LICENSE.txt +0 -0
  40. {ez_a_sync-0.32.14.dist-info → ez_a_sync-0.32.16.dist-info}/WHEEL +0 -0
  41. {ez_a_sync-0.32.14.dist-info → ez_a_sync-0.32.16.dist-info}/top_level.txt +0 -0
Binary file
a_sync/_smart.pyx CHANGED
@@ -15,6 +15,7 @@ cimport cython
15
15
  from cpython.object cimport PyObject
16
16
  from cpython.ref cimport Py_DECREF, Py_INCREF
17
17
  from cpython.unicode cimport PyUnicode_CompareWithASCIIString
18
+ from cpython.version cimport PY_VERSION_HEX
18
19
 
19
20
  from a_sync._typing import T
20
21
 
@@ -195,7 +196,11 @@ cdef object _get_result(fut: Union["SmartFuture", "SmartTask"]):
195
196
  raise exc.with_traceback(cached_traceback) from exc.__cause__
196
197
  return fut._result
197
198
  if PyUnicode_CompareWithASCIIString(state, b"CANCELLED") == 0:
198
- raise fut._make_cancelled_error()
199
+ raise (
200
+ CancelledError()
201
+ if PY_VERSION_HEX < 0x03090000 # Python 3.9
202
+ else fut._make_cancelled_error()
203
+ )
199
204
  raise InvalidStateError('Result is not ready.')
200
205
 
201
206
  @cython.linetrace(False)
@@ -212,7 +217,11 @@ cdef object _get_exception(fut: Future):
212
217
  fut._Future__log_traceback = False
213
218
  return fut._exception
214
219
  if PyUnicode_CompareWithASCIIString(state, b"CANCELLED") == 0:
215
- raise fut._make_cancelled_error()
220
+ raise (
221
+ CancelledError()
222
+ if PY_VERSION_HEX < 0x03090000 # Python 3.9
223
+ else fut._make_cancelled_error()
224
+ )
216
225
  raise InvalidStateError('Exception is not set.')
217
226
 
218
227
 
@@ -510,22 +519,6 @@ class SmartTask(Task, Generic[T]):
510
519
  if _is_not_done(self):
511
520
  (<set>self._waiters).remove(waiter)
512
521
 
513
- def _make_cancelled_error(self) -> asyncio.CancelledError:
514
- # this function is not present in python3.8 so we're backporting it
515
- """Create the CancelledError to raise if the Future is cancelled.
516
-
517
- This should only be called once when handling a cancellation since
518
- it erases the saved context exception value.
519
- """
520
- if self._cancel_message is None:
521
- exc = CancelledError()
522
- else:
523
- exc = CancelledError(self._cancel_message)
524
- exc.__context__ = self._cancelled_exc
525
- # Remove the reference since we don't need this anymore.
526
- self._cancelled_exc = None
527
- return exc
528
-
529
522
 
530
523
  cdef object _SmartTask = SmartTask
531
524
 
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file