ez-a-sync 0.33.4__cp313-cp313-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.
Files changed (177) hide show
  1. a_sync/ENVIRONMENT_VARIABLES.py +42 -0
  2. a_sync/__init__.pxd +2 -0
  3. a_sync/__init__.py +145 -0
  4. a_sync/_smart.c +22830 -0
  5. a_sync/_smart.cpython-313-i386-linux-musl.so +0 -0
  6. a_sync/_smart.pxd +2 -0
  7. a_sync/_smart.pyi +202 -0
  8. a_sync/_smart.pyx +674 -0
  9. a_sync/_typing.py +258 -0
  10. a_sync/a_sync/__init__.py +60 -0
  11. a_sync/a_sync/_descriptor.c +20537 -0
  12. a_sync/a_sync/_descriptor.cpython-313-i386-linux-musl.so +0 -0
  13. a_sync/a_sync/_descriptor.pyi +33 -0
  14. a_sync/a_sync/_descriptor.pyx +422 -0
  15. a_sync/a_sync/_flags.c +6082 -0
  16. a_sync/a_sync/_flags.cpython-313-i386-linux-musl.so +0 -0
  17. a_sync/a_sync/_flags.pxd +3 -0
  18. a_sync/a_sync/_flags.pyx +92 -0
  19. a_sync/a_sync/_helpers.c +14529 -0
  20. a_sync/a_sync/_helpers.cpython-313-i386-linux-musl.so +0 -0
  21. a_sync/a_sync/_helpers.pxd +3 -0
  22. a_sync/a_sync/_helpers.pyi +10 -0
  23. a_sync/a_sync/_helpers.pyx +167 -0
  24. a_sync/a_sync/_kwargs.c +12202 -0
  25. a_sync/a_sync/_kwargs.cpython-313-i386-linux-musl.so +0 -0
  26. a_sync/a_sync/_kwargs.pxd +2 -0
  27. a_sync/a_sync/_kwargs.pyx +64 -0
  28. a_sync/a_sync/_meta.py +210 -0
  29. a_sync/a_sync/abstract.c +12420 -0
  30. a_sync/a_sync/abstract.cpython-313-i386-linux-musl.so +0 -0
  31. a_sync/a_sync/abstract.pyi +141 -0
  32. a_sync/a_sync/abstract.pyx +221 -0
  33. a_sync/a_sync/base.c +14940 -0
  34. a_sync/a_sync/base.cpython-313-i386-linux-musl.so +0 -0
  35. a_sync/a_sync/base.pyi +60 -0
  36. a_sync/a_sync/base.pyx +271 -0
  37. a_sync/a_sync/config.py +168 -0
  38. a_sync/a_sync/decorator.py +651 -0
  39. a_sync/a_sync/flags.c +5272 -0
  40. a_sync/a_sync/flags.cpython-313-i386-linux-musl.so +0 -0
  41. a_sync/a_sync/flags.pxd +72 -0
  42. a_sync/a_sync/flags.pyi +74 -0
  43. a_sync/a_sync/flags.pyx +72 -0
  44. a_sync/a_sync/function.c +37856 -0
  45. a_sync/a_sync/function.cpython-313-i386-linux-musl.so +0 -0
  46. a_sync/a_sync/function.pxd +28 -0
  47. a_sync/a_sync/function.pyi +571 -0
  48. a_sync/a_sync/function.pyx +1381 -0
  49. a_sync/a_sync/method.c +29662 -0
  50. a_sync/a_sync/method.cpython-313-i386-linux-musl.so +0 -0
  51. a_sync/a_sync/method.pxd +9 -0
  52. a_sync/a_sync/method.pyi +523 -0
  53. a_sync/a_sync/method.pyx +1023 -0
  54. a_sync/a_sync/modifiers/__init__.pxd +1 -0
  55. a_sync/a_sync/modifiers/__init__.py +101 -0
  56. a_sync/a_sync/modifiers/cache/__init__.py +160 -0
  57. a_sync/a_sync/modifiers/cache/memory.py +165 -0
  58. a_sync/a_sync/modifiers/limiter.py +132 -0
  59. a_sync/a_sync/modifiers/manager.c +16157 -0
  60. a_sync/a_sync/modifiers/manager.cpython-313-i386-linux-musl.so +0 -0
  61. a_sync/a_sync/modifiers/manager.pxd +5 -0
  62. a_sync/a_sync/modifiers/manager.pyi +219 -0
  63. a_sync/a_sync/modifiers/manager.pyx +299 -0
  64. a_sync/a_sync/modifiers/semaphores.py +173 -0
  65. a_sync/a_sync/property.c +27268 -0
  66. a_sync/a_sync/property.cpython-313-i386-linux-musl.so +0 -0
  67. a_sync/a_sync/property.pyi +376 -0
  68. a_sync/a_sync/property.pyx +819 -0
  69. a_sync/a_sync/singleton.py +63 -0
  70. a_sync/aliases.py +3 -0
  71. a_sync/async_property/__init__.pxd +1 -0
  72. a_sync/async_property/__init__.py +1 -0
  73. a_sync/async_property/cached.c +20397 -0
  74. a_sync/async_property/cached.cpython-313-i386-linux-musl.so +0 -0
  75. a_sync/async_property/cached.pxd +10 -0
  76. a_sync/async_property/cached.pyi +45 -0
  77. a_sync/async_property/cached.pyx +178 -0
  78. a_sync/async_property/proxy.c +34662 -0
  79. a_sync/async_property/proxy.cpython-313-i386-linux-musl.so +0 -0
  80. a_sync/async_property/proxy.pxd +2 -0
  81. a_sync/async_property/proxy.pyi +124 -0
  82. a_sync/async_property/proxy.pyx +474 -0
  83. a_sync/asyncio/__init__.pxd +6 -0
  84. a_sync/asyncio/__init__.py +164 -0
  85. a_sync/asyncio/as_completed.c +18849 -0
  86. a_sync/asyncio/as_completed.cpython-313-i386-linux-musl.so +0 -0
  87. a_sync/asyncio/as_completed.pxd +8 -0
  88. a_sync/asyncio/as_completed.pyi +109 -0
  89. a_sync/asyncio/as_completed.pyx +269 -0
  90. a_sync/asyncio/create_task.c +15912 -0
  91. a_sync/asyncio/create_task.cpython-313-i386-linux-musl.so +0 -0
  92. a_sync/asyncio/create_task.pxd +2 -0
  93. a_sync/asyncio/create_task.pyi +51 -0
  94. a_sync/asyncio/create_task.pyx +271 -0
  95. a_sync/asyncio/gather.c +16687 -0
  96. a_sync/asyncio/gather.cpython-313-i386-linux-musl.so +0 -0
  97. a_sync/asyncio/gather.pyi +107 -0
  98. a_sync/asyncio/gather.pyx +218 -0
  99. a_sync/asyncio/igather.c +13080 -0
  100. a_sync/asyncio/igather.cpython-313-i386-linux-musl.so +0 -0
  101. a_sync/asyncio/igather.pxd +1 -0
  102. a_sync/asyncio/igather.pyi +8 -0
  103. a_sync/asyncio/igather.pyx +183 -0
  104. a_sync/asyncio/sleep.c +9601 -0
  105. a_sync/asyncio/sleep.cpython-313-i386-linux-musl.so +0 -0
  106. a_sync/asyncio/sleep.pyi +14 -0
  107. a_sync/asyncio/sleep.pyx +49 -0
  108. a_sync/debugging.c +15370 -0
  109. a_sync/debugging.cpython-313-i386-linux-musl.so +0 -0
  110. a_sync/debugging.pyi +76 -0
  111. a_sync/debugging.pyx +107 -0
  112. a_sync/exceptions.c +13320 -0
  113. a_sync/exceptions.cpython-313-i386-linux-musl.so +0 -0
  114. a_sync/exceptions.pyi +376 -0
  115. a_sync/exceptions.pyx +446 -0
  116. a_sync/executor.py +619 -0
  117. a_sync/functools.c +12746 -0
  118. a_sync/functools.cpython-313-i386-linux-musl.so +0 -0
  119. a_sync/functools.pxd +7 -0
  120. a_sync/functools.pyi +33 -0
  121. a_sync/functools.pyx +139 -0
  122. a_sync/future.py +1497 -0
  123. a_sync/iter.c +37279 -0
  124. a_sync/iter.cpython-313-i386-linux-musl.so +0 -0
  125. a_sync/iter.pxd +11 -0
  126. a_sync/iter.pyi +370 -0
  127. a_sync/iter.pyx +981 -0
  128. a_sync/primitives/__init__.pxd +1 -0
  129. a_sync/primitives/__init__.py +53 -0
  130. a_sync/primitives/_debug.c +15765 -0
  131. a_sync/primitives/_debug.cpython-313-i386-linux-musl.so +0 -0
  132. a_sync/primitives/_debug.pxd +12 -0
  133. a_sync/primitives/_debug.pyi +52 -0
  134. a_sync/primitives/_debug.pyx +223 -0
  135. a_sync/primitives/_loggable.c +11538 -0
  136. a_sync/primitives/_loggable.cpython-313-i386-linux-musl.so +0 -0
  137. a_sync/primitives/_loggable.pxd +4 -0
  138. a_sync/primitives/_loggable.pyi +66 -0
  139. a_sync/primitives/_loggable.pyx +102 -0
  140. a_sync/primitives/locks/__init__.pxd +8 -0
  141. a_sync/primitives/locks/__init__.py +17 -0
  142. a_sync/primitives/locks/counter.c +17938 -0
  143. a_sync/primitives/locks/counter.cpython-313-i386-linux-musl.so +0 -0
  144. a_sync/primitives/locks/counter.pxd +12 -0
  145. a_sync/primitives/locks/counter.pyi +151 -0
  146. a_sync/primitives/locks/counter.pyx +267 -0
  147. a_sync/primitives/locks/event.c +17072 -0
  148. a_sync/primitives/locks/event.cpython-313-i386-linux-musl.so +0 -0
  149. a_sync/primitives/locks/event.pxd +22 -0
  150. a_sync/primitives/locks/event.pyi +43 -0
  151. a_sync/primitives/locks/event.pyx +185 -0
  152. a_sync/primitives/locks/prio_semaphore.c +25635 -0
  153. a_sync/primitives/locks/prio_semaphore.cpython-313-i386-linux-musl.so +0 -0
  154. a_sync/primitives/locks/prio_semaphore.pxd +25 -0
  155. a_sync/primitives/locks/prio_semaphore.pyi +217 -0
  156. a_sync/primitives/locks/prio_semaphore.pyx +597 -0
  157. a_sync/primitives/locks/semaphore.c +26553 -0
  158. a_sync/primitives/locks/semaphore.cpython-313-i386-linux-musl.so +0 -0
  159. a_sync/primitives/locks/semaphore.pxd +21 -0
  160. a_sync/primitives/locks/semaphore.pyi +197 -0
  161. a_sync/primitives/locks/semaphore.pyx +454 -0
  162. a_sync/primitives/queue.py +1026 -0
  163. a_sync/py.typed +0 -0
  164. a_sync/sphinx/__init__.py +3 -0
  165. a_sync/sphinx/ext.py +289 -0
  166. a_sync/task.py +934 -0
  167. a_sync/utils/__init__.py +105 -0
  168. a_sync/utils/iterators.py +297 -0
  169. a_sync/utils/repr.c +15866 -0
  170. a_sync/utils/repr.cpython-313-i386-linux-musl.so +0 -0
  171. a_sync/utils/repr.pyi +2 -0
  172. a_sync/utils/repr.pyx +73 -0
  173. ez_a_sync-0.33.4.dist-info/METADATA +368 -0
  174. ez_a_sync-0.33.4.dist-info/RECORD +177 -0
  175. ez_a_sync-0.33.4.dist-info/WHEEL +5 -0
  176. ez_a_sync-0.33.4.dist-info/licenses/LICENSE.txt +17 -0
  177. ez_a_sync-0.33.4.dist-info/top_level.txt +1 -0
@@ -0,0 +1,2 @@
1
+ cdef class AwaitableOnly:
2
+ cdef object _coro
@@ -0,0 +1,124 @@
1
+ from typing import Any, Awaitable, Generator, Generic, TypeVar
2
+
3
+ __T = TypeVar("__T")
4
+
5
+ class AwaitableOnly(Generic[__T]):
6
+ """This wraps a coroutine will call it on await."""
7
+
8
+ def __init__(self, coro: Awaitable[__T]) -> None: ...
9
+ def __await__(self) -> Generator[Any, None, __T]: ...
10
+
11
+ class _ObjectProxyMethods:
12
+ @property
13
+ def __module__(self): ...
14
+ @__module__.setter
15
+ def __module__(self, value) -> None: ...
16
+ @property
17
+ def __doc__(self): ...
18
+ @__doc__.setter
19
+ def __doc__(self, value) -> None: ...
20
+ @property
21
+ def __dict__(self): ...
22
+ @property
23
+ def __weakref__(self): ...
24
+
25
+ class _ObjectProxyMetaType(type):
26
+ def __new__(cls, name, bases, dictionary): ...
27
+
28
+ class ObjectProxy(Generic[__T], metaclass=_ObjectProxyMetaType):
29
+ def __init__(self, wrapped) -> None: ...
30
+ @property
31
+ def __class__(self): ...
32
+ @__class__.setter
33
+ def __class__(self, value) -> None: ...
34
+ @property
35
+ def __annotations__(self): ...
36
+ @__annotations__.setter
37
+ def __annotations__(self, value) -> None: ...
38
+ def __dir__(self): ...
39
+ def __bytes__(self) -> bytes: ...
40
+ def __reversed__(self): ...
41
+ def __round__(self): ...
42
+ def __lt__(self, other): ...
43
+ def __le__(self, other): ...
44
+ def __eq__(self, other): ...
45
+ def __ne__(self, other): ...
46
+ def __gt__(self, other): ...
47
+ def __ge__(self, other): ...
48
+ def __hash__(self): ...
49
+ def __bool__(self) -> bool: ...
50
+ def __setattr__(self, name, value) -> None: ...
51
+ def __getattr__(self, name): ...
52
+ def __delattr__(self, name) -> None: ...
53
+ def __add__(self, other): ...
54
+ def __sub__(self, other): ...
55
+ def __mul__(self, other): ...
56
+ def __truediv__(self, other): ...
57
+ def __floordiv__(self, other): ...
58
+ def __mod__(self, other): ...
59
+ def __divmod__(self, other): ...
60
+ def __pow__(self, other, *args): ...
61
+ def __lshift__(self, other): ...
62
+ def __rshift__(self, other): ...
63
+ def __and__(self, other): ...
64
+ def __xor__(self, other): ...
65
+ def __or__(self, other): ...
66
+ def __radd__(self, other): ...
67
+ def __rsub__(self, other): ...
68
+ def __rmul__(self, other): ...
69
+ def __rtruediv__(self, other): ...
70
+ def __rfloordiv__(self, other): ...
71
+ def __rmod__(self, other): ...
72
+ def __rdivmod__(self, other): ...
73
+ def __rpow__(self, other, *args): ...
74
+ def __rlshift__(self, other): ...
75
+ def __rrshift__(self, other): ...
76
+ def __rand__(self, other): ...
77
+ def __rxor__(self, other): ...
78
+ def __ror__(self, other): ...
79
+ def __iadd__(self, other): ...
80
+ def __isub__(self, other): ...
81
+ def __imul__(self, other): ...
82
+ __wrapped__: __T
83
+ def __itruediv__(self, other): ...
84
+ def __ifloordiv__(self, other): ...
85
+ def __imod__(self, other): ...
86
+ def __ipow__(self, other): ...
87
+ def __ilshift__(self, other): ...
88
+ def __irshift__(self, other): ...
89
+ def __iand__(self, other): ...
90
+ def __ixor__(self, other): ...
91
+ def __ior__(self, other): ...
92
+ def __neg__(self): ...
93
+ def __pos__(self): ...
94
+ def __abs__(self): ...
95
+ def __invert__(self): ...
96
+ def __int__(self) -> int: ...
97
+ def __float__(self) -> float: ...
98
+ def __complex__(self) -> complex: ...
99
+ def __oct__(self): ...
100
+ def __hex__(self): ...
101
+ def __index__(self) -> int: ...
102
+ def __len__(self) -> int: ...
103
+ def __contains__(self, value) -> bool: ...
104
+ def __getitem__(self, key): ...
105
+ def __setitem__(self, key, value) -> None: ...
106
+ def __delitem__(self, key) -> None: ...
107
+ def __getslice__(self, i, j): ...
108
+ def __setslice__(self, i, j, value) -> None: ...
109
+ def __delslice__(self, i, j) -> None: ...
110
+ def __enter__(self): ...
111
+ def __exit__(self, *args, **kwargs): ...
112
+ def __iter__(self): ...
113
+ def __copy__(self) -> None: ...
114
+ def __deepcopy__(self, memo) -> None: ...
115
+ def __reduce__(self) -> None: ...
116
+ def __reduce_ex__(self, protocol) -> None: ...
117
+ def __call__(self, *args, **kwargs): ...
118
+
119
+ class AwaitableProxy(ObjectProxy[__T]):
120
+ def __await__(self) -> Generator[Any, None, __T]: ...
121
+ async def __aenter__(self): ...
122
+ async def __aexit__(self, *args, **kwargs): ...
123
+ async def __aiter__(self): ...
124
+ async def __anext__(self): ...
@@ -0,0 +1,474 @@
1
+
2
+ import operator
3
+ cdef object index = operator.index
4
+ cdef object truediv = operator.truediv
5
+ cdef object itruediv = operator.itruediv
6
+ del operator
7
+
8
+ cdef class AwaitableOnly:
9
+ """This wraps a coroutine will call it on await."""
10
+
11
+ def __cinit__(self, object coro):
12
+ self._coro = coro
13
+
14
+ def __repr__(self):
15
+ return f'<AwaitableOnly "{self._coro.__qualname__}">'
16
+
17
+ def __await__(self):
18
+ return self._coro().__await__()
19
+
20
+
21
+ # PURE PYTHON
22
+ """Below taken from: https://github.com/GrahamDumpleton/wrapt/blob/master/src/wrapt/wrappers.py
23
+
24
+ Copyright (c) 2013-2019, Graham Dumpleton
25
+ All rights reserved.
26
+
27
+ Redistribution and use in source and binary forms, with or without
28
+ modification, are permitted provided that the following conditions are met:
29
+
30
+ * Redistributions of source code must retain the above copyright notice, this
31
+ list of conditions and the following disclaimer.
32
+
33
+ * Redistributions in binary form must reproduce the above copyright notice,
34
+ this list of conditions and the following disclaimer in the documentation
35
+ and/or other materials provided with the distribution.
36
+
37
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
38
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
39
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
40
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
41
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
42
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
43
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
44
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
45
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
46
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
47
+ POSSIBILITY OF SUCH DAMAGE.
48
+ """
49
+
50
+
51
+ class _ObjectProxyMethods(object):
52
+
53
+ # We use properties to override the values of __module__ and
54
+ # __doc__. If we add these in ObjectProxy, the derived class
55
+ # __dict__ will still be setup to have string variants of these
56
+ # attributes and the rules of descriptors means that they appear to
57
+ # take precedence over the properties in the base class. To avoid
58
+ # that, we copy the properties into the derived class type itself
59
+ # via a meta class. In that way the properties will always take
60
+ # precedence.
61
+
62
+ @property
63
+ def __module__(self):
64
+ return self.__wrapped__.__module__
65
+
66
+ @__module__.setter
67
+ def __module__(self, value):
68
+ self.__wrapped__.__module__ = value
69
+
70
+ @property
71
+ def __doc__(self):
72
+ return self.__wrapped__.__doc__
73
+
74
+ @__doc__.setter
75
+ def __doc__(self, value):
76
+ self.__wrapped__.__doc__ = value
77
+
78
+ # We similar use a property for __dict__. We need __dict__ to be
79
+ # explicit to ensure that vars() works as expected.
80
+
81
+ @property
82
+ def __dict__(self):
83
+ return self.__wrapped__.__dict__
84
+
85
+ # Need to also propagate the special __weakref__ attribute for case
86
+ # where decorating classes which will define this. If do not define
87
+ # it and use a function like inspect.getmembers() on a decorator
88
+ # class it will fail. This can't be in the derived classes.
89
+
90
+ @property
91
+ def __weakref__(self):
92
+ return self.__wrapped__.__weakref__
93
+
94
+
95
+ class _ObjectProxyMetaType(type):
96
+ def __new__(cls, name, bases, dictionary):
97
+ # Copy our special properties into the class so that they
98
+ # always take precedence over attributes of the same name added
99
+ # during construction of a derived class. This is to save
100
+ # duplicating the implementation for them in all derived classes.
101
+
102
+ dictionary.update(vars(_ObjectProxyMethods))
103
+
104
+ return type.__new__(cls, name, bases, dictionary)
105
+
106
+
107
+ cdef object _setattr = object.__setattr__
108
+ cdef object _delattr = object.__delattr__
109
+
110
+ class ObjectProxy(metaclass=_ObjectProxyMetaType):
111
+
112
+ __slots__ = '__wrapped__'
113
+
114
+ def __init__(self, wrapped):
115
+ _setattr(self, '__wrapped__', wrapped)
116
+
117
+ # Python 3.2+ has the __qualname__ attribute, but it does not
118
+ # allow it to be overridden using a property and it must instead
119
+ # be an actual string object instead.
120
+
121
+ # We are skipping the below code block that was in the original implementation due to
122
+ # results of my profiling and the fact that it isn't really relevant for most users.
123
+ """
124
+ try:
125
+ _setattr(self, '__qualname__', wrapped.__qualname__)
126
+ except AttributeError:
127
+ pass
128
+ """
129
+
130
+ @property
131
+ def __name__(self):
132
+ return self.__wrapped__.__name__
133
+
134
+ @__name__.setter
135
+ def __name__(self, value):
136
+ self.__wrapped__.__name__ = value
137
+
138
+ @property
139
+ def __class__(self):
140
+ return self.__wrapped__.__class__
141
+
142
+ @__class__.setter
143
+ def __class__(self, value):
144
+ self.__wrapped__.__class__ = value
145
+
146
+ @property
147
+ def __annotations__(self):
148
+ return self.__wrapped__.__annotations__
149
+
150
+ @__annotations__.setter
151
+ def __annotations__(self, value):
152
+ self.__wrapped__.__annotations__ = value
153
+
154
+ def __dir__(self):
155
+ return dir(self.__wrapped__)
156
+
157
+ def __str__(self):
158
+ return str(self.__wrapped__)
159
+
160
+ def __bytes__(self):
161
+ return bytes(self.__wrapped__)
162
+
163
+ def __repr__(self):
164
+ return '<{} at 0x{:x} for {} at 0x{:x}>'.format(
165
+ type(self).__name__, id(self),
166
+ type(self.__wrapped__).__name__,
167
+ id(self.__wrapped__))
168
+
169
+ def __reversed__(self):
170
+ return reversed(self.__wrapped__)
171
+
172
+ def __round__(self):
173
+ return round(self.__wrapped__)
174
+
175
+ def __lt__(self, other):
176
+ return self.__wrapped__ < other
177
+
178
+ def __le__(self, other):
179
+ return self.__wrapped__ <= other
180
+
181
+ def __eq__(self, other):
182
+ return self.__wrapped__ == other
183
+
184
+ def __ne__(self, other):
185
+ return self.__wrapped__ != other
186
+
187
+ def __gt__(self, other):
188
+ return self.__wrapped__ > other
189
+
190
+ def __ge__(self, other):
191
+ return self.__wrapped__ >= other
192
+
193
+ def __hash__(self):
194
+ return hash(self.__wrapped__)
195
+
196
+ def __bool__(self):
197
+ return bool(self.__wrapped__)
198
+
199
+ def __setattr__(self, name, value):
200
+ if name.startswith('_self_'):
201
+ _setattr(self, name, value)
202
+
203
+ elif name == '__wrapped__':
204
+ _setattr(self, name, value)
205
+ try:
206
+ _delattr(self, '__qualname__')
207
+ except AttributeError:
208
+ pass
209
+ try:
210
+ _setattr(self, '__qualname__', value.__qualname__)
211
+ except AttributeError:
212
+ pass
213
+
214
+ elif name == '__qualname__':
215
+ setattr(self.__wrapped__, name, value)
216
+ _setattr(self, name, value)
217
+
218
+ elif hasattr(type(self), name):
219
+ _setattr(self, name, value)
220
+
221
+ else:
222
+ setattr(self.__wrapped__, name, value)
223
+
224
+ def __getattr__(self, name):
225
+ # If we are being to lookup '__wrapped__' then the
226
+ # '__init__()' method cannot have been called.
227
+
228
+ if name == '__wrapped__':
229
+ raise ValueError('wrapper has not been initialised')
230
+
231
+ return getattr(self.__wrapped__, name)
232
+
233
+ def __delattr__(self, name):
234
+ if name.startswith('_self_'):
235
+ _delattr(self, name)
236
+
237
+ elif name == '__wrapped__':
238
+ raise TypeError('__wrapped__ must be an object')
239
+
240
+ elif name == '__qualname__':
241
+ _delattr(self, name)
242
+ delattr(self.__wrapped__, name)
243
+
244
+ elif hasattr(type(self), name):
245
+ _delattr(self, name)
246
+
247
+ else:
248
+ delattr(self.__wrapped__, name)
249
+
250
+ def __add__(self, other):
251
+ return self.__wrapped__ + other
252
+
253
+ def __sub__(self, other):
254
+ return self.__wrapped__ - other
255
+
256
+ def __mul__(self, other):
257
+ return self.__wrapped__ * other
258
+
259
+ def __truediv__(self, other):
260
+ return truediv(self.__wrapped__, other)
261
+
262
+ def __floordiv__(self, other):
263
+ return self.__wrapped__ // other
264
+
265
+ def __mod__(self, other):
266
+ return self.__wrapped__ % other
267
+
268
+ def __divmod__(self, other):
269
+ return divmod(self.__wrapped__, other)
270
+
271
+ def __pow__(self, other, *args):
272
+ return pow(self.__wrapped__, other, *args)
273
+
274
+ def __lshift__(self, other):
275
+ return self.__wrapped__ << other
276
+
277
+ def __rshift__(self, other):
278
+ return self.__wrapped__ >> other
279
+
280
+ def __and__(self, other):
281
+ return self.__wrapped__ & other
282
+
283
+ def __xor__(self, other):
284
+ return self.__wrapped__ ^ other
285
+
286
+ def __or__(self, other):
287
+ return self.__wrapped__ | other
288
+
289
+ def __radd__(self, other):
290
+ return other + self.__wrapped__
291
+
292
+ def __rsub__(self, other):
293
+ return other - self.__wrapped__
294
+
295
+ def __rmul__(self, other):
296
+ return other * self.__wrapped__
297
+
298
+ def __rtruediv__(self, other):
299
+ return truediv(other, self.__wrapped__)
300
+
301
+ def __rfloordiv__(self, other):
302
+ return other // self.__wrapped__
303
+
304
+ def __rmod__(self, other):
305
+ return other % self.__wrapped__
306
+
307
+ def __rdivmod__(self, other):
308
+ return divmod(other, self.__wrapped__)
309
+
310
+ def __rpow__(self, other, *args):
311
+ return pow(other, self.__wrapped__, *args)
312
+
313
+ def __rlshift__(self, other):
314
+ return other << self.__wrapped__
315
+
316
+ def __rrshift__(self, other):
317
+ return other >> self.__wrapped__
318
+
319
+ def __rand__(self, other):
320
+ return other & self.__wrapped__
321
+
322
+ def __rxor__(self, other):
323
+ return other ^ self.__wrapped__
324
+
325
+ def __ror__(self, other):
326
+ return other | self.__wrapped__
327
+
328
+ def __iadd__(self, other):
329
+ self.__wrapped__ += other
330
+ return self
331
+
332
+ def __isub__(self, other):
333
+ self.__wrapped__ -= other
334
+ return self
335
+
336
+ def __imul__(self, other):
337
+ self.__wrapped__ *= other
338
+ return self
339
+
340
+ def __itruediv__(self, other):
341
+ self.__wrapped__ = itruediv(self.__wrapped__, other)
342
+ return self
343
+
344
+ def __ifloordiv__(self, other):
345
+ self.__wrapped__ //= other
346
+ return self
347
+
348
+ def __imod__(self, other):
349
+ self.__wrapped__ %= other
350
+ return self
351
+
352
+ def __ipow__(self, other):
353
+ self.__wrapped__ **= other
354
+ return self
355
+
356
+ def __ilshift__(self, other):
357
+ self.__wrapped__ <<= other
358
+ return self
359
+
360
+ def __irshift__(self, other):
361
+ self.__wrapped__ >>= other
362
+ return self
363
+
364
+ def __iand__(self, other):
365
+ self.__wrapped__ &= other
366
+ return self
367
+
368
+ def __ixor__(self, other):
369
+ self.__wrapped__ ^= other
370
+ return self
371
+
372
+ def __ior__(self, other):
373
+ self.__wrapped__ |= other
374
+ return self
375
+
376
+ def __neg__(self):
377
+ return -self.__wrapped__
378
+
379
+ def __pos__(self):
380
+ return +self.__wrapped__
381
+
382
+ def __abs__(self):
383
+ return abs(self.__wrapped__)
384
+
385
+ def __invert__(self):
386
+ return ~self.__wrapped__
387
+
388
+ def __int__(self):
389
+ return int(self.__wrapped__)
390
+
391
+ def __float__(self):
392
+ return float(self.__wrapped__)
393
+
394
+ def __complex__(self):
395
+ return complex(self.__wrapped__)
396
+
397
+ def __oct__(self):
398
+ return oct(self.__wrapped__)
399
+
400
+ def __hex__(self):
401
+ return hex(self.__wrapped__)
402
+
403
+ def __index__(self):
404
+ return index(self.__wrapped__)
405
+
406
+ def __len__(self):
407
+ return len(self.__wrapped__)
408
+
409
+ def __contains__(self, value):
410
+ return value in self.__wrapped__
411
+
412
+ def __getitem__(self, key):
413
+ return self.__wrapped__[key]
414
+
415
+ def __setitem__(self, key, value):
416
+ self.__wrapped__[key] = value
417
+
418
+ def __delitem__(self, key):
419
+ del self.__wrapped__[key]
420
+
421
+ def __getslice__(self, i, j):
422
+ return self.__wrapped__[i:j]
423
+
424
+ def __setslice__(self, i, j, value):
425
+ self.__wrapped__[i:j] = value
426
+
427
+ def __delslice__(self, i, j):
428
+ del self.__wrapped__[i:j]
429
+
430
+ def __enter__(self):
431
+ return self.__wrapped__.__enter__()
432
+
433
+ def __exit__(self, *args, **kwargs):
434
+ return self.__wrapped__.__exit__(*args, **kwargs)
435
+
436
+ def __iter__(self):
437
+ return iter(self.__wrapped__)
438
+
439
+ def __copy__(self):
440
+ raise NotImplementedError('object proxy must define __copy__()')
441
+
442
+ def __deepcopy__(self, memo):
443
+ raise NotImplementedError('object proxy must define __deepcopy__()')
444
+
445
+ def __reduce__(self):
446
+ raise NotImplementedError(
447
+ 'object proxy must define __reduce_ex__()')
448
+
449
+ def __reduce_ex__(self, protocol):
450
+ raise NotImplementedError(
451
+ 'object proxy must define __reduce_ex__()')
452
+
453
+ def __call__(self, *args, **kwargs):
454
+ return self.__wrapped__(*args, **kwargs)
455
+
456
+
457
+ class AwaitableProxy(ObjectProxy):
458
+ def __await__(self):
459
+ return self.__get_wrapped().__await__()
460
+
461
+ async def __aenter__(self):
462
+ return await self.__wrapped__.__aenter__()
463
+
464
+ async def __aexit__(self, *args, **kwargs):
465
+ return await self.__wrapped__.__aexit__(*args, **kwargs)
466
+
467
+ async def __aiter__(self):
468
+ return await self.__wrapped__.__aiter__()
469
+
470
+ async def __anext__(self):
471
+ return await self.__wrapped__.__anext__()
472
+
473
+ async def __get_wrapped(self):
474
+ return self.__wrapped__
@@ -0,0 +1,6 @@
1
+ from a_sync.a_sync._helpers cimport get_event_loop
2
+ from a_sync.asyncio.as_completed cimport as_completed_mapping
3
+ from a_sync.asyncio.create_task cimport ccreate_task, ccreate_task_simple
4
+ from a_sync.asyncio.igather cimport cigather
5
+
6
+ __all__ = ["cigather", "ccreate_task", "ccreate_task_simple", "as_completed_mapping", "get_event_loop"]