ez-a-sync 0.32.27__cp39-cp39-win32.whl → 0.32.28__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 +51 -45
- a_sync/_smart.cp39-win32.pyd +0 -0
- a_sync/a_sync/_descriptor.c +63 -58
- a_sync/a_sync/_descriptor.cp39-win32.pyd +0 -0
- a_sync/a_sync/_flags.c +10 -10
- a_sync/a_sync/_flags.cp39-win32.pyd +0 -0
- a_sync/a_sync/_helpers.c +57 -52
- a_sync/a_sync/_helpers.cp39-win32.pyd +0 -0
- a_sync/a_sync/_kwargs.c +27 -22
- a_sync/a_sync/_kwargs.cp39-win32.pyd +0 -0
- a_sync/a_sync/abstract.c +46 -23
- a_sync/a_sync/abstract.cp39-win32.pyd +0 -0
- a_sync/a_sync/abstract.pyi +2 -2
- a_sync/a_sync/base.c +70 -60
- a_sync/a_sync/base.cp39-win32.pyd +0 -0
- a_sync/a_sync/flags.c +10 -10
- a_sync/a_sync/flags.cp39-win32.pyd +0 -0
- a_sync/a_sync/function.c +91 -76
- a_sync/a_sync/function.cp39-win32.pyd +0 -0
- a_sync/a_sync/method.c +96 -78
- a_sync/a_sync/method.cp39-win32.pyd +0 -0
- a_sync/a_sync/method.pyi +2 -1
- a_sync/a_sync/modifiers/manager.c +52 -46
- a_sync/a_sync/modifiers/manager.cp39-win32.pyd +0 -0
- a_sync/a_sync/property.c +86 -75
- a_sync/a_sync/property.cp39-win32.pyd +0 -0
- a_sync/async_property/cached.c +53 -48
- a_sync/async_property/cached.cp39-win32.pyd +0 -0
- a_sync/async_property/proxy.c +15 -10
- a_sync/async_property/proxy.cp39-win32.pyd +0 -0
- a_sync/asyncio/as_completed.c +15 -10
- a_sync/asyncio/as_completed.cp39-win32.pyd +0 -0
- a_sync/asyncio/create_task.c +49 -25
- a_sync/asyncio/create_task.cp39-win32.pyd +0 -0
- a_sync/asyncio/gather.c +24 -19
- a_sync/asyncio/gather.cp39-win32.pyd +0 -0
- a_sync/asyncio/igather.c +36 -26
- a_sync/asyncio/igather.cp39-win32.pyd +0 -0
- a_sync/asyncio/sleep.c +8 -3
- a_sync/asyncio/sleep.cp39-win32.pyd +0 -0
- a_sync/debugging.c +44 -38
- a_sync/debugging.cp39-win32.pyd +0 -0
- a_sync/exceptions.c +28 -19
- a_sync/exceptions.cp39-win32.pyd +0 -0
- a_sync/functools.c +15 -10
- a_sync/functools.cp39-win32.pyd +0 -0
- a_sync/iter.c +153 -97
- a_sync/iter.cp39-win32.pyd +0 -0
- a_sync/primitives/_debug.c +49 -44
- a_sync/primitives/_debug.cp39-win32.pyd +0 -0
- a_sync/primitives/_loggable.c +30 -19
- a_sync/primitives/_loggable.cp39-win32.pyd +0 -0
- a_sync/primitives/locks/counter.c +90 -74
- a_sync/primitives/locks/counter.cp39-win32.pyd +0 -0
- a_sync/primitives/locks/event.c +57 -51
- a_sync/primitives/locks/event.cp39-win32.pyd +0 -0
- a_sync/primitives/locks/prio_semaphore.c +111 -85
- a_sync/primitives/locks/prio_semaphore.cp39-win32.pyd +0 -0
- a_sync/primitives/locks/prio_semaphore.pyi +2 -2
- a_sync/primitives/locks/semaphore.c +85 -72
- a_sync/primitives/locks/semaphore.cp39-win32.pyd +0 -0
- a_sync/primitives/locks/semaphore.pyi +10 -9
- a_sync/primitives/queue.py +5 -1
- a_sync/utils/repr.c +46 -40
- a_sync/utils/repr.cp39-win32.pyd +0 -0
- {ez_a_sync-0.32.27.dist-info → ez_a_sync-0.32.28.dist-info}/METADATA +1 -1
- {ez_a_sync-0.32.27.dist-info → ez_a_sync-0.32.28.dist-info}/RECORD +70 -70
- {ez_a_sync-0.32.27.dist-info → ez_a_sync-0.32.28.dist-info}/WHEEL +0 -0
- {ez_a_sync-0.32.27.dist-info → ez_a_sync-0.32.28.dist-info}/licenses/LICENSE.txt +0 -0
- {ez_a_sync-0.32.27.dist-info → ez_a_sync-0.32.28.dist-info}/top_level.txt +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Generated by Cython 3.1.
|
|
1
|
+
/* Generated by Cython 3.1.4 */
|
|
2
2
|
|
|
3
3
|
/* BEGIN: Cython Metadata
|
|
4
4
|
{
|
|
@@ -30,8 +30,8 @@ END: Cython Metadata */
|
|
|
30
30
|
#elif PY_VERSION_HEX < 0x03080000
|
|
31
31
|
#error Cython requires Python 3.8+.
|
|
32
32
|
#else
|
|
33
|
-
#define __PYX_ABI_VERSION "
|
|
34
|
-
#define CYTHON_HEX_VERSION
|
|
33
|
+
#define __PYX_ABI_VERSION "3_1_4"
|
|
34
|
+
#define CYTHON_HEX_VERSION 0x030104F0
|
|
35
35
|
#define CYTHON_FUTURE_DIVISION 1
|
|
36
36
|
/* CModulePreamble */
|
|
37
37
|
#include <stddef.h>
|
|
@@ -2251,18 +2251,18 @@ static void __Pyx_RejectKeywords(const char* function_name, PyObject *kwds);
|
|
|
2251
2251
|
if (!__Pyx_PyThreadState_Current->tracing) {\
|
|
2252
2252
|
if (likely(__pyx_frame_code)) Py_INCREF(__pyx_frame_code);\
|
|
2253
2253
|
else __pyx_frame_code = (PyObject*) __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);\
|
|
2254
|
-
if (unlikely(!__pyx_frame_code))
|
|
2255
|
-
ret = __Pyx__TraceStartFunc(__pyx_pymonitoring_state, __pyx_frame_code, offset, skip_event);\
|
|
2256
|
-
}
|
|
2254
|
+
if (unlikely(!__pyx_frame_code)) ret = -1;\
|
|
2255
|
+
else ret = __Pyx__TraceStartFunc(__pyx_pymonitoring_state, __pyx_frame_code, offset, skip_event);\
|
|
2256
|
+
} else __pyx_frame_code = NULL;\
|
|
2257
2257
|
PyGILState_Release(state);\
|
|
2258
|
-
}
|
|
2258
|
+
} else __pyx_frame_code = NULL;\
|
|
2259
2259
|
} else {\
|
|
2260
2260
|
if (!__Pyx_PyThreadState_Current->tracing) {\
|
|
2261
2261
|
if (likely(__pyx_frame_code)) Py_INCREF(__pyx_frame_code);\
|
|
2262
2262
|
else __pyx_frame_code = (PyObject*) __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);\
|
|
2263
|
-
if (unlikely(!__pyx_frame_code))
|
|
2264
|
-
ret = __Pyx__TraceStartFunc(__pyx_pymonitoring_state, __pyx_frame_code, offset, skip_event);\
|
|
2265
|
-
}
|
|
2263
|
+
if (unlikely(!__pyx_frame_code)) ret = -1;\
|
|
2264
|
+
else ret = __Pyx__TraceStartFunc(__pyx_pymonitoring_state, __pyx_frame_code, offset, skip_event);\
|
|
2265
|
+
} else __pyx_frame_code = NULL;\
|
|
2266
2266
|
}\
|
|
2267
2267
|
if (unlikely(ret == -1)) goto_error;\
|
|
2268
2268
|
}
|
|
@@ -3293,22 +3293,22 @@ static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, trav
|
|
|
3293
3293
|
static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear);
|
|
3294
3294
|
|
|
3295
3295
|
/* TypeImport.proto */
|
|
3296
|
-
#ifndef
|
|
3297
|
-
#define
|
|
3296
|
+
#ifndef __PYX_HAVE_RT_ImportType_proto_3_1_4
|
|
3297
|
+
#define __PYX_HAVE_RT_ImportType_proto_3_1_4
|
|
3298
3298
|
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
|
|
3299
3299
|
#include <stdalign.h>
|
|
3300
3300
|
#endif
|
|
3301
3301
|
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
|
|
3302
|
-
#define
|
|
3302
|
+
#define __PYX_GET_STRUCT_ALIGNMENT_3_1_4(s) alignof(s)
|
|
3303
3303
|
#else
|
|
3304
|
-
#define
|
|
3304
|
+
#define __PYX_GET_STRUCT_ALIGNMENT_3_1_4(s) sizeof(void*)
|
|
3305
3305
|
#endif
|
|
3306
|
-
enum
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3306
|
+
enum __Pyx_ImportType_CheckSize_3_1_4 {
|
|
3307
|
+
__Pyx_ImportType_CheckSize_Error_3_1_4 = 0,
|
|
3308
|
+
__Pyx_ImportType_CheckSize_Warn_3_1_4 = 1,
|
|
3309
|
+
__Pyx_ImportType_CheckSize_Ignore_3_1_4 = 2
|
|
3310
3310
|
};
|
|
3311
|
-
static PyTypeObject *
|
|
3311
|
+
static PyTypeObject *__Pyx_ImportType_3_1_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_4 check_size);
|
|
3312
3312
|
#endif
|
|
3313
3313
|
|
|
3314
3314
|
/* GetVTable.proto */
|
|
@@ -3463,7 +3463,7 @@ static unsigned long __Pyx_get_runtime_version(void);
|
|
|
3463
3463
|
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
|
|
3464
3464
|
|
|
3465
3465
|
/* FunctionImport.proto */
|
|
3466
|
-
static int
|
|
3466
|
+
static int __Pyx_ImportFunction_3_1_4(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
|
|
3467
3467
|
|
|
3468
3468
|
/* MultiPhaseInitModuleState.proto */
|
|
3469
3469
|
#if CYTHON_PEP489_MULTI_PHASE_INIT && CYTHON_USE_MODULE_STATE
|
|
@@ -5690,8 +5690,14 @@ static PyObject *__pyx_pf_6a_sync_10primitives_5locks_9semaphore_9Semaphore_8__r
|
|
|
5690
5690
|
* representation = f"{representation[:-1]} decorates={detail}"
|
|
5691
5691
|
*/
|
|
5692
5692
|
__Pyx_TraceLine(145,18,0,__PYX_ERR(0, 145, __pyx_L1_error))
|
|
5693
|
-
|
|
5694
|
-
|
|
5693
|
+
if (__pyx_v_self->_decorated == Py_None) __pyx_t_8 = 0;
|
|
5694
|
+
else
|
|
5695
|
+
{
|
|
5696
|
+
Py_ssize_t __pyx_temp = __Pyx_PySet_GET_SIZE(__pyx_v_self->_decorated);
|
|
5697
|
+
if (unlikely(((!CYTHON_ASSUME_SAFE_SIZE) && __pyx_temp < 0))) __PYX_ERR(0, 145, __pyx_L1_error)
|
|
5698
|
+
__pyx_t_8 = (__pyx_temp != 0);
|
|
5699
|
+
}
|
|
5700
|
+
|
|
5695
5701
|
if (__pyx_t_8) {
|
|
5696
5702
|
|
|
5697
5703
|
/* "a_sync/primitives/locks/semaphore.pyx":146
|
|
@@ -13247,6 +13253,7 @@ static struct PyMemberDef __pyx_tp_members_DummySemaphore[] = {
|
|
|
13247
13253
|
{NULL, 0, 0, 0, NULL}
|
|
13248
13254
|
};
|
|
13249
13255
|
static PyType_Slot __pyx_type_6a_sync_10primitives_5locks_9semaphore_DummySemaphore_slots[] = {
|
|
13256
|
+
{Py_tp_dealloc, (void *)__pyx_tp_dealloc_6a_sync_10primitives_5locks_9semaphore_Semaphore},
|
|
13250
13257
|
{Py_tp_repr, (void *)__pyx_pw_6a_sync_10primitives_5locks_9semaphore_14DummySemaphore_5__repr__},
|
|
13251
13258
|
{Py_tp_doc, (void *)PyDoc_STR("DummySemaphore(str name: Optional[str] = None)\n\nA dummy semaphore that implements the standard :class:`asyncio.Semaphore` API but does nothing.\n\nThis class is useful for scenarios where a semaphore interface is required but no actual synchronization is needed.\n\nExample:\n dummy_semaphore = DummySemaphore()\n\n async def no_op():\n async with dummy_semaphore:\n return 1")},
|
|
13252
13259
|
{Py_tp_traverse, (void *)__pyx_tp_traverse_6a_sync_10primitives_5locks_9semaphore_Semaphore},
|
|
@@ -15737,15 +15744,15 @@ static int __Pyx_modinit_type_init_code(__pyx_mstatetype *__pyx_mstate) {
|
|
|
15737
15744
|
/*--- Type init code ---*/
|
|
15738
15745
|
__pyx_t_1 = PyImport_ImportModule("a_sync.primitives._debug"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
15739
15746
|
__Pyx_GOTREF(__pyx_t_1);
|
|
15740
|
-
__pyx_mstate->__pyx_ptype_6a_sync_10primitives_6_debug__DebugDaemonMixin =
|
|
15747
|
+
__pyx_mstate->__pyx_ptype_6a_sync_10primitives_6_debug__DebugDaemonMixin = __Pyx_ImportType_3_1_4(__pyx_t_1, "a_sync.primitives._debug", "_DebugDaemonMixin",
|
|
15741
15748
|
#if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
|
|
15742
|
-
sizeof(struct __pyx_obj_6a_sync_10primitives_6_debug__DebugDaemonMixin),
|
|
15749
|
+
sizeof(struct __pyx_obj_6a_sync_10primitives_6_debug__DebugDaemonMixin), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(struct __pyx_obj_6a_sync_10primitives_6_debug__DebugDaemonMixin),
|
|
15743
15750
|
#elif CYTHON_COMPILING_IN_LIMITED_API
|
|
15744
|
-
sizeof(struct __pyx_obj_6a_sync_10primitives_6_debug__DebugDaemonMixin),
|
|
15751
|
+
sizeof(struct __pyx_obj_6a_sync_10primitives_6_debug__DebugDaemonMixin), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(struct __pyx_obj_6a_sync_10primitives_6_debug__DebugDaemonMixin),
|
|
15745
15752
|
#else
|
|
15746
|
-
sizeof(struct __pyx_obj_6a_sync_10primitives_6_debug__DebugDaemonMixin),
|
|
15753
|
+
sizeof(struct __pyx_obj_6a_sync_10primitives_6_debug__DebugDaemonMixin), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(struct __pyx_obj_6a_sync_10primitives_6_debug__DebugDaemonMixin),
|
|
15747
15754
|
#endif
|
|
15748
|
-
|
|
15755
|
+
__Pyx_ImportType_CheckSize_Warn_3_1_4); if (!__pyx_mstate->__pyx_ptype_6a_sync_10primitives_6_debug__DebugDaemonMixin) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
15749
15756
|
__pyx_vtabptr_6a_sync_10primitives_6_debug__DebugDaemonMixin = (struct __pyx_vtabstruct_6a_sync_10primitives_6_debug__DebugDaemonMixin*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_6a_sync_10primitives_6_debug__DebugDaemonMixin); if (unlikely(!__pyx_vtabptr_6a_sync_10primitives_6_debug__DebugDaemonMixin)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
15750
15757
|
__pyx_vtabptr_6a_sync_10primitives_5locks_9semaphore_Semaphore = &__pyx_vtable_6a_sync_10primitives_5locks_9semaphore_Semaphore;
|
|
15751
15758
|
__pyx_vtable_6a_sync_10primitives_5locks_9semaphore_Semaphore.__pyx_base = *__pyx_vtabptr_6a_sync_10primitives_6_debug__DebugDaemonMixin;
|
|
@@ -16089,41 +16096,41 @@ static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
|
|
|
16089
16096
|
/*--- Type import code ---*/
|
|
16090
16097
|
__pyx_t_1 = PyImport_ImportModule("a_sync.primitives._loggable"); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
16091
16098
|
__Pyx_GOTREF(__pyx_t_1);
|
|
16092
|
-
__pyx_mstate->__pyx_ptype_6a_sync_10primitives_9_loggable__LoggerMixin =
|
|
16099
|
+
__pyx_mstate->__pyx_ptype_6a_sync_10primitives_9_loggable__LoggerMixin = __Pyx_ImportType_3_1_4(__pyx_t_1, "a_sync.primitives._loggable", "_LoggerMixin",
|
|
16093
16100
|
#if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
|
|
16094
|
-
sizeof(struct __pyx_obj_6a_sync_10primitives_9_loggable__LoggerMixin),
|
|
16101
|
+
sizeof(struct __pyx_obj_6a_sync_10primitives_9_loggable__LoggerMixin), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(struct __pyx_obj_6a_sync_10primitives_9_loggable__LoggerMixin),
|
|
16095
16102
|
#elif CYTHON_COMPILING_IN_LIMITED_API
|
|
16096
|
-
sizeof(struct __pyx_obj_6a_sync_10primitives_9_loggable__LoggerMixin),
|
|
16103
|
+
sizeof(struct __pyx_obj_6a_sync_10primitives_9_loggable__LoggerMixin), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(struct __pyx_obj_6a_sync_10primitives_9_loggable__LoggerMixin),
|
|
16097
16104
|
#else
|
|
16098
|
-
sizeof(struct __pyx_obj_6a_sync_10primitives_9_loggable__LoggerMixin),
|
|
16105
|
+
sizeof(struct __pyx_obj_6a_sync_10primitives_9_loggable__LoggerMixin), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(struct __pyx_obj_6a_sync_10primitives_9_loggable__LoggerMixin),
|
|
16099
16106
|
#endif
|
|
16100
|
-
|
|
16107
|
+
__Pyx_ImportType_CheckSize_Warn_3_1_4); if (!__pyx_mstate->__pyx_ptype_6a_sync_10primitives_9_loggable__LoggerMixin) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
16101
16108
|
__pyx_vtabptr_6a_sync_10primitives_9_loggable__LoggerMixin = (struct __pyx_vtabstruct_6a_sync_10primitives_9_loggable__LoggerMixin*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_6a_sync_10primitives_9_loggable__LoggerMixin); if (unlikely(!__pyx_vtabptr_6a_sync_10primitives_9_loggable__LoggerMixin)) __PYX_ERR(2, 1, __pyx_L1_error)
|
|
16102
16109
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
16103
16110
|
__pyx_t_1 = PyImport_ImportModule("a_sync.primitives._debug"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 3, __pyx_L1_error)
|
|
16104
16111
|
__Pyx_GOTREF(__pyx_t_1);
|
|
16105
|
-
__pyx_mstate->__pyx_ptype_6a_sync_10primitives_6_debug__LoopBoundMixin =
|
|
16112
|
+
__pyx_mstate->__pyx_ptype_6a_sync_10primitives_6_debug__LoopBoundMixin = __Pyx_ImportType_3_1_4(__pyx_t_1, "a_sync.primitives._debug", "_LoopBoundMixin",
|
|
16106
16113
|
#if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
|
|
16107
|
-
sizeof(struct __pyx_obj_6a_sync_10primitives_6_debug__LoopBoundMixin),
|
|
16114
|
+
sizeof(struct __pyx_obj_6a_sync_10primitives_6_debug__LoopBoundMixin), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(struct __pyx_obj_6a_sync_10primitives_6_debug__LoopBoundMixin),
|
|
16108
16115
|
#elif CYTHON_COMPILING_IN_LIMITED_API
|
|
16109
|
-
sizeof(struct __pyx_obj_6a_sync_10primitives_6_debug__LoopBoundMixin),
|
|
16116
|
+
sizeof(struct __pyx_obj_6a_sync_10primitives_6_debug__LoopBoundMixin), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(struct __pyx_obj_6a_sync_10primitives_6_debug__LoopBoundMixin),
|
|
16110
16117
|
#else
|
|
16111
|
-
sizeof(struct __pyx_obj_6a_sync_10primitives_6_debug__LoopBoundMixin),
|
|
16118
|
+
sizeof(struct __pyx_obj_6a_sync_10primitives_6_debug__LoopBoundMixin), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(struct __pyx_obj_6a_sync_10primitives_6_debug__LoopBoundMixin),
|
|
16112
16119
|
#endif
|
|
16113
|
-
|
|
16120
|
+
__Pyx_ImportType_CheckSize_Warn_3_1_4); if (!__pyx_mstate->__pyx_ptype_6a_sync_10primitives_6_debug__LoopBoundMixin) __PYX_ERR(3, 3, __pyx_L1_error)
|
|
16114
16121
|
__pyx_vtabptr_6a_sync_10primitives_6_debug__LoopBoundMixin = (struct __pyx_vtabstruct_6a_sync_10primitives_6_debug__LoopBoundMixin*)__Pyx_GetVtable(__pyx_mstate->__pyx_ptype_6a_sync_10primitives_6_debug__LoopBoundMixin); if (unlikely(!__pyx_vtabptr_6a_sync_10primitives_6_debug__LoopBoundMixin)) __PYX_ERR(3, 3, __pyx_L1_error)
|
|
16115
16122
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
16116
16123
|
__pyx_t_1 = PyImport_ImportModule("a_sync.functools"); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 1, __pyx_L1_error)
|
|
16117
16124
|
__Pyx_GOTREF(__pyx_t_1);
|
|
16118
|
-
__pyx_mstate->__pyx_ptype_6a_sync_9functools_cached_property_unsafe =
|
|
16125
|
+
__pyx_mstate->__pyx_ptype_6a_sync_9functools_cached_property_unsafe = __Pyx_ImportType_3_1_4(__pyx_t_1, "a_sync.functools", "cached_property_unsafe",
|
|
16119
16126
|
#if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
|
|
16120
|
-
sizeof(struct __pyx_obj_6a_sync_9functools_cached_property_unsafe),
|
|
16127
|
+
sizeof(struct __pyx_obj_6a_sync_9functools_cached_property_unsafe), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(struct __pyx_obj_6a_sync_9functools_cached_property_unsafe),
|
|
16121
16128
|
#elif CYTHON_COMPILING_IN_LIMITED_API
|
|
16122
|
-
sizeof(struct __pyx_obj_6a_sync_9functools_cached_property_unsafe),
|
|
16129
|
+
sizeof(struct __pyx_obj_6a_sync_9functools_cached_property_unsafe), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(struct __pyx_obj_6a_sync_9functools_cached_property_unsafe),
|
|
16123
16130
|
#else
|
|
16124
|
-
sizeof(struct __pyx_obj_6a_sync_9functools_cached_property_unsafe),
|
|
16131
|
+
sizeof(struct __pyx_obj_6a_sync_9functools_cached_property_unsafe), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(struct __pyx_obj_6a_sync_9functools_cached_property_unsafe),
|
|
16125
16132
|
#endif
|
|
16126
|
-
|
|
16133
|
+
__Pyx_ImportType_CheckSize_Warn_3_1_4); if (!__pyx_mstate->__pyx_ptype_6a_sync_9functools_cached_property_unsafe) __PYX_ERR(4, 1, __pyx_L1_error)
|
|
16127
16134
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
16128
16135
|
__Pyx_RefNannyFinishContext();
|
|
16129
16136
|
return 0;
|
|
@@ -16153,7 +16160,7 @@ static int __Pyx_modinit_function_import_code(__pyx_mstatetype *__pyx_mstate) {
|
|
|
16153
16160
|
/*--- Function import code ---*/
|
|
16154
16161
|
__pyx_t_1 = PyImport_ImportModule("a_sync.functools"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
16155
16162
|
__Pyx_GOTREF(__pyx_t_1);
|
|
16156
|
-
if (
|
|
16163
|
+
if (__Pyx_ImportFunction_3_1_4(__pyx_t_1, "wraps", (void (**)(void))&__pyx_f_6a_sync_9functools_wraps, "PyObject *(PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
16157
16164
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
16158
16165
|
__Pyx_RefNannyFinishContext();
|
|
16159
16166
|
return 0;
|
|
@@ -16446,7 +16453,7 @@ __Pyx_RefNannySetupContext("PyInit_semaphore", 0);
|
|
|
16446
16453
|
(void)__Pyx_modinit_variable_import_code(__pyx_mstate);
|
|
16447
16454
|
if (unlikely((__Pyx_modinit_function_import_code(__pyx_mstate) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
16448
16455
|
/*--- Execution code ---*/
|
|
16449
|
-
__Pyx_TraceStartFunc("PyInit_semaphore", __pyx_f[0], 1,
|
|
16456
|
+
__Pyx_TraceStartFunc("PyInit_semaphore", __pyx_f[0], 1, 2, 0, 0, __PYX_ERR(0, 1, __pyx_L1_error));
|
|
16450
16457
|
|
|
16451
16458
|
/* "a_sync/primitives/locks/semaphore.pyx":6
|
|
16452
16459
|
* """
|
|
@@ -16893,7 +16900,7 @@ __Pyx_RefNannySetupContext("PyInit_semaphore", 0);
|
|
|
16893
16900
|
* raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
|
|
16894
16901
|
* def __setstate_cython__(self, __pyx_state):
|
|
16895
16902
|
*/
|
|
16896
|
-
__Pyx_TraceLine(1,
|
|
16903
|
+
__Pyx_TraceLine(1,1,0,__PYX_ERR(1, 1, __pyx_L1_error))
|
|
16897
16904
|
__pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_10primitives_5locks_9semaphore_9Semaphore_35__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_Semaphore___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_a_sync_primitives_locks_semaphor, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[23])); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
16898
16905
|
__Pyx_GOTREF(__pyx_t_2);
|
|
16899
16906
|
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
@@ -16994,7 +17001,7 @@ __Pyx_RefNannySetupContext("PyInit_semaphore", 0);
|
|
|
16994
17001
|
* raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
|
|
16995
17002
|
* def __setstate_cython__(self, __pyx_state):
|
|
16996
17003
|
*/
|
|
16997
|
-
__Pyx_TraceLine(1,
|
|
17004
|
+
__Pyx_TraceLine(1,3,0,__PYX_ERR(1, 1, __pyx_L1_error))
|
|
16998
17005
|
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_10primitives_5locks_9semaphore_14DummySemaphore_18__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DummySemaphore___reduce_cython, NULL, __pyx_mstate_global->__pyx_n_u_a_sync_primitives_locks_semaphor, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[34])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
16999
17006
|
__Pyx_GOTREF(__pyx_t_3);
|
|
17000
17007
|
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
@@ -17006,7 +17013,7 @@ __Pyx_RefNannySetupContext("PyInit_semaphore", 0);
|
|
|
17006
17013
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
17007
17014
|
* raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
|
|
17008
17015
|
*/
|
|
17009
|
-
__Pyx_TraceLine(3,
|
|
17016
|
+
__Pyx_TraceLine(3,6,0,__PYX_ERR(1, 3, __pyx_L1_error))
|
|
17010
17017
|
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_10primitives_5locks_9semaphore_14DummySemaphore_20__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_DummySemaphore___setstate_cython, NULL, __pyx_mstate_global->__pyx_n_u_a_sync_primitives_locks_semaphor, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[35])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error)
|
|
17011
17018
|
__Pyx_GOTREF(__pyx_t_3);
|
|
17012
17019
|
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
|
|
@@ -17052,7 +17059,7 @@ __Pyx_RefNannySetupContext("PyInit_semaphore", 0);
|
|
|
17052
17059
|
* raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
|
|
17053
17060
|
* def __setstate_cython__(self, __pyx_state):
|
|
17054
17061
|
*/
|
|
17055
|
-
__Pyx_TraceLine(1,
|
|
17062
|
+
__Pyx_TraceLine(1,0,0,__PYX_ERR(1, 1, __pyx_L1_error))
|
|
17056
17063
|
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_10primitives_5locks_9semaphore_19ThreadsafeSemaphore_11__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ThreadsafeSemaphore___reduce_cyt, NULL, __pyx_mstate_global->__pyx_n_u_a_sync_primitives_locks_semaphor, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[43])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
17057
17064
|
__Pyx_GOTREF(__pyx_t_3);
|
|
17058
17065
|
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
|
|
@@ -17064,7 +17071,7 @@ __Pyx_RefNannySetupContext("PyInit_semaphore", 0);
|
|
|
17064
17071
|
* def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
|
|
17065
17072
|
* raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
|
|
17066
17073
|
*/
|
|
17067
|
-
__Pyx_TraceLine(3,
|
|
17074
|
+
__Pyx_TraceLine(3,4,0,__PYX_ERR(1, 3, __pyx_L1_error))
|
|
17068
17075
|
__pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_10primitives_5locks_9semaphore_19ThreadsafeSemaphore_13__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_mstate_global->__pyx_n_u_ThreadsafeSemaphore___setstate_c, NULL, __pyx_mstate_global->__pyx_n_u_a_sync_primitives_locks_semaphor, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[44])); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 3, __pyx_L1_error)
|
|
17069
17076
|
__Pyx_GOTREF(__pyx_t_3);
|
|
17070
17077
|
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
|
|
@@ -17075,12 +17082,12 @@ __Pyx_RefNannySetupContext("PyInit_semaphore", 0);
|
|
|
17075
17082
|
* This module provides various semaphore implementations, including a debug-enabled semaphore,
|
|
17076
17083
|
* a dummy semaphore that does nothing, and a threadsafe semaphore for use in multi-threaded applications.
|
|
17077
17084
|
*/
|
|
17078
|
-
__Pyx_TraceLine(1,
|
|
17085
|
+
__Pyx_TraceLine(1,2,0,__PYX_ERR(0, 1, __pyx_L1_error))
|
|
17079
17086
|
__pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
17080
17087
|
__Pyx_GOTREF(__pyx_t_3);
|
|
17081
17088
|
if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
|
|
17082
17089
|
__Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
|
|
17083
|
-
__Pyx_TraceReturnValue(Py_None,
|
|
17090
|
+
__Pyx_TraceReturnValue(Py_None, 2, 0, __PYX_ERR(0, 1, __pyx_L1_error));
|
|
17084
17091
|
__Pyx_PyMonitoring_ExitScope(0);
|
|
17085
17092
|
|
|
17086
17093
|
/*--- Wrapped vars code ---*/
|
|
@@ -17090,7 +17097,7 @@ __Pyx_RefNannySetupContext("PyInit_semaphore", 0);
|
|
|
17090
17097
|
__Pyx_XDECREF(__pyx_t_2);
|
|
17091
17098
|
__Pyx_XDECREF(__pyx_t_3);
|
|
17092
17099
|
__Pyx_TraceException(__pyx_lineno, 0, 0);
|
|
17093
|
-
__Pyx_TraceExceptionUnwind(
|
|
17100
|
+
__Pyx_TraceExceptionUnwind(2, 0);
|
|
17094
17101
|
if (__pyx_m) {
|
|
17095
17102
|
if (__pyx_mstate->__pyx_d && stringtab_initialized) {
|
|
17096
17103
|
__Pyx_AddTraceback("init a_sync.primitives.locks.semaphore", __pyx_clineno, __pyx_lineno, __pyx_filename);
|
|
@@ -17397,15 +17404,16 @@ static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
|
|
|
17397
17404
|
return -1;
|
|
17398
17405
|
}
|
|
17399
17406
|
/* #### Code section: init_codeobjects ### */
|
|
17400
|
-
|
|
17401
|
-
|
|
17402
|
-
|
|
17403
|
-
|
|
17404
|
-
|
|
17405
|
-
|
|
17406
|
-
|
|
17407
|
-
|
|
17408
|
-
|
|
17407
|
+
\
|
|
17408
|
+
typedef struct {
|
|
17409
|
+
unsigned int argcount : 3;
|
|
17410
|
+
unsigned int num_posonly_args : 1;
|
|
17411
|
+
unsigned int num_kwonly_args : 1;
|
|
17412
|
+
unsigned int nlocals : 4;
|
|
17413
|
+
unsigned int flags : 10;
|
|
17414
|
+
unsigned int first_line : 9;
|
|
17415
|
+
unsigned int line_table_length : 13;
|
|
17416
|
+
} __Pyx_PyCode_New_function_description;
|
|
17409
17417
|
/* NewCodeObj.proto */
|
|
17410
17418
|
static PyObject* __Pyx_PyCode_New(
|
|
17411
17419
|
const __Pyx_PyCode_New_function_description descr,
|
|
@@ -20450,6 +20458,7 @@ static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
|
|
|
20450
20458
|
return -1;
|
|
20451
20459
|
}
|
|
20452
20460
|
mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
|
|
20461
|
+
Py_DECREF(bases);
|
|
20453
20462
|
if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
|
|
20454
20463
|
return -1;
|
|
20455
20464
|
}
|
|
@@ -23596,15 +23605,15 @@ static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
|
|
|
23596
23605
|
}
|
|
23597
23606
|
|
|
23598
23607
|
/* TypeImport */
|
|
23599
|
-
#ifndef
|
|
23600
|
-
#define
|
|
23601
|
-
static PyTypeObject *
|
|
23602
|
-
size_t size, size_t alignment, enum
|
|
23608
|
+
#ifndef __PYX_HAVE_RT_ImportType_3_1_4
|
|
23609
|
+
#define __PYX_HAVE_RT_ImportType_3_1_4
|
|
23610
|
+
static PyTypeObject *__Pyx_ImportType_3_1_4(PyObject *module, const char *module_name, const char *class_name,
|
|
23611
|
+
size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_4 check_size)
|
|
23603
23612
|
{
|
|
23604
23613
|
PyObject *result = 0;
|
|
23605
23614
|
Py_ssize_t basicsize;
|
|
23606
23615
|
Py_ssize_t itemsize;
|
|
23607
|
-
#
|
|
23616
|
+
#ifdef Py_LIMITED_API
|
|
23608
23617
|
PyObject *py_basicsize;
|
|
23609
23618
|
PyObject *py_itemsize;
|
|
23610
23619
|
#endif
|
|
@@ -23617,7 +23626,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_3(PyObject *module, const char *module
|
|
|
23617
23626
|
module_name, class_name);
|
|
23618
23627
|
goto bad;
|
|
23619
23628
|
}
|
|
23620
|
-
#
|
|
23629
|
+
#ifndef Py_LIMITED_API
|
|
23621
23630
|
basicsize = ((PyTypeObject *)result)->tp_basicsize;
|
|
23622
23631
|
itemsize = ((PyTypeObject *)result)->tp_itemsize;
|
|
23623
23632
|
#else
|
|
@@ -23655,7 +23664,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_3(PyObject *module, const char *module
|
|
|
23655
23664
|
module_name, class_name, size, basicsize+itemsize);
|
|
23656
23665
|
goto bad;
|
|
23657
23666
|
}
|
|
23658
|
-
if (check_size ==
|
|
23667
|
+
if (check_size == __Pyx_ImportType_CheckSize_Error_3_1_4 &&
|
|
23659
23668
|
((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
|
|
23660
23669
|
PyErr_Format(PyExc_ValueError,
|
|
23661
23670
|
"%.200s.%.200s size changed, may indicate binary incompatibility. "
|
|
@@ -23663,7 +23672,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_3(PyObject *module, const char *module
|
|
|
23663
23672
|
module_name, class_name, size, basicsize, basicsize+itemsize);
|
|
23664
23673
|
goto bad;
|
|
23665
23674
|
}
|
|
23666
|
-
else if (check_size ==
|
|
23675
|
+
else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_1_4 && (size_t)basicsize > size) {
|
|
23667
23676
|
if (PyErr_WarnFormat(NULL, 0,
|
|
23668
23677
|
"%.200s.%.200s size changed, may indicate binary incompatibility. "
|
|
23669
23678
|
"Expected %zd from C header, got %zd from PyObject",
|
|
@@ -25749,9 +25758,9 @@ static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObj
|
|
|
25749
25758
|
}
|
|
25750
25759
|
|
|
25751
25760
|
/* FunctionImport */
|
|
25752
|
-
#ifndef
|
|
25753
|
-
#define
|
|
25754
|
-
static int
|
|
25761
|
+
#ifndef __PYX_HAVE_RT_ImportFunction_3_1_4
|
|
25762
|
+
#define __PYX_HAVE_RT_ImportFunction_3_1_4
|
|
25763
|
+
static int __Pyx_ImportFunction_3_1_4(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
|
|
25755
25764
|
PyObject *d = 0;
|
|
25756
25765
|
PyObject *cobj = 0;
|
|
25757
25766
|
union {
|
|
@@ -25853,6 +25862,10 @@ bad:
|
|
|
25853
25862
|
PyCode_NewWithPosOnlyArgs
|
|
25854
25863
|
#endif
|
|
25855
25864
|
(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
|
|
25865
|
+
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
|
|
25866
|
+
if (likely(result))
|
|
25867
|
+
result->_co_firsttraceable = 0;
|
|
25868
|
+
#endif
|
|
25856
25869
|
return result;
|
|
25857
25870
|
}
|
|
25858
25871
|
#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
|
|
Binary file
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
from a_sync._typing import *
|
|
2
1
|
import asyncio
|
|
3
2
|
import functools
|
|
4
|
-
from
|
|
5
|
-
from a_sync.primitives._debug import _DebugDaemonMixin
|
|
3
|
+
from logging import Logger
|
|
6
4
|
from threading import Thread as Thread
|
|
5
|
+
from typing_extensions import Never
|
|
6
|
+
from a_sync._typing import *
|
|
7
|
+
from a_sync.primitives._debug import _DebugDaemonMixin
|
|
7
8
|
|
|
8
|
-
logger:
|
|
9
|
+
logger: Logger
|
|
9
10
|
|
|
10
11
|
class Semaphore(asyncio.Semaphore, _DebugDaemonMixin):
|
|
11
12
|
"""
|
|
@@ -39,8 +40,8 @@ class Semaphore(asyncio.Semaphore, _DebugDaemonMixin):
|
|
|
39
40
|
:class:`_DebugDaemonMixin` for more details on debugging capabilities.
|
|
40
41
|
"""
|
|
41
42
|
|
|
42
|
-
name:
|
|
43
|
-
def __init__(self, value: int, name:
|
|
43
|
+
name: str
|
|
44
|
+
def __init__(self, value: int, name: str = "", **kwargs) -> None:
|
|
44
45
|
"""
|
|
45
46
|
Initialize the semaphore with a given value and optional name for debugging.
|
|
46
47
|
|
|
@@ -116,7 +117,7 @@ class DummySemaphore(asyncio.Semaphore):
|
|
|
116
117
|
return 1
|
|
117
118
|
"""
|
|
118
119
|
|
|
119
|
-
name:
|
|
120
|
+
name: str
|
|
120
121
|
def __init__(self, name: Optional[str] = None) -> None:
|
|
121
122
|
"""
|
|
122
123
|
Initialize the dummy semaphore with an optional name.
|
|
@@ -156,8 +157,8 @@ class ThreadsafeSemaphore(Semaphore):
|
|
|
156
157
|
:class:`Semaphore` for the base class implementation.
|
|
157
158
|
"""
|
|
158
159
|
|
|
159
|
-
semaphores:
|
|
160
|
-
dummy:
|
|
160
|
+
semaphores: DefaultDict[Thread, Semaphore] | Dict[Never, Never]
|
|
161
|
+
dummy: DummySemaphore | None
|
|
161
162
|
def __init__(self, value: Optional[int], name: Optional[str] = None) -> None:
|
|
162
163
|
"""
|
|
163
164
|
Initialize the threadsafe semaphore with a given value and optional name.
|
a_sync/primitives/queue.py
CHANGED
|
@@ -858,7 +858,11 @@ class SmartProcessingQueue(_VariablePriorityQueueMixin[T], ProcessingQueue[Conca
|
|
|
858
858
|
Example:
|
|
859
859
|
>>> queue = SmartProcessingQueue(func=my_task_func, num_workers=3, name='smart_queue')
|
|
860
860
|
"""
|
|
861
|
-
|
|
861
|
+
if not name:
|
|
862
|
+
unwrapped = func
|
|
863
|
+
while callable(getattr(unwrapped, "__wrapped__", None)):
|
|
864
|
+
unwrapped = unwrapped.__wrapped__
|
|
865
|
+
name = f"{unwrapped.__module__}.{unwrapped.__qualname__}"
|
|
862
866
|
ProcessingQueue.__init__(self, func, num_workers, return_data=True, name=name, loop=loop)
|
|
863
867
|
self._futs = WeakValueDictionary()
|
|
864
868
|
|
a_sync/utils/repr.c
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Generated by Cython 3.1.
|
|
1
|
+
/* Generated by Cython 3.1.4 */
|
|
2
2
|
|
|
3
3
|
/* BEGIN: Cython Metadata
|
|
4
4
|
{
|
|
@@ -30,8 +30,8 @@ END: Cython Metadata */
|
|
|
30
30
|
#elif PY_VERSION_HEX < 0x03080000
|
|
31
31
|
#error Cython requires Python 3.8+.
|
|
32
32
|
#else
|
|
33
|
-
#define __PYX_ABI_VERSION "
|
|
34
|
-
#define CYTHON_HEX_VERSION
|
|
33
|
+
#define __PYX_ABI_VERSION "3_1_4"
|
|
34
|
+
#define CYTHON_HEX_VERSION 0x030104F0
|
|
35
35
|
#define CYTHON_FUTURE_DIVISION 1
|
|
36
36
|
/* CModulePreamble */
|
|
37
37
|
#include <stddef.h>
|
|
@@ -2171,18 +2171,18 @@ static void __Pyx_Generator_Replace_StopIteration(int in_async_gen);
|
|
|
2171
2171
|
if (!__Pyx_PyThreadState_Current->tracing) {\
|
|
2172
2172
|
if (likely(__pyx_frame_code)) Py_INCREF(__pyx_frame_code);\
|
|
2173
2173
|
else __pyx_frame_code = (PyObject*) __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);\
|
|
2174
|
-
if (unlikely(!__pyx_frame_code))
|
|
2175
|
-
ret = __Pyx__TraceStartFunc(__pyx_pymonitoring_state, __pyx_frame_code, offset, skip_event);\
|
|
2176
|
-
}
|
|
2174
|
+
if (unlikely(!__pyx_frame_code)) ret = -1;\
|
|
2175
|
+
else ret = __Pyx__TraceStartFunc(__pyx_pymonitoring_state, __pyx_frame_code, offset, skip_event);\
|
|
2176
|
+
} else __pyx_frame_code = NULL;\
|
|
2177
2177
|
PyGILState_Release(state);\
|
|
2178
|
-
}
|
|
2178
|
+
} else __pyx_frame_code = NULL;\
|
|
2179
2179
|
} else {\
|
|
2180
2180
|
if (!__Pyx_PyThreadState_Current->tracing) {\
|
|
2181
2181
|
if (likely(__pyx_frame_code)) Py_INCREF(__pyx_frame_code);\
|
|
2182
2182
|
else __pyx_frame_code = (PyObject*) __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);\
|
|
2183
|
-
if (unlikely(!__pyx_frame_code))
|
|
2184
|
-
ret = __Pyx__TraceStartFunc(__pyx_pymonitoring_state, __pyx_frame_code, offset, skip_event);\
|
|
2185
|
-
}
|
|
2183
|
+
if (unlikely(!__pyx_frame_code)) ret = -1;\
|
|
2184
|
+
else ret = __Pyx__TraceStartFunc(__pyx_pymonitoring_state, __pyx_frame_code, offset, skip_event);\
|
|
2185
|
+
} else __pyx_frame_code = NULL;\
|
|
2186
2186
|
}\
|
|
2187
2187
|
if (unlikely(ret == -1)) goto_error;\
|
|
2188
2188
|
}
|
|
@@ -2635,22 +2635,22 @@ static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffs
|
|
|
2635
2635
|
CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);
|
|
2636
2636
|
|
|
2637
2637
|
/* TypeImport.proto */
|
|
2638
|
-
#ifndef
|
|
2639
|
-
#define
|
|
2638
|
+
#ifndef __PYX_HAVE_RT_ImportType_proto_3_1_4
|
|
2639
|
+
#define __PYX_HAVE_RT_ImportType_proto_3_1_4
|
|
2640
2640
|
#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
|
|
2641
2641
|
#include <stdalign.h>
|
|
2642
2642
|
#endif
|
|
2643
2643
|
#if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
|
|
2644
|
-
#define
|
|
2644
|
+
#define __PYX_GET_STRUCT_ALIGNMENT_3_1_4(s) alignof(s)
|
|
2645
2645
|
#else
|
|
2646
|
-
#define
|
|
2646
|
+
#define __PYX_GET_STRUCT_ALIGNMENT_3_1_4(s) sizeof(void*)
|
|
2647
2647
|
#endif
|
|
2648
|
-
enum
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2648
|
+
enum __Pyx_ImportType_CheckSize_3_1_4 {
|
|
2649
|
+
__Pyx_ImportType_CheckSize_Error_3_1_4 = 0,
|
|
2650
|
+
__Pyx_ImportType_CheckSize_Warn_3_1_4 = 1,
|
|
2651
|
+
__Pyx_ImportType_CheckSize_Ignore_3_1_4 = 2
|
|
2652
2652
|
};
|
|
2653
|
-
static PyTypeObject *
|
|
2653
|
+
static PyTypeObject *__Pyx_ImportType_3_1_4(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_4 check_size);
|
|
2654
2654
|
#endif
|
|
2655
2655
|
|
|
2656
2656
|
/* ListPack.proto */
|
|
@@ -7581,15 +7581,15 @@ static int __Pyx_modinit_type_import_code(__pyx_mstatetype *__pyx_mstate) {
|
|
|
7581
7581
|
/*--- Type import code ---*/
|
|
7582
7582
|
__pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
|
|
7583
7583
|
__Pyx_GOTREF(__pyx_t_1);
|
|
7584
|
-
__pyx_mstate->__pyx_ptype_7cpython_4type_type =
|
|
7584
|
+
__pyx_mstate->__pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_1_4(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
|
|
7585
7585
|
#if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
|
|
7586
|
-
sizeof(PyTypeObject),
|
|
7586
|
+
sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(PyTypeObject),
|
|
7587
7587
|
#elif CYTHON_COMPILING_IN_LIMITED_API
|
|
7588
7588
|
0, 0,
|
|
7589
7589
|
#else
|
|
7590
|
-
sizeof(PyHeapTypeObject),
|
|
7590
|
+
sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_1_4(PyHeapTypeObject),
|
|
7591
7591
|
#endif
|
|
7592
|
-
|
|
7592
|
+
__Pyx_ImportType_CheckSize_Warn_3_1_4); if (!__pyx_mstate->__pyx_ptype_7cpython_4type_type) __PYX_ERR(1, 9, __pyx_L1_error)
|
|
7593
7593
|
__Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
|
|
7594
7594
|
__Pyx_RefNannyFinishContext();
|
|
7595
7595
|
return 0;
|
|
@@ -8340,15 +8340,16 @@ static int __Pyx_InitConstants(__pyx_mstatetype *__pyx_mstate) {
|
|
|
8340
8340
|
return -1;
|
|
8341
8341
|
}
|
|
8342
8342
|
/* #### Code section: init_codeobjects ### */
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
|
|
8346
|
-
|
|
8347
|
-
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
|
|
8351
|
-
|
|
8343
|
+
\
|
|
8344
|
+
typedef struct {
|
|
8345
|
+
unsigned int argcount : 1;
|
|
8346
|
+
unsigned int num_posonly_args : 1;
|
|
8347
|
+
unsigned int num_kwonly_args : 1;
|
|
8348
|
+
unsigned int nlocals : 4;
|
|
8349
|
+
unsigned int flags : 10;
|
|
8350
|
+
unsigned int first_line : 7;
|
|
8351
|
+
unsigned int line_table_length : 13;
|
|
8352
|
+
} __Pyx_PyCode_New_function_description;
|
|
8352
8353
|
/* NewCodeObj.proto */
|
|
8353
8354
|
static PyObject* __Pyx_PyCode_New(
|
|
8354
8355
|
const __Pyx_PyCode_New_function_description descr,
|
|
@@ -10815,15 +10816,15 @@ static int __Pyx_PyType_Ready(PyTypeObject *t) {
|
|
|
10815
10816
|
}
|
|
10816
10817
|
|
|
10817
10818
|
/* TypeImport */
|
|
10818
|
-
#ifndef
|
|
10819
|
-
#define
|
|
10820
|
-
static PyTypeObject *
|
|
10821
|
-
size_t size, size_t alignment, enum
|
|
10819
|
+
#ifndef __PYX_HAVE_RT_ImportType_3_1_4
|
|
10820
|
+
#define __PYX_HAVE_RT_ImportType_3_1_4
|
|
10821
|
+
static PyTypeObject *__Pyx_ImportType_3_1_4(PyObject *module, const char *module_name, const char *class_name,
|
|
10822
|
+
size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_1_4 check_size)
|
|
10822
10823
|
{
|
|
10823
10824
|
PyObject *result = 0;
|
|
10824
10825
|
Py_ssize_t basicsize;
|
|
10825
10826
|
Py_ssize_t itemsize;
|
|
10826
|
-
#
|
|
10827
|
+
#ifdef Py_LIMITED_API
|
|
10827
10828
|
PyObject *py_basicsize;
|
|
10828
10829
|
PyObject *py_itemsize;
|
|
10829
10830
|
#endif
|
|
@@ -10836,7 +10837,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_3(PyObject *module, const char *module
|
|
|
10836
10837
|
module_name, class_name);
|
|
10837
10838
|
goto bad;
|
|
10838
10839
|
}
|
|
10839
|
-
#
|
|
10840
|
+
#ifndef Py_LIMITED_API
|
|
10840
10841
|
basicsize = ((PyTypeObject *)result)->tp_basicsize;
|
|
10841
10842
|
itemsize = ((PyTypeObject *)result)->tp_itemsize;
|
|
10842
10843
|
#else
|
|
@@ -10874,7 +10875,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_3(PyObject *module, const char *module
|
|
|
10874
10875
|
module_name, class_name, size, basicsize+itemsize);
|
|
10875
10876
|
goto bad;
|
|
10876
10877
|
}
|
|
10877
|
-
if (check_size ==
|
|
10878
|
+
if (check_size == __Pyx_ImportType_CheckSize_Error_3_1_4 &&
|
|
10878
10879
|
((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
|
|
10879
10880
|
PyErr_Format(PyExc_ValueError,
|
|
10880
10881
|
"%.200s.%.200s size changed, may indicate binary incompatibility. "
|
|
@@ -10882,7 +10883,7 @@ static PyTypeObject *__Pyx_ImportType_3_1_3(PyObject *module, const char *module
|
|
|
10882
10883
|
module_name, class_name, size, basicsize, basicsize+itemsize);
|
|
10883
10884
|
goto bad;
|
|
10884
10885
|
}
|
|
10885
|
-
else if (check_size ==
|
|
10886
|
+
else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_1_4 && (size_t)basicsize > size) {
|
|
10886
10887
|
if (PyErr_WarnFormat(NULL, 0,
|
|
10887
10888
|
"%.200s.%.200s size changed, may indicate binary incompatibility. "
|
|
10888
10889
|
"Expected %zd from C header, got %zd from PyObject",
|
|
@@ -11151,6 +11152,7 @@ static int __pyx_CommonTypesMetaclass_init(PyObject *module) {
|
|
|
11151
11152
|
return -1;
|
|
11152
11153
|
}
|
|
11153
11154
|
mstate->__pyx_CommonTypesMetaclassType = __Pyx_FetchCommonTypeFromSpec(NULL, module, &__pyx_CommonTypesMetaclass_spec, bases);
|
|
11155
|
+
Py_DECREF(bases);
|
|
11154
11156
|
if (unlikely(mstate->__pyx_CommonTypesMetaclassType == NULL)) {
|
|
11155
11157
|
return -1;
|
|
11156
11158
|
}
|
|
@@ -14868,6 +14870,10 @@ static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt
|
|
|
14868
14870
|
PyCode_NewWithPosOnlyArgs
|
|
14869
14871
|
#endif
|
|
14870
14872
|
(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, __pyx_mstate_global->__pyx_empty_bytes);
|
|
14873
|
+
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030c00A1
|
|
14874
|
+
if (likely(result))
|
|
14875
|
+
result->_co_firsttraceable = 0;
|
|
14876
|
+
#endif
|
|
14871
14877
|
return result;
|
|
14872
14878
|
}
|
|
14873
14879
|
#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
|
a_sync/utils/repr.cp39-win32.pyd
CHANGED
|
Binary file
|