ez-a-sync 0.32.11__cp310-cp310-win32.whl → 0.32.13__cp310-cp310-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.

Files changed (50) hide show
  1. a_sync/_smart.c +1122 -1133
  2. a_sync/_smart.cp310-win32.pyd +0 -0
  3. a_sync/_smart.pyx +11 -10
  4. a_sync/a_sync/_descriptor.cp310-win32.pyd +0 -0
  5. a_sync/a_sync/_flags.cp310-win32.pyd +0 -0
  6. a_sync/a_sync/_helpers.cp310-win32.pyd +0 -0
  7. a_sync/a_sync/_kwargs.cp310-win32.pyd +0 -0
  8. a_sync/a_sync/abstract.cp310-win32.pyd +0 -0
  9. a_sync/a_sync/base.cp310-win32.pyd +0 -0
  10. a_sync/a_sync/flags.cp310-win32.pyd +0 -0
  11. a_sync/a_sync/function.cp310-win32.pyd +0 -0
  12. a_sync/a_sync/method.cp310-win32.pyd +0 -0
  13. a_sync/a_sync/modifiers/manager.cp310-win32.pyd +0 -0
  14. a_sync/a_sync/property.cp310-win32.pyd +0 -0
  15. a_sync/async_property/cached.cp310-win32.pyd +0 -0
  16. a_sync/async_property/proxy.cp310-win32.pyd +0 -0
  17. a_sync/asyncio/as_completed.cp310-win32.pyd +0 -0
  18. a_sync/asyncio/create_task.c +735 -579
  19. a_sync/asyncio/create_task.cp310-win32.pyd +0 -0
  20. a_sync/asyncio/create_task.pyx +7 -4
  21. a_sync/asyncio/gather.cp310-win32.pyd +0 -0
  22. a_sync/asyncio/igather.cp310-win32.pyd +0 -0
  23. a_sync/asyncio/sleep.cp310-win32.pyd +0 -0
  24. a_sync/debugging.c +3 -2
  25. a_sync/debugging.cp310-win32.pyd +0 -0
  26. a_sync/exceptions.cp310-win32.pyd +0 -0
  27. a_sync/functools.cp310-win32.pyd +0 -0
  28. a_sync/iter.c +216 -81
  29. a_sync/iter.cp310-win32.pyd +0 -0
  30. a_sync/iter.pxd +2 -0
  31. a_sync/primitives/_debug.cp310-win32.pyd +0 -0
  32. a_sync/primitives/_loggable.cp310-win32.pyd +0 -0
  33. a_sync/primitives/locks/counter.cp310-win32.pyd +0 -0
  34. a_sync/primitives/locks/event.c +426 -428
  35. a_sync/primitives/locks/event.cp310-win32.pyd +0 -0
  36. a_sync/primitives/locks/event.pyx +3 -1
  37. a_sync/primitives/locks/prio_semaphore.c +2623 -1503
  38. a_sync/primitives/locks/prio_semaphore.cp310-win32.pyd +0 -0
  39. a_sync/primitives/locks/prio_semaphore.pxd +9 -8
  40. a_sync/primitives/locks/prio_semaphore.pyx +65 -22
  41. a_sync/primitives/locks/semaphore.c +1048 -1051
  42. a_sync/primitives/locks/semaphore.cp310-win32.pyd +0 -0
  43. a_sync/primitives/locks/semaphore.pyx +4 -2
  44. a_sync/task.py +22 -6
  45. a_sync/utils/repr.cp310-win32.pyd +0 -0
  46. {ez_a_sync-0.32.11.dist-info → ez_a_sync-0.32.13.dist-info}/METADATA +1 -1
  47. {ez_a_sync-0.32.11.dist-info → ez_a_sync-0.32.13.dist-info}/RECORD +50 -50
  48. {ez_a_sync-0.32.11.dist-info → ez_a_sync-0.32.13.dist-info}/WHEEL +1 -1
  49. {ez_a_sync-0.32.11.dist-info → ez_a_sync-0.32.13.dist-info}/licenses/LICENSE.txt +0 -0
  50. {ez_a_sync-0.32.11.dist-info → ez_a_sync-0.32.13.dist-info}/top_level.txt +0 -0
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 <str>fut._state != "PENDING"
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 <str>fut._state == "PENDING"
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 <str>fut._state == "CANCELLED"
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 == "FINISHED":
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 == "CANCELLED":
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 == "FINISHED":
211
+ if PyUnicode_CompareWithASCIIString(state, b"FINISHED") == 0:
211
212
  fut._Future__log_traceback = False
212
213
  return fut._exception
213
- if state == "CANCELLED":
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 smart future or task, handling waiters and logging.
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 smart future or task, handling waiters and logging.
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