ez-a-sync 0.32.13__cp39-cp39-musllinux_1_2_i686.whl → 0.32.15__cp39-cp39-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.

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
 
@@ -34,12 +35,12 @@ cdef object get_event_loop = asyncio.get_event_loop
34
35
  cdef object AbstractEventLoop = asyncio.AbstractEventLoop
35
36
  cdef object Future = asyncio.Future
36
37
  cdef object Task = asyncio.Task
38
+ cdef object CancelledError = asyncio.CancelledError
37
39
  cdef object InvalidStateError = asyncio.InvalidStateError
38
40
  cdef dict[object, object] _current_tasks = asyncio.tasks._current_tasks
39
41
  cdef object _future_init = asyncio.Future.__init__
40
42
  cdef object _get_loop = asyncio.futures._get_loop
41
43
  cdef object _task_init = asyncio.Task.__init__
42
- del asyncio
43
44
 
44
45
  # cdef logging
45
46
  cdef public object logger = getLogger(__name__)
@@ -510,6 +511,22 @@ class SmartTask(Task, Generic[T]):
510
511
  if _is_not_done(self):
511
512
  (<set>self._waiters).remove(waiter)
512
513
 
514
+ def _make_cancelled_error(self) -> asyncio.CancelledError:
515
+ # this function is not present in python3.8 so we're backporting it
516
+ """Create the CancelledError to raise if the Future is cancelled.
517
+
518
+ This should only be called once when handling a cancellation since
519
+ it erases the saved context exception value.
520
+ """
521
+ if PY_VERSION_HEX < "0x03090000" or self._cancel_message is None:
522
+ exc = CancelledError()
523
+ else:
524
+ exc = CancelledError(self._cancel_message)
525
+ exc.__context__ = self._cancelled_exc
526
+ # Remove the reference since we don't need this anymore.
527
+ self._cancelled_exc = None
528
+ return exc
529
+
513
530
 
514
531
  cdef object _SmartTask = SmartTask
515
532
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ez_a_sync
3
- Version: 0.32.13
3
+ Version: 0.32.15
4
4
  Summary: A library that makes it easy to define objects that can be used for both sync and async use cases.
5
5
  Home-page: https://github.com/BobTheBuidler/a-sync
6
6
  Author: BobTheBuidler
@@ -1,11 +1,11 @@
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=v4LKFLjQiZylytn_f7uoWYvziiKnwJK6lj6gNhIyWKw,913352
5
- a_sync/_smart.cpython-39-i386-linux-gnu.so,sha256=iJEvhiOt95iKWTp5YivZVmcHgTszb3bwbZ-vOSxoRnk,899932
4
+ a_sync/_smart.c,sha256=M_pxk1D2tQ8mQei-trBm5-mGkmYpibtgmYAG8_Fc_Jc,934419
5
+ a_sync/_smart.cpython-39-i386-linux-gnu.so,sha256=U8VVUSADYdZR0Pa5LhGPHb4xAoG31BuAD7HIak1C8EA,923540
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=H69s97xyiuYZcF5k_pXv8c50g40kkooKkSAsSH7359U,19459
8
+ a_sync/_smart.pyx,sha256=U61YXFAFcTi10YVXeCRgxJC2HykBPhLfpF0lS6zYfNQ,20241
9
9
  a_sync/_typing.py,sha256=x24VIVjxz8sUWPmQR072pHAQxJO769Nn02f3eakFpe8,6850
10
10
  a_sync/aliases.py,sha256=TbLyuLeFfJEmcC5-NP6h4DQ9QXlQjGny2NUP_x1tflw,212
11
11
  a_sync/debugging.c,sha256=RfJnHds7wZdPmWg5PYc26nqjOQijqdOMMbGk43tvUhU,589339
@@ -170,8 +170,8 @@ a_sync/utils/repr.c,sha256=4HDcDzNN4_R5Z_QrhMy9kxWXK7iALDKpa--_D0k6_-Y,571751
170
170
  a_sync/utils/repr.cpython-39-i386-linux-gnu.so,sha256=15pScYq5AOWLNsWGlSqqxzeD3MWHznpHGcmxzKfLwzg,526840
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.13.dist-info/METADATA,sha256=UR-xEgaccDdRssgXeftsqT0ChtluUZW0hDBbFW03HW0,13197
174
- ez_a_sync-0.32.13.dist-info/WHEEL,sha256=FRTBvHiZr68KqalqhOSX6aK1htzqsWAmhrFNf1oIuHI,108
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
173
+ ez_a_sync-0.32.15.dist-info/METADATA,sha256=eBoOPV83KbkLoPxFk77LFMoc8j-7zK1fPnFmD3m2gCo,13197
174
+ ez_a_sync-0.32.15.dist-info/WHEEL,sha256=FRTBvHiZr68KqalqhOSX6aK1htzqsWAmhrFNf1oIuHI,108
175
+ ez_a_sync-0.32.15.dist-info/top_level.txt,sha256=ew2xVyFeZE_a5XMEL64h7-vJIbaBQieaFcvBAWUpU_s,7
176
+ ez_a_sync-0.32.15.dist-info/RECORD,,
177
+ ez_a_sync-0.32.15.dist-info/licenses/LICENSE.txt,sha256=1on6-17OUMlja6vSPTcmlmeT_DwujCZJijYxaplBvZk,1075