ez-a-sync 0.32.13__cp39-cp39-macosx_11_0_arm64.whl → 0.32.14__cp39-cp39-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 (37) hide show
  1. a_sync/_smart.c +923 -557
  2. a_sync/_smart.cpython-39-darwin.so +0 -0
  3. a_sync/_smart.pyx +17 -1
  4. a_sync/a_sync/_descriptor.cpython-39-darwin.so +0 -0
  5. a_sync/a_sync/_flags.cpython-39-darwin.so +0 -0
  6. a_sync/a_sync/_helpers.cpython-39-darwin.so +0 -0
  7. a_sync/a_sync/_kwargs.cpython-39-darwin.so +0 -0
  8. a_sync/a_sync/abstract.cpython-39-darwin.so +0 -0
  9. a_sync/a_sync/base.cpython-39-darwin.so +0 -0
  10. a_sync/a_sync/flags.cpython-39-darwin.so +0 -0
  11. a_sync/a_sync/function.cpython-39-darwin.so +0 -0
  12. a_sync/a_sync/method.cpython-39-darwin.so +0 -0
  13. a_sync/a_sync/modifiers/manager.cpython-39-darwin.so +0 -0
  14. a_sync/a_sync/property.cpython-39-darwin.so +0 -0
  15. a_sync/async_property/cached.cpython-39-darwin.so +0 -0
  16. a_sync/async_property/proxy.cpython-39-darwin.so +0 -0
  17. a_sync/asyncio/as_completed.cpython-39-darwin.so +0 -0
  18. a_sync/asyncio/create_task.cpython-39-darwin.so +0 -0
  19. a_sync/asyncio/gather.cpython-39-darwin.so +0 -0
  20. a_sync/asyncio/igather.cpython-39-darwin.so +0 -0
  21. a_sync/asyncio/sleep.cpython-39-darwin.so +0 -0
  22. a_sync/debugging.cpython-39-darwin.so +0 -0
  23. a_sync/exceptions.cpython-39-darwin.so +0 -0
  24. a_sync/functools.cpython-39-darwin.so +0 -0
  25. a_sync/iter.cpython-39-darwin.so +0 -0
  26. a_sync/primitives/_debug.cpython-39-darwin.so +0 -0
  27. a_sync/primitives/_loggable.cpython-39-darwin.so +0 -0
  28. a_sync/primitives/locks/counter.cpython-39-darwin.so +0 -0
  29. a_sync/primitives/locks/event.cpython-39-darwin.so +0 -0
  30. a_sync/primitives/locks/prio_semaphore.cpython-39-darwin.so +0 -0
  31. a_sync/primitives/locks/semaphore.cpython-39-darwin.so +0 -0
  32. a_sync/utils/repr.cpython-39-darwin.so +0 -0
  33. {ez_a_sync-0.32.13.dist-info → ez_a_sync-0.32.14.dist-info}/METADATA +1 -1
  34. {ez_a_sync-0.32.13.dist-info → ez_a_sync-0.32.14.dist-info}/RECORD +37 -37
  35. {ez_a_sync-0.32.13.dist-info → ez_a_sync-0.32.14.dist-info}/WHEEL +0 -0
  36. {ez_a_sync-0.32.13.dist-info → ez_a_sync-0.32.14.dist-info}/licenses/LICENSE.txt +0 -0
  37. {ez_a_sync-0.32.13.dist-info → ez_a_sync-0.32.14.dist-info}/top_level.txt +0 -0
a_sync/_smart.c CHANGED
@@ -1597,7 +1597,7 @@ struct __pyx_obj_6a_sync_6_smart___pyx_scope_struct_2___await__ {
1597
1597
  };
1598
1598
 
1599
1599
 
1600
- /* "a_sync/_smart.pyx":632
1600
+ /* "a_sync/_smart.pyx":648
1601
1601
  *
1602
1602
  *
1603
1603
  * cdef tuple _get_done_callbacks(inner: Task, outer: Future): # <<<<<<<<<<<<<<
@@ -2882,6 +2882,7 @@ static PyObject *__pyx_v_6a_sync_6_smart_get_event_loop = 0;
2882
2882
  static PyObject *__pyx_v_6a_sync_6_smart_AbstractEventLoop = 0;
2883
2883
  static PyObject *__pyx_v_6a_sync_6_smart_Future = 0;
2884
2884
  static PyObject *__pyx_v_6a_sync_6_smart_Task = 0;
2885
+ static PyObject *__pyx_v_6a_sync_6_smart_CancelledError = 0;
2885
2886
  static PyObject *__pyx_v_6a_sync_6_smart_InvalidStateError = 0;
2886
2887
  static PyObject *__pyx_v_6a_sync_6_smart__current_tasks = 0;
2887
2888
  static PyObject *__pyx_v_6a_sync_6_smart__future_init = 0;
@@ -2943,9 +2944,9 @@ static const char __pyx_k_Key[] = "_Key";
2943
2944
  static const char __pyx_k__11[] = "<";
2944
2945
  static const char __pyx_k__12[] = " ";
2945
2946
  static const char __pyx_k__13[] = ">";
2946
- static const char __pyx_k__25[] = "*";
2947
- static const char __pyx_k__26[] = ".";
2948
- static const char __pyx_k__46[] = "?";
2947
+ static const char __pyx_k__26[] = "*";
2948
+ static const char __pyx_k__27[] = ".";
2949
+ static const char __pyx_k__48[] = "?";
2949
2950
  static const char __pyx_k_add[] = "add";
2950
2951
  static const char __pyx_k_all[] = "__all__";
2951
2952
  static const char __pyx_k_arg[] = "arg";
@@ -3011,6 +3012,7 @@ static const char __pyx_k_waiter[] = "waiter";
3011
3012
  static const char __pyx_k_Generic[] = "Generic";
3012
3013
  static const char __pyx_k_WeakSet[] = "WeakSet(";
3013
3014
  static const char __pyx_k_asyncio[] = "asyncio";
3015
+ static const char __pyx_k_context[] = "__context__";
3014
3016
  static const char __pyx_k_disable[] = "disable";
3015
3017
  static const char __pyx_k_futures[] = "futures";
3016
3018
  static const char __pyx_k_inspect[] = "inspect";
@@ -3061,6 +3063,7 @@ static const char __pyx_k_TYPE_CHECKING[] = "TYPE_CHECKING";
3061
3063
  static const char __pyx_k_TracebackType[] = "TracebackType";
3062
3064
  static const char __pyx_k_a_sync__smart[] = "a_sync._smart";
3063
3065
  static const char __pyx_k_asyncio_tasks[] = "asyncio.tasks";
3066
+ static const char __pyx_k_cancelled_exc[] = "_cancelled_exc";
3064
3067
  static const char __pyx_k_class_getitem[] = "__class_getitem__";
3065
3068
  static const char __pyx_k_create_future[] = "create_future";
3066
3069
  static const char __pyx_k_current_tasks[] = "_current_tasks";
@@ -3069,9 +3072,11 @@ static const char __pyx_k_init_subclass[] = "__init_subclass__";
3069
3072
  static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
3070
3073
  static const char __pyx_k_set_exception[] = "set_exception";
3071
3074
  static const char __pyx_k_AttributeError[] = "AttributeError";
3075
+ static const char __pyx_k_CancelledError[] = "CancelledError";
3072
3076
  static const char __pyx_k_WeakSet___iter[] = "WeakSet.__iter__";
3073
3077
  static const char __pyx_k_a_sync__typing[] = "a_sync._typing";
3074
3078
  static const char __pyx_k_a_sync_asyncio[] = "a_sync.asyncio";
3079
+ static const char __pyx_k_cancel_message[] = "_cancel_message";
3075
3080
  static const char __pyx_k_get_event_loop[] = "get_event_loop";
3076
3081
  static const char __pyx_k_with_traceback[] = "with_traceback";
3077
3082
  static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
@@ -3101,6 +3106,7 @@ static const char __pyx_k_remove_done_callback[] = "remove_done_callback";
3101
3106
  static const char __pyx_k_Future__log_traceback[] = "_Future__log_traceback";
3102
3107
  static const char __pyx_k_Could_not_create_proxy[] = "Could not create proxy";
3103
3108
  static const char __pyx_k_Optional_TracebackType[] = "Optional[TracebackType]";
3109
+ static const char __pyx_k_asyncio_CancelledError[] = "asyncio.CancelledError";
3104
3110
  static const char __pyx_k_set_smart_task_factory[] = "set_smart_task_factory";
3105
3111
  static const char __pyx_k_WeakSet___reduce_cython[] = "WeakSet.__reduce_cython__";
3106
3112
  static const char __pyx_k_asyncio_future_blocking[] = "_asyncio_future_blocking";
@@ -3113,6 +3119,7 @@ static const char __pyx_k_await_wasn_t_used_with_future[] = "await wasn't used w
3113
3119
  static const char __pyx_k_Pyx_CFunc_5bbcea__6a_sync_6_sm[] = "__Pyx_CFunc_5bbcea__6a_sync_6_smart_7WeakSet_void__lParenWeakSet____etc_to_py_4self_3fut.<locals>.wrap";
3114
3120
  static const char __pyx_k_A_smart_future_that_tracks_wait[] = "\n A smart future that tracks waiters and integrates with a smart processing queue.\n\n Inherits from :class:`asyncio.Future`, providing additional functionality for tracking waiters and integrating with a smart processing queue.\n\n Example:\n Creating and awaiting a SmartFuture:\n\n ```python\n future = SmartFuture()\n await future\n ```\n\n See Also:\n - :class:`asyncio.Future`\n ";
3115
3121
  static const char __pyx_k_A_smart_task_that_tracks_waiter[] = "\n A smart task that tracks waiters and integrates with a smart processing queue.\n\n Inherits from :class:`asyncio.Task`, providing additional functionality for tracking waiters.\n\n Example:\n Creating and awaiting a SmartTask:\n\n ```python\n task = SmartTask(coro=my_coroutine())\n await task\n ```\n\n See Also:\n - :class:`asyncio.Task`\n ";
3122
+ static const char __pyx_k_SmartTask__make_cancelled_error[] = "SmartTask._make_cancelled_error";
3116
3123
  static const char __pyx_k_This_module_defines_smart_futur[] = "\nThis module defines smart future and task utilities for the a_sync library.\nThese utilities provide enhanced functionality for managing asynchronous tasks and futures,\nincluding a custom task factory for creating :class:`~SmartTask` instances and a shielding mechanism\nto protect tasks from cancellation.\n";
3117
3124
  static const char __pyx_k_get_done_callbacks_locals__inne[] = "_get_done_callbacks.<locals>._inner_done_callback";
3118
3125
  static const char __pyx_k_get_done_callbacks_locals__oute[] = "_get_done_callbacks.<locals>._outer_done_callback";
@@ -3142,6 +3149,7 @@ static PyObject *__pyx_pf_6a_sync_6_smart_create_future(CYTHON_UNUSED PyObject *
3142
3149
  static PyObject *__pyx_pf_6a_sync_6_smart_9SmartTask___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_coro, PyObject *__pyx_v_loop, PyObject *__pyx_v_name); /* proto */
3143
3150
  static PyObject *__pyx_pf_6a_sync_6_smart_9SmartTask_2__await__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
3144
3151
  static PyObject *__pyx_pf_6a_sync_6_smart_9SmartTask_5_waiter_done_cleanup_callback(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_waiter); /* proto */
3152
+ static PyObject *__pyx_pf_6a_sync_6_smart_9SmartTask_7_make_cancelled_error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
3145
3153
  static PyObject *__pyx_pf_6a_sync_6_smart_2smart_task_factory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_loop, PyObject *__pyx_v_coro); /* proto */
3146
3154
  static PyObject *__pyx_pf_6a_sync_6_smart_4set_smart_task_factory(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_loop); /* proto */
3147
3155
  static PyObject *__pyx_pf_6a_sync_6_smart_6shield(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arg); /* proto */
@@ -3223,6 +3231,7 @@ typedef struct {
3223
3231
  PyObject *__pyx_n_s_Any;
3224
3232
  PyObject *__pyx_n_s_AttributeError;
3225
3233
  PyObject *__pyx_kp_s_Awaitable_T;
3234
+ PyObject *__pyx_n_s_CancelledError;
3226
3235
  PyObject *__pyx_kp_u_Could_not_create_proxy;
3227
3236
  PyObject *__pyx_kp_u_Could_not_create_ref;
3228
3237
  PyObject *__pyx_kp_u_Exception_is_not_set;
@@ -3260,6 +3269,7 @@ typedef struct {
3260
3269
  PyObject *__pyx_n_u_SmartTask_2;
3261
3270
  PyObject *__pyx_n_s_SmartTask___await;
3262
3271
  PyObject *__pyx_n_s_SmartTask___init;
3272
+ PyObject *__pyx_n_s_SmartTask__make_cancelled_error;
3263
3273
  PyObject *__pyx_n_s_SmartTask__waiter_done_cleanup_c;
3264
3274
  PyObject *__pyx_n_s_T;
3265
3275
  PyObject *__pyx_n_s_TYPE_CHECKING;
@@ -3276,11 +3286,11 @@ typedef struct {
3276
3286
  PyObject *__pyx_kp_u__11;
3277
3287
  PyObject *__pyx_kp_u__12;
3278
3288
  PyObject *__pyx_kp_u__13;
3279
- PyObject *__pyx_n_s__25;
3280
- PyObject *__pyx_kp_u__26;
3289
+ PyObject *__pyx_n_s__26;
3290
+ PyObject *__pyx_kp_u__27;
3281
3291
  PyObject *__pyx_kp_u__3;
3282
3292
  PyObject *__pyx_kp_u__4;
3283
- PyObject *__pyx_n_s__46;
3293
+ PyObject *__pyx_n_s__48;
3284
3294
  PyObject *__pyx_n_s_a_sync;
3285
3295
  PyObject *__pyx_n_s_a_sync__smart;
3286
3296
  PyObject *__pyx_kp_s_a_sync__smart_pyx;
@@ -3293,6 +3303,7 @@ typedef struct {
3293
3303
  PyObject *__pyx_n_s_arg;
3294
3304
  PyObject *__pyx_n_s_args;
3295
3305
  PyObject *__pyx_n_s_asyncio;
3306
+ PyObject *__pyx_kp_s_asyncio_CancelledError;
3296
3307
  PyObject *__pyx_n_s_asyncio_coroutines;
3297
3308
  PyObject *__pyx_n_s_asyncio_future_blocking;
3298
3309
  PyObject *__pyx_n_s_asyncio_tasks;
@@ -3301,11 +3312,14 @@ typedef struct {
3301
3312
  PyObject *__pyx_kp_u_awaiting_s;
3302
3313
  PyObject *__pyx_n_s_bint;
3303
3314
  PyObject *__pyx_n_s_cancel;
3315
+ PyObject *__pyx_n_s_cancel_message;
3316
+ PyObject *__pyx_n_s_cancelled_exc;
3304
3317
  PyObject *__pyx_n_s_cause;
3305
3318
  PyObject *__pyx_n_s_cfunc_to_py;
3306
3319
  PyObject *__pyx_n_s_class_getitem;
3307
3320
  PyObject *__pyx_n_s_cline_in_traceback;
3308
3321
  PyObject *__pyx_n_s_close;
3322
+ PyObject *__pyx_n_s_context;
3309
3323
  PyObject *__pyx_n_s_coro;
3310
3324
  PyObject *__pyx_n_s_create_future;
3311
3325
  PyObject *__pyx_n_u_create_future;
@@ -3417,23 +3431,24 @@ typedef struct {
3417
3431
  PyObject *__pyx_tuple__5;
3418
3432
  PyObject *__pyx_tuple__9;
3419
3433
  PyObject *__pyx_tuple__16;
3420
- PyObject *__pyx_tuple__19;
3421
- PyObject *__pyx_tuple__21;
3422
- PyObject *__pyx_tuple__23;
3423
- PyObject *__pyx_tuple__27;
3434
+ PyObject *__pyx_tuple__20;
3435
+ PyObject *__pyx_tuple__22;
3436
+ PyObject *__pyx_tuple__24;
3424
3437
  PyObject *__pyx_tuple__28;
3425
3438
  PyObject *__pyx_tuple__29;
3426
3439
  PyObject *__pyx_tuple__30;
3427
3440
  PyObject *__pyx_tuple__31;
3428
3441
  PyObject *__pyx_tuple__32;
3429
- PyObject *__pyx_tuple__34;
3430
- PyObject *__pyx_tuple__36;
3442
+ PyObject *__pyx_tuple__33;
3443
+ PyObject *__pyx_tuple__35;
3431
3444
  PyObject *__pyx_tuple__37;
3432
- PyObject *__pyx_tuple__39;
3433
- PyObject *__pyx_tuple__41;
3445
+ PyObject *__pyx_tuple__38;
3446
+ PyObject *__pyx_tuple__40;
3447
+ PyObject *__pyx_tuple__42;
3434
3448
  PyObject *__pyx_tuple__43;
3435
- PyObject *__pyx_tuple__44;
3436
3449
  PyObject *__pyx_tuple__45;
3450
+ PyObject *__pyx_tuple__46;
3451
+ PyObject *__pyx_tuple__47;
3437
3452
  PyObject *__pyx_codeobj__2;
3438
3453
  PyObject *__pyx_codeobj__6;
3439
3454
  PyObject *__pyx_codeobj__7;
@@ -3443,14 +3458,15 @@ typedef struct {
3443
3458
  PyObject *__pyx_codeobj__15;
3444
3459
  PyObject *__pyx_codeobj__17;
3445
3460
  PyObject *__pyx_codeobj__18;
3446
- PyObject *__pyx_codeobj__20;
3447
- PyObject *__pyx_codeobj__22;
3448
- PyObject *__pyx_codeobj__24;
3449
- PyObject *__pyx_codeobj__33;
3450
- PyObject *__pyx_codeobj__35;
3451
- PyObject *__pyx_codeobj__38;
3452
- PyObject *__pyx_codeobj__40;
3453
- PyObject *__pyx_codeobj__42;
3461
+ PyObject *__pyx_codeobj__19;
3462
+ PyObject *__pyx_codeobj__21;
3463
+ PyObject *__pyx_codeobj__23;
3464
+ PyObject *__pyx_codeobj__25;
3465
+ PyObject *__pyx_codeobj__34;
3466
+ PyObject *__pyx_codeobj__36;
3467
+ PyObject *__pyx_codeobj__39;
3468
+ PyObject *__pyx_codeobj__41;
3469
+ PyObject *__pyx_codeobj__44;
3454
3470
  } __pyx_mstate;
3455
3471
 
3456
3472
  #if CYTHON_USE_MODULE_STATE
@@ -3512,6 +3528,7 @@ static int __pyx_m_clear(PyObject *m) {
3512
3528
  Py_CLEAR(clear_module_state->__pyx_n_s_Any);
3513
3529
  Py_CLEAR(clear_module_state->__pyx_n_s_AttributeError);
3514
3530
  Py_CLEAR(clear_module_state->__pyx_kp_s_Awaitable_T);
3531
+ Py_CLEAR(clear_module_state->__pyx_n_s_CancelledError);
3515
3532
  Py_CLEAR(clear_module_state->__pyx_kp_u_Could_not_create_proxy);
3516
3533
  Py_CLEAR(clear_module_state->__pyx_kp_u_Could_not_create_ref);
3517
3534
  Py_CLEAR(clear_module_state->__pyx_kp_u_Exception_is_not_set);
@@ -3549,6 +3566,7 @@ static int __pyx_m_clear(PyObject *m) {
3549
3566
  Py_CLEAR(clear_module_state->__pyx_n_u_SmartTask_2);
3550
3567
  Py_CLEAR(clear_module_state->__pyx_n_s_SmartTask___await);
3551
3568
  Py_CLEAR(clear_module_state->__pyx_n_s_SmartTask___init);
3569
+ Py_CLEAR(clear_module_state->__pyx_n_s_SmartTask__make_cancelled_error);
3552
3570
  Py_CLEAR(clear_module_state->__pyx_n_s_SmartTask__waiter_done_cleanup_c);
3553
3571
  Py_CLEAR(clear_module_state->__pyx_n_s_T);
3554
3572
  Py_CLEAR(clear_module_state->__pyx_n_s_TYPE_CHECKING);
@@ -3565,11 +3583,11 @@ static int __pyx_m_clear(PyObject *m) {
3565
3583
  Py_CLEAR(clear_module_state->__pyx_kp_u__11);
3566
3584
  Py_CLEAR(clear_module_state->__pyx_kp_u__12);
3567
3585
  Py_CLEAR(clear_module_state->__pyx_kp_u__13);
3568
- Py_CLEAR(clear_module_state->__pyx_n_s__25);
3569
- Py_CLEAR(clear_module_state->__pyx_kp_u__26);
3586
+ Py_CLEAR(clear_module_state->__pyx_n_s__26);
3587
+ Py_CLEAR(clear_module_state->__pyx_kp_u__27);
3570
3588
  Py_CLEAR(clear_module_state->__pyx_kp_u__3);
3571
3589
  Py_CLEAR(clear_module_state->__pyx_kp_u__4);
3572
- Py_CLEAR(clear_module_state->__pyx_n_s__46);
3590
+ Py_CLEAR(clear_module_state->__pyx_n_s__48);
3573
3591
  Py_CLEAR(clear_module_state->__pyx_n_s_a_sync);
3574
3592
  Py_CLEAR(clear_module_state->__pyx_n_s_a_sync__smart);
3575
3593
  Py_CLEAR(clear_module_state->__pyx_kp_s_a_sync__smart_pyx);
@@ -3582,6 +3600,7 @@ static int __pyx_m_clear(PyObject *m) {
3582
3600
  Py_CLEAR(clear_module_state->__pyx_n_s_arg);
3583
3601
  Py_CLEAR(clear_module_state->__pyx_n_s_args);
3584
3602
  Py_CLEAR(clear_module_state->__pyx_n_s_asyncio);
3603
+ Py_CLEAR(clear_module_state->__pyx_kp_s_asyncio_CancelledError);
3585
3604
  Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
3586
3605
  Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_future_blocking);
3587
3606
  Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_tasks);
@@ -3590,11 +3609,14 @@ static int __pyx_m_clear(PyObject *m) {
3590
3609
  Py_CLEAR(clear_module_state->__pyx_kp_u_awaiting_s);
3591
3610
  Py_CLEAR(clear_module_state->__pyx_n_s_bint);
3592
3611
  Py_CLEAR(clear_module_state->__pyx_n_s_cancel);
3612
+ Py_CLEAR(clear_module_state->__pyx_n_s_cancel_message);
3613
+ Py_CLEAR(clear_module_state->__pyx_n_s_cancelled_exc);
3593
3614
  Py_CLEAR(clear_module_state->__pyx_n_s_cause);
3594
3615
  Py_CLEAR(clear_module_state->__pyx_n_s_cfunc_to_py);
3595
3616
  Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem);
3596
3617
  Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
3597
3618
  Py_CLEAR(clear_module_state->__pyx_n_s_close);
3619
+ Py_CLEAR(clear_module_state->__pyx_n_s_context);
3598
3620
  Py_CLEAR(clear_module_state->__pyx_n_s_coro);
3599
3621
  Py_CLEAR(clear_module_state->__pyx_n_s_create_future);
3600
3622
  Py_CLEAR(clear_module_state->__pyx_n_u_create_future);
@@ -3706,23 +3728,24 @@ static int __pyx_m_clear(PyObject *m) {
3706
3728
  Py_CLEAR(clear_module_state->__pyx_tuple__5);
3707
3729
  Py_CLEAR(clear_module_state->__pyx_tuple__9);
3708
3730
  Py_CLEAR(clear_module_state->__pyx_tuple__16);
3709
- Py_CLEAR(clear_module_state->__pyx_tuple__19);
3710
- Py_CLEAR(clear_module_state->__pyx_tuple__21);
3711
- Py_CLEAR(clear_module_state->__pyx_tuple__23);
3712
- Py_CLEAR(clear_module_state->__pyx_tuple__27);
3731
+ Py_CLEAR(clear_module_state->__pyx_tuple__20);
3732
+ Py_CLEAR(clear_module_state->__pyx_tuple__22);
3733
+ Py_CLEAR(clear_module_state->__pyx_tuple__24);
3713
3734
  Py_CLEAR(clear_module_state->__pyx_tuple__28);
3714
3735
  Py_CLEAR(clear_module_state->__pyx_tuple__29);
3715
3736
  Py_CLEAR(clear_module_state->__pyx_tuple__30);
3716
3737
  Py_CLEAR(clear_module_state->__pyx_tuple__31);
3717
3738
  Py_CLEAR(clear_module_state->__pyx_tuple__32);
3718
- Py_CLEAR(clear_module_state->__pyx_tuple__34);
3719
- Py_CLEAR(clear_module_state->__pyx_tuple__36);
3739
+ Py_CLEAR(clear_module_state->__pyx_tuple__33);
3740
+ Py_CLEAR(clear_module_state->__pyx_tuple__35);
3720
3741
  Py_CLEAR(clear_module_state->__pyx_tuple__37);
3721
- Py_CLEAR(clear_module_state->__pyx_tuple__39);
3722
- Py_CLEAR(clear_module_state->__pyx_tuple__41);
3742
+ Py_CLEAR(clear_module_state->__pyx_tuple__38);
3743
+ Py_CLEAR(clear_module_state->__pyx_tuple__40);
3744
+ Py_CLEAR(clear_module_state->__pyx_tuple__42);
3723
3745
  Py_CLEAR(clear_module_state->__pyx_tuple__43);
3724
- Py_CLEAR(clear_module_state->__pyx_tuple__44);
3725
3746
  Py_CLEAR(clear_module_state->__pyx_tuple__45);
3747
+ Py_CLEAR(clear_module_state->__pyx_tuple__46);
3748
+ Py_CLEAR(clear_module_state->__pyx_tuple__47);
3726
3749
  Py_CLEAR(clear_module_state->__pyx_codeobj__2);
3727
3750
  Py_CLEAR(clear_module_state->__pyx_codeobj__6);
3728
3751
  Py_CLEAR(clear_module_state->__pyx_codeobj__7);
@@ -3732,14 +3755,15 @@ static int __pyx_m_clear(PyObject *m) {
3732
3755
  Py_CLEAR(clear_module_state->__pyx_codeobj__15);
3733
3756
  Py_CLEAR(clear_module_state->__pyx_codeobj__17);
3734
3757
  Py_CLEAR(clear_module_state->__pyx_codeobj__18);
3735
- Py_CLEAR(clear_module_state->__pyx_codeobj__20);
3736
- Py_CLEAR(clear_module_state->__pyx_codeobj__22);
3737
- Py_CLEAR(clear_module_state->__pyx_codeobj__24);
3738
- Py_CLEAR(clear_module_state->__pyx_codeobj__33);
3739
- Py_CLEAR(clear_module_state->__pyx_codeobj__35);
3740
- Py_CLEAR(clear_module_state->__pyx_codeobj__38);
3741
- Py_CLEAR(clear_module_state->__pyx_codeobj__40);
3742
- Py_CLEAR(clear_module_state->__pyx_codeobj__42);
3758
+ Py_CLEAR(clear_module_state->__pyx_codeobj__19);
3759
+ Py_CLEAR(clear_module_state->__pyx_codeobj__21);
3760
+ Py_CLEAR(clear_module_state->__pyx_codeobj__23);
3761
+ Py_CLEAR(clear_module_state->__pyx_codeobj__25);
3762
+ Py_CLEAR(clear_module_state->__pyx_codeobj__34);
3763
+ Py_CLEAR(clear_module_state->__pyx_codeobj__36);
3764
+ Py_CLEAR(clear_module_state->__pyx_codeobj__39);
3765
+ Py_CLEAR(clear_module_state->__pyx_codeobj__41);
3766
+ Py_CLEAR(clear_module_state->__pyx_codeobj__44);
3743
3767
  return 0;
3744
3768
  }
3745
3769
  #endif
@@ -3779,6 +3803,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
3779
3803
  Py_VISIT(traverse_module_state->__pyx_n_s_Any);
3780
3804
  Py_VISIT(traverse_module_state->__pyx_n_s_AttributeError);
3781
3805
  Py_VISIT(traverse_module_state->__pyx_kp_s_Awaitable_T);
3806
+ Py_VISIT(traverse_module_state->__pyx_n_s_CancelledError);
3782
3807
  Py_VISIT(traverse_module_state->__pyx_kp_u_Could_not_create_proxy);
3783
3808
  Py_VISIT(traverse_module_state->__pyx_kp_u_Could_not_create_ref);
3784
3809
  Py_VISIT(traverse_module_state->__pyx_kp_u_Exception_is_not_set);
@@ -3816,6 +3841,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
3816
3841
  Py_VISIT(traverse_module_state->__pyx_n_u_SmartTask_2);
3817
3842
  Py_VISIT(traverse_module_state->__pyx_n_s_SmartTask___await);
3818
3843
  Py_VISIT(traverse_module_state->__pyx_n_s_SmartTask___init);
3844
+ Py_VISIT(traverse_module_state->__pyx_n_s_SmartTask__make_cancelled_error);
3819
3845
  Py_VISIT(traverse_module_state->__pyx_n_s_SmartTask__waiter_done_cleanup_c);
3820
3846
  Py_VISIT(traverse_module_state->__pyx_n_s_T);
3821
3847
  Py_VISIT(traverse_module_state->__pyx_n_s_TYPE_CHECKING);
@@ -3832,11 +3858,11 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
3832
3858
  Py_VISIT(traverse_module_state->__pyx_kp_u__11);
3833
3859
  Py_VISIT(traverse_module_state->__pyx_kp_u__12);
3834
3860
  Py_VISIT(traverse_module_state->__pyx_kp_u__13);
3835
- Py_VISIT(traverse_module_state->__pyx_n_s__25);
3836
- Py_VISIT(traverse_module_state->__pyx_kp_u__26);
3861
+ Py_VISIT(traverse_module_state->__pyx_n_s__26);
3862
+ Py_VISIT(traverse_module_state->__pyx_kp_u__27);
3837
3863
  Py_VISIT(traverse_module_state->__pyx_kp_u__3);
3838
3864
  Py_VISIT(traverse_module_state->__pyx_kp_u__4);
3839
- Py_VISIT(traverse_module_state->__pyx_n_s__46);
3865
+ Py_VISIT(traverse_module_state->__pyx_n_s__48);
3840
3866
  Py_VISIT(traverse_module_state->__pyx_n_s_a_sync);
3841
3867
  Py_VISIT(traverse_module_state->__pyx_n_s_a_sync__smart);
3842
3868
  Py_VISIT(traverse_module_state->__pyx_kp_s_a_sync__smart_pyx);
@@ -3849,6 +3875,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
3849
3875
  Py_VISIT(traverse_module_state->__pyx_n_s_arg);
3850
3876
  Py_VISIT(traverse_module_state->__pyx_n_s_args);
3851
3877
  Py_VISIT(traverse_module_state->__pyx_n_s_asyncio);
3878
+ Py_VISIT(traverse_module_state->__pyx_kp_s_asyncio_CancelledError);
3852
3879
  Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
3853
3880
  Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_future_blocking);
3854
3881
  Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_tasks);
@@ -3857,11 +3884,14 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
3857
3884
  Py_VISIT(traverse_module_state->__pyx_kp_u_awaiting_s);
3858
3885
  Py_VISIT(traverse_module_state->__pyx_n_s_bint);
3859
3886
  Py_VISIT(traverse_module_state->__pyx_n_s_cancel);
3887
+ Py_VISIT(traverse_module_state->__pyx_n_s_cancel_message);
3888
+ Py_VISIT(traverse_module_state->__pyx_n_s_cancelled_exc);
3860
3889
  Py_VISIT(traverse_module_state->__pyx_n_s_cause);
3861
3890
  Py_VISIT(traverse_module_state->__pyx_n_s_cfunc_to_py);
3862
3891
  Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem);
3863
3892
  Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
3864
3893
  Py_VISIT(traverse_module_state->__pyx_n_s_close);
3894
+ Py_VISIT(traverse_module_state->__pyx_n_s_context);
3865
3895
  Py_VISIT(traverse_module_state->__pyx_n_s_coro);
3866
3896
  Py_VISIT(traverse_module_state->__pyx_n_s_create_future);
3867
3897
  Py_VISIT(traverse_module_state->__pyx_n_u_create_future);
@@ -3973,23 +4003,24 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
3973
4003
  Py_VISIT(traverse_module_state->__pyx_tuple__5);
3974
4004
  Py_VISIT(traverse_module_state->__pyx_tuple__9);
3975
4005
  Py_VISIT(traverse_module_state->__pyx_tuple__16);
3976
- Py_VISIT(traverse_module_state->__pyx_tuple__19);
3977
- Py_VISIT(traverse_module_state->__pyx_tuple__21);
3978
- Py_VISIT(traverse_module_state->__pyx_tuple__23);
3979
- Py_VISIT(traverse_module_state->__pyx_tuple__27);
4006
+ Py_VISIT(traverse_module_state->__pyx_tuple__20);
4007
+ Py_VISIT(traverse_module_state->__pyx_tuple__22);
4008
+ Py_VISIT(traverse_module_state->__pyx_tuple__24);
3980
4009
  Py_VISIT(traverse_module_state->__pyx_tuple__28);
3981
4010
  Py_VISIT(traverse_module_state->__pyx_tuple__29);
3982
4011
  Py_VISIT(traverse_module_state->__pyx_tuple__30);
3983
4012
  Py_VISIT(traverse_module_state->__pyx_tuple__31);
3984
4013
  Py_VISIT(traverse_module_state->__pyx_tuple__32);
3985
- Py_VISIT(traverse_module_state->__pyx_tuple__34);
3986
- Py_VISIT(traverse_module_state->__pyx_tuple__36);
4014
+ Py_VISIT(traverse_module_state->__pyx_tuple__33);
4015
+ Py_VISIT(traverse_module_state->__pyx_tuple__35);
3987
4016
  Py_VISIT(traverse_module_state->__pyx_tuple__37);
3988
- Py_VISIT(traverse_module_state->__pyx_tuple__39);
3989
- Py_VISIT(traverse_module_state->__pyx_tuple__41);
4017
+ Py_VISIT(traverse_module_state->__pyx_tuple__38);
4018
+ Py_VISIT(traverse_module_state->__pyx_tuple__40);
4019
+ Py_VISIT(traverse_module_state->__pyx_tuple__42);
3990
4020
  Py_VISIT(traverse_module_state->__pyx_tuple__43);
3991
- Py_VISIT(traverse_module_state->__pyx_tuple__44);
3992
4021
  Py_VISIT(traverse_module_state->__pyx_tuple__45);
4022
+ Py_VISIT(traverse_module_state->__pyx_tuple__46);
4023
+ Py_VISIT(traverse_module_state->__pyx_tuple__47);
3993
4024
  Py_VISIT(traverse_module_state->__pyx_codeobj__2);
3994
4025
  Py_VISIT(traverse_module_state->__pyx_codeobj__6);
3995
4026
  Py_VISIT(traverse_module_state->__pyx_codeobj__7);
@@ -3999,14 +4030,15 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
3999
4030
  Py_VISIT(traverse_module_state->__pyx_codeobj__15);
4000
4031
  Py_VISIT(traverse_module_state->__pyx_codeobj__17);
4001
4032
  Py_VISIT(traverse_module_state->__pyx_codeobj__18);
4002
- Py_VISIT(traverse_module_state->__pyx_codeobj__20);
4003
- Py_VISIT(traverse_module_state->__pyx_codeobj__22);
4004
- Py_VISIT(traverse_module_state->__pyx_codeobj__24);
4005
- Py_VISIT(traverse_module_state->__pyx_codeobj__33);
4006
- Py_VISIT(traverse_module_state->__pyx_codeobj__35);
4007
- Py_VISIT(traverse_module_state->__pyx_codeobj__38);
4008
- Py_VISIT(traverse_module_state->__pyx_codeobj__40);
4009
- Py_VISIT(traverse_module_state->__pyx_codeobj__42);
4033
+ Py_VISIT(traverse_module_state->__pyx_codeobj__19);
4034
+ Py_VISIT(traverse_module_state->__pyx_codeobj__21);
4035
+ Py_VISIT(traverse_module_state->__pyx_codeobj__23);
4036
+ Py_VISIT(traverse_module_state->__pyx_codeobj__25);
4037
+ Py_VISIT(traverse_module_state->__pyx_codeobj__34);
4038
+ Py_VISIT(traverse_module_state->__pyx_codeobj__36);
4039
+ Py_VISIT(traverse_module_state->__pyx_codeobj__39);
4040
+ Py_VISIT(traverse_module_state->__pyx_codeobj__41);
4041
+ Py_VISIT(traverse_module_state->__pyx_codeobj__44);
4010
4042
  return 0;
4011
4043
  }
4012
4044
  #endif
@@ -4076,6 +4108,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
4076
4108
  #define __pyx_n_s_Any __pyx_mstate_global->__pyx_n_s_Any
4077
4109
  #define __pyx_n_s_AttributeError __pyx_mstate_global->__pyx_n_s_AttributeError
4078
4110
  #define __pyx_kp_s_Awaitable_T __pyx_mstate_global->__pyx_kp_s_Awaitable_T
4111
+ #define __pyx_n_s_CancelledError __pyx_mstate_global->__pyx_n_s_CancelledError
4079
4112
  #define __pyx_kp_u_Could_not_create_proxy __pyx_mstate_global->__pyx_kp_u_Could_not_create_proxy
4080
4113
  #define __pyx_kp_u_Could_not_create_ref __pyx_mstate_global->__pyx_kp_u_Could_not_create_ref
4081
4114
  #define __pyx_kp_u_Exception_is_not_set __pyx_mstate_global->__pyx_kp_u_Exception_is_not_set
@@ -4113,6 +4146,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
4113
4146
  #define __pyx_n_u_SmartTask_2 __pyx_mstate_global->__pyx_n_u_SmartTask_2
4114
4147
  #define __pyx_n_s_SmartTask___await __pyx_mstate_global->__pyx_n_s_SmartTask___await
4115
4148
  #define __pyx_n_s_SmartTask___init __pyx_mstate_global->__pyx_n_s_SmartTask___init
4149
+ #define __pyx_n_s_SmartTask__make_cancelled_error __pyx_mstate_global->__pyx_n_s_SmartTask__make_cancelled_error
4116
4150
  #define __pyx_n_s_SmartTask__waiter_done_cleanup_c __pyx_mstate_global->__pyx_n_s_SmartTask__waiter_done_cleanup_c
4117
4151
  #define __pyx_n_s_T __pyx_mstate_global->__pyx_n_s_T
4118
4152
  #define __pyx_n_s_TYPE_CHECKING __pyx_mstate_global->__pyx_n_s_TYPE_CHECKING
@@ -4129,11 +4163,11 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
4129
4163
  #define __pyx_kp_u__11 __pyx_mstate_global->__pyx_kp_u__11
4130
4164
  #define __pyx_kp_u__12 __pyx_mstate_global->__pyx_kp_u__12
4131
4165
  #define __pyx_kp_u__13 __pyx_mstate_global->__pyx_kp_u__13
4132
- #define __pyx_n_s__25 __pyx_mstate_global->__pyx_n_s__25
4133
- #define __pyx_kp_u__26 __pyx_mstate_global->__pyx_kp_u__26
4166
+ #define __pyx_n_s__26 __pyx_mstate_global->__pyx_n_s__26
4167
+ #define __pyx_kp_u__27 __pyx_mstate_global->__pyx_kp_u__27
4134
4168
  #define __pyx_kp_u__3 __pyx_mstate_global->__pyx_kp_u__3
4135
4169
  #define __pyx_kp_u__4 __pyx_mstate_global->__pyx_kp_u__4
4136
- #define __pyx_n_s__46 __pyx_mstate_global->__pyx_n_s__46
4170
+ #define __pyx_n_s__48 __pyx_mstate_global->__pyx_n_s__48
4137
4171
  #define __pyx_n_s_a_sync __pyx_mstate_global->__pyx_n_s_a_sync
4138
4172
  #define __pyx_n_s_a_sync__smart __pyx_mstate_global->__pyx_n_s_a_sync__smart
4139
4173
  #define __pyx_kp_s_a_sync__smart_pyx __pyx_mstate_global->__pyx_kp_s_a_sync__smart_pyx
@@ -4146,6 +4180,7 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
4146
4180
  #define __pyx_n_s_arg __pyx_mstate_global->__pyx_n_s_arg
4147
4181
  #define __pyx_n_s_args __pyx_mstate_global->__pyx_n_s_args
4148
4182
  #define __pyx_n_s_asyncio __pyx_mstate_global->__pyx_n_s_asyncio
4183
+ #define __pyx_kp_s_asyncio_CancelledError __pyx_mstate_global->__pyx_kp_s_asyncio_CancelledError
4149
4184
  #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
4150
4185
  #define __pyx_n_s_asyncio_future_blocking __pyx_mstate_global->__pyx_n_s_asyncio_future_blocking
4151
4186
  #define __pyx_n_s_asyncio_tasks __pyx_mstate_global->__pyx_n_s_asyncio_tasks
@@ -4154,11 +4189,14 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
4154
4189
  #define __pyx_kp_u_awaiting_s __pyx_mstate_global->__pyx_kp_u_awaiting_s
4155
4190
  #define __pyx_n_s_bint __pyx_mstate_global->__pyx_n_s_bint
4156
4191
  #define __pyx_n_s_cancel __pyx_mstate_global->__pyx_n_s_cancel
4192
+ #define __pyx_n_s_cancel_message __pyx_mstate_global->__pyx_n_s_cancel_message
4193
+ #define __pyx_n_s_cancelled_exc __pyx_mstate_global->__pyx_n_s_cancelled_exc
4157
4194
  #define __pyx_n_s_cause __pyx_mstate_global->__pyx_n_s_cause
4158
4195
  #define __pyx_n_s_cfunc_to_py __pyx_mstate_global->__pyx_n_s_cfunc_to_py
4159
4196
  #define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem
4160
4197
  #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
4161
4198
  #define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close
4199
+ #define __pyx_n_s_context __pyx_mstate_global->__pyx_n_s_context
4162
4200
  #define __pyx_n_s_coro __pyx_mstate_global->__pyx_n_s_coro
4163
4201
  #define __pyx_n_s_create_future __pyx_mstate_global->__pyx_n_s_create_future
4164
4202
  #define __pyx_n_u_create_future __pyx_mstate_global->__pyx_n_u_create_future
@@ -4270,23 +4308,24 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
4270
4308
  #define __pyx_tuple__5 __pyx_mstate_global->__pyx_tuple__5
4271
4309
  #define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9
4272
4310
  #define __pyx_tuple__16 __pyx_mstate_global->__pyx_tuple__16
4273
- #define __pyx_tuple__19 __pyx_mstate_global->__pyx_tuple__19
4274
- #define __pyx_tuple__21 __pyx_mstate_global->__pyx_tuple__21
4275
- #define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23
4276
- #define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27
4311
+ #define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20
4312
+ #define __pyx_tuple__22 __pyx_mstate_global->__pyx_tuple__22
4313
+ #define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24
4277
4314
  #define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28
4278
4315
  #define __pyx_tuple__29 __pyx_mstate_global->__pyx_tuple__29
4279
4316
  #define __pyx_tuple__30 __pyx_mstate_global->__pyx_tuple__30
4280
4317
  #define __pyx_tuple__31 __pyx_mstate_global->__pyx_tuple__31
4281
4318
  #define __pyx_tuple__32 __pyx_mstate_global->__pyx_tuple__32
4282
- #define __pyx_tuple__34 __pyx_mstate_global->__pyx_tuple__34
4283
- #define __pyx_tuple__36 __pyx_mstate_global->__pyx_tuple__36
4319
+ #define __pyx_tuple__33 __pyx_mstate_global->__pyx_tuple__33
4320
+ #define __pyx_tuple__35 __pyx_mstate_global->__pyx_tuple__35
4284
4321
  #define __pyx_tuple__37 __pyx_mstate_global->__pyx_tuple__37
4285
- #define __pyx_tuple__39 __pyx_mstate_global->__pyx_tuple__39
4286
- #define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41
4322
+ #define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38
4323
+ #define __pyx_tuple__40 __pyx_mstate_global->__pyx_tuple__40
4324
+ #define __pyx_tuple__42 __pyx_mstate_global->__pyx_tuple__42
4287
4325
  #define __pyx_tuple__43 __pyx_mstate_global->__pyx_tuple__43
4288
- #define __pyx_tuple__44 __pyx_mstate_global->__pyx_tuple__44
4289
4326
  #define __pyx_tuple__45 __pyx_mstate_global->__pyx_tuple__45
4327
+ #define __pyx_tuple__46 __pyx_mstate_global->__pyx_tuple__46
4328
+ #define __pyx_tuple__47 __pyx_mstate_global->__pyx_tuple__47
4290
4329
  #define __pyx_codeobj__2 __pyx_mstate_global->__pyx_codeobj__2
4291
4330
  #define __pyx_codeobj__6 __pyx_mstate_global->__pyx_codeobj__6
4292
4331
  #define __pyx_codeobj__7 __pyx_mstate_global->__pyx_codeobj__7
@@ -4296,14 +4335,15 @@ static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
4296
4335
  #define __pyx_codeobj__15 __pyx_mstate_global->__pyx_codeobj__15
4297
4336
  #define __pyx_codeobj__17 __pyx_mstate_global->__pyx_codeobj__17
4298
4337
  #define __pyx_codeobj__18 __pyx_mstate_global->__pyx_codeobj__18
4299
- #define __pyx_codeobj__20 __pyx_mstate_global->__pyx_codeobj__20
4300
- #define __pyx_codeobj__22 __pyx_mstate_global->__pyx_codeobj__22
4301
- #define __pyx_codeobj__24 __pyx_mstate_global->__pyx_codeobj__24
4302
- #define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33
4303
- #define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35
4304
- #define __pyx_codeobj__38 __pyx_mstate_global->__pyx_codeobj__38
4305
- #define __pyx_codeobj__40 __pyx_mstate_global->__pyx_codeobj__40
4306
- #define __pyx_codeobj__42 __pyx_mstate_global->__pyx_codeobj__42
4338
+ #define __pyx_codeobj__19 __pyx_mstate_global->__pyx_codeobj__19
4339
+ #define __pyx_codeobj__21 __pyx_mstate_global->__pyx_codeobj__21
4340
+ #define __pyx_codeobj__23 __pyx_mstate_global->__pyx_codeobj__23
4341
+ #define __pyx_codeobj__25 __pyx_mstate_global->__pyx_codeobj__25
4342
+ #define __pyx_codeobj__34 __pyx_mstate_global->__pyx_codeobj__34
4343
+ #define __pyx_codeobj__36 __pyx_mstate_global->__pyx_codeobj__36
4344
+ #define __pyx_codeobj__39 __pyx_mstate_global->__pyx_codeobj__39
4345
+ #define __pyx_codeobj__41 __pyx_mstate_global->__pyx_codeobj__41
4346
+ #define __pyx_codeobj__44 __pyx_mstate_global->__pyx_codeobj__44
4307
4347
  /* #### Code section: module_code ### */
4308
4348
  PyObject *logger = 0;
4309
4349
 
@@ -9619,7 +9659,7 @@ static PyObject *__pyx_pf_6a_sync_6_smart_9SmartTask_5_waiter_done_cleanup_callb
9619
9659
  * if _is_not_done(self):
9620
9660
  * (<set>self._waiters).remove(waiter) # <<<<<<<<<<<<<<
9621
9661
  *
9622
- *
9662
+ * def _make_cancelled_error(self) -> asyncio.CancelledError:
9623
9663
  */
9624
9664
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_waiters); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
9625
9665
  __Pyx_GOTREF(__pyx_t_2);
@@ -9660,7 +9700,288 @@ static PyObject *__pyx_pf_6a_sync_6_smart_9SmartTask_5_waiter_done_cleanup_callb
9660
9700
  return __pyx_r;
9661
9701
  }
9662
9702
 
9663
- /* "a_sync/_smart.pyx":518
9703
+ /* "a_sync/_smart.pyx":513
9704
+ * (<set>self._waiters).remove(waiter)
9705
+ *
9706
+ * def _make_cancelled_error(self) -> asyncio.CancelledError: # <<<<<<<<<<<<<<
9707
+ * # this function is not present in python3.8 so we're backporting it
9708
+ * """Create the CancelledError to raise if the Future is cancelled.
9709
+ */
9710
+
9711
+ /* Python wrapper */
9712
+ static PyObject *__pyx_pw_6a_sync_6_smart_9SmartTask_8_make_cancelled_error(PyObject *__pyx_self,
9713
+ #if CYTHON_METH_FASTCALL
9714
+ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9715
+ #else
9716
+ PyObject *__pyx_args, PyObject *__pyx_kwds
9717
+ #endif
9718
+ ); /*proto*/
9719
+ PyDoc_STRVAR(__pyx_doc_6a_sync_6_smart_9SmartTask_7_make_cancelled_error, "SmartTask._make_cancelled_error(self) -> asyncio.CancelledError\nCreate the CancelledError to raise if the Future is cancelled.\n\n This should only be called once when handling a cancellation since\n it erases the saved context exception value.\n ");
9720
+ static PyMethodDef __pyx_mdef_6a_sync_6_smart_9SmartTask_8_make_cancelled_error = {"_make_cancelled_error", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_6a_sync_6_smart_9SmartTask_8_make_cancelled_error, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_6a_sync_6_smart_9SmartTask_7_make_cancelled_error};
9721
+ static PyObject *__pyx_pw_6a_sync_6_smart_9SmartTask_8_make_cancelled_error(PyObject *__pyx_self,
9722
+ #if CYTHON_METH_FASTCALL
9723
+ PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
9724
+ #else
9725
+ PyObject *__pyx_args, PyObject *__pyx_kwds
9726
+ #endif
9727
+ ) {
9728
+ PyObject *__pyx_v_self = 0;
9729
+ #if !CYTHON_METH_FASTCALL
9730
+ CYTHON_UNUSED Py_ssize_t __pyx_nargs;
9731
+ #endif
9732
+ CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
9733
+ PyObject* values[1] = {0};
9734
+ int __pyx_lineno = 0;
9735
+ const char *__pyx_filename = NULL;
9736
+ int __pyx_clineno = 0;
9737
+ PyObject *__pyx_r = 0;
9738
+ __Pyx_RefNannyDeclarations
9739
+ __Pyx_RefNannySetupContext("_make_cancelled_error (wrapper)", 0);
9740
+ #if !CYTHON_METH_FASTCALL
9741
+ #if CYTHON_ASSUME_SAFE_MACROS
9742
+ __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
9743
+ #else
9744
+ __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
9745
+ #endif
9746
+ #endif
9747
+ __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
9748
+ {
9749
+ PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
9750
+ if (__pyx_kwds) {
9751
+ Py_ssize_t kw_args;
9752
+ switch (__pyx_nargs) {
9753
+ case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
9754
+ CYTHON_FALLTHROUGH;
9755
+ case 0: break;
9756
+ default: goto __pyx_L5_argtuple_error;
9757
+ }
9758
+ kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
9759
+ switch (__pyx_nargs) {
9760
+ case 0:
9761
+ if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
9762
+ (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
9763
+ kw_args--;
9764
+ }
9765
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 513, __pyx_L3_error)
9766
+ else goto __pyx_L5_argtuple_error;
9767
+ }
9768
+ if (unlikely(kw_args > 0)) {
9769
+ const Py_ssize_t kwd_pos_args = __pyx_nargs;
9770
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_make_cancelled_error") < 0)) __PYX_ERR(0, 513, __pyx_L3_error)
9771
+ }
9772
+ } else if (unlikely(__pyx_nargs != 1)) {
9773
+ goto __pyx_L5_argtuple_error;
9774
+ } else {
9775
+ values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
9776
+ }
9777
+ __pyx_v_self = values[0];
9778
+ }
9779
+ goto __pyx_L6_skip;
9780
+ __pyx_L5_argtuple_error:;
9781
+ __Pyx_RaiseArgtupleInvalid("_make_cancelled_error", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 513, __pyx_L3_error)
9782
+ __pyx_L6_skip:;
9783
+ goto __pyx_L4_argument_unpacking_done;
9784
+ __pyx_L3_error:;
9785
+ {
9786
+ Py_ssize_t __pyx_temp;
9787
+ for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
9788
+ __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
9789
+ }
9790
+ }
9791
+ __Pyx_AddTraceback("a_sync._smart.SmartTask._make_cancelled_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
9792
+ __Pyx_RefNannyFinishContext();
9793
+ return NULL;
9794
+ __pyx_L4_argument_unpacking_done:;
9795
+ __pyx_r = __pyx_pf_6a_sync_6_smart_9SmartTask_7_make_cancelled_error(__pyx_self, __pyx_v_self);
9796
+
9797
+ /* function exit code */
9798
+ {
9799
+ Py_ssize_t __pyx_temp;
9800
+ for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
9801
+ __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
9802
+ }
9803
+ }
9804
+ __Pyx_RefNannyFinishContext();
9805
+ return __pyx_r;
9806
+ }
9807
+
9808
+ static PyObject *__pyx_pf_6a_sync_6_smart_9SmartTask_7_make_cancelled_error(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
9809
+ PyObject *__pyx_v_exc = NULL;
9810
+ PyObject *__pyx_r = NULL;
9811
+ __Pyx_TraceDeclarations
9812
+ __Pyx_RefNannyDeclarations
9813
+ PyObject *__pyx_t_1 = NULL;
9814
+ int __pyx_t_2;
9815
+ PyObject *__pyx_t_3 = NULL;
9816
+ PyObject *__pyx_t_4 = NULL;
9817
+ unsigned int __pyx_t_5;
9818
+ PyObject *__pyx_t_6 = NULL;
9819
+ int __pyx_lineno = 0;
9820
+ const char *__pyx_filename = NULL;
9821
+ int __pyx_clineno = 0;
9822
+ __Pyx_TraceFrameInit(__pyx_codeobj__18)
9823
+ __Pyx_RefNannySetupContext("_make_cancelled_error", 1);
9824
+ __Pyx_TraceCall("_make_cancelled_error", __pyx_f[0], 513, 0, __PYX_ERR(0, 513, __pyx_L1_error));
9825
+
9826
+ /* "a_sync/_smart.pyx":520
9827
+ * it erases the saved context exception value.
9828
+ * """
9829
+ * if self._cancel_message is None: # <<<<<<<<<<<<<<
9830
+ * exc = CancelledError()
9831
+ * else:
9832
+ */
9833
+ __Pyx_TraceLine(520,0,__PYX_ERR(0, 520, __pyx_L1_error))
9834
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cancel_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
9835
+ __Pyx_GOTREF(__pyx_t_1);
9836
+ __pyx_t_2 = (__pyx_t_1 == Py_None);
9837
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9838
+ if (__pyx_t_2) {
9839
+
9840
+ /* "a_sync/_smart.pyx":521
9841
+ * """
9842
+ * if self._cancel_message is None:
9843
+ * exc = CancelledError() # <<<<<<<<<<<<<<
9844
+ * else:
9845
+ * exc = CancelledError(self._cancel_message)
9846
+ */
9847
+ __Pyx_TraceLine(521,0,__PYX_ERR(0, 521, __pyx_L1_error))
9848
+ __Pyx_INCREF(__pyx_v_6a_sync_6_smart_CancelledError);
9849
+ __pyx_t_3 = __pyx_v_6a_sync_6_smart_CancelledError; __pyx_t_4 = NULL;
9850
+ __pyx_t_5 = 0;
9851
+ #if CYTHON_UNPACK_METHODS
9852
+ if (unlikely(PyMethod_Check(__pyx_t_3))) {
9853
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
9854
+ if (likely(__pyx_t_4)) {
9855
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
9856
+ __Pyx_INCREF(__pyx_t_4);
9857
+ __Pyx_INCREF(function);
9858
+ __Pyx_DECREF_SET(__pyx_t_3, function);
9859
+ __pyx_t_5 = 1;
9860
+ }
9861
+ }
9862
+ #endif
9863
+ {
9864
+ PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
9865
+ __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
9866
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
9867
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error)
9868
+ __Pyx_GOTREF(__pyx_t_1);
9869
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9870
+ }
9871
+ __pyx_v_exc = __pyx_t_1;
9872
+ __pyx_t_1 = 0;
9873
+
9874
+ /* "a_sync/_smart.pyx":520
9875
+ * it erases the saved context exception value.
9876
+ * """
9877
+ * if self._cancel_message is None: # <<<<<<<<<<<<<<
9878
+ * exc = CancelledError()
9879
+ * else:
9880
+ */
9881
+ goto __pyx_L3;
9882
+ }
9883
+
9884
+ /* "a_sync/_smart.pyx":523
9885
+ * exc = CancelledError()
9886
+ * else:
9887
+ * exc = CancelledError(self._cancel_message) # <<<<<<<<<<<<<<
9888
+ * exc.__context__ = self._cancelled_exc
9889
+ * # Remove the reference since we don't need this anymore.
9890
+ */
9891
+ __Pyx_TraceLine(523,0,__PYX_ERR(0, 523, __pyx_L1_error))
9892
+ /*else*/ {
9893
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cancel_message); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 523, __pyx_L1_error)
9894
+ __Pyx_GOTREF(__pyx_t_3);
9895
+ __Pyx_INCREF(__pyx_v_6a_sync_6_smart_CancelledError);
9896
+ __pyx_t_4 = __pyx_v_6a_sync_6_smart_CancelledError; __pyx_t_6 = NULL;
9897
+ __pyx_t_5 = 0;
9898
+ #if CYTHON_UNPACK_METHODS
9899
+ if (unlikely(PyMethod_Check(__pyx_t_4))) {
9900
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
9901
+ if (likely(__pyx_t_6)) {
9902
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
9903
+ __Pyx_INCREF(__pyx_t_6);
9904
+ __Pyx_INCREF(function);
9905
+ __Pyx_DECREF_SET(__pyx_t_4, function);
9906
+ __pyx_t_5 = 1;
9907
+ }
9908
+ }
9909
+ #endif
9910
+ {
9911
+ PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
9912
+ __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
9913
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
9914
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
9915
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
9916
+ __Pyx_GOTREF(__pyx_t_1);
9917
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
9918
+ }
9919
+ __pyx_v_exc = __pyx_t_1;
9920
+ __pyx_t_1 = 0;
9921
+ }
9922
+ __pyx_L3:;
9923
+
9924
+ /* "a_sync/_smart.pyx":524
9925
+ * else:
9926
+ * exc = CancelledError(self._cancel_message)
9927
+ * exc.__context__ = self._cancelled_exc # <<<<<<<<<<<<<<
9928
+ * # Remove the reference since we don't need this anymore.
9929
+ * self._cancelled_exc = None
9930
+ */
9931
+ __Pyx_TraceLine(524,0,__PYX_ERR(0, 524, __pyx_L1_error))
9932
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_cancelled_exc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error)
9933
+ __Pyx_GOTREF(__pyx_t_1);
9934
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_exc, __pyx_n_s_context, __pyx_t_1) < 0) __PYX_ERR(0, 524, __pyx_L1_error)
9935
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9936
+
9937
+ /* "a_sync/_smart.pyx":526
9938
+ * exc.__context__ = self._cancelled_exc
9939
+ * # Remove the reference since we don't need this anymore.
9940
+ * self._cancelled_exc = None # <<<<<<<<<<<<<<
9941
+ * return exc
9942
+ *
9943
+ */
9944
+ __Pyx_TraceLine(526,0,__PYX_ERR(0, 526, __pyx_L1_error))
9945
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_cancelled_exc, Py_None) < 0) __PYX_ERR(0, 526, __pyx_L1_error)
9946
+
9947
+ /* "a_sync/_smart.pyx":527
9948
+ * # Remove the reference since we don't need this anymore.
9949
+ * self._cancelled_exc = None
9950
+ * return exc # <<<<<<<<<<<<<<
9951
+ *
9952
+ *
9953
+ */
9954
+ __Pyx_TraceLine(527,0,__PYX_ERR(0, 527, __pyx_L1_error))
9955
+ __Pyx_XDECREF(__pyx_r);
9956
+ __Pyx_INCREF(__pyx_v_exc);
9957
+ __pyx_r = __pyx_v_exc;
9958
+ goto __pyx_L0;
9959
+
9960
+ /* "a_sync/_smart.pyx":513
9961
+ * (<set>self._waiters).remove(waiter)
9962
+ *
9963
+ * def _make_cancelled_error(self) -> asyncio.CancelledError: # <<<<<<<<<<<<<<
9964
+ * # this function is not present in python3.8 so we're backporting it
9965
+ * """Create the CancelledError to raise if the Future is cancelled.
9966
+ */
9967
+
9968
+ /* function exit code */
9969
+ __pyx_L1_error:;
9970
+ __Pyx_XDECREF(__pyx_t_1);
9971
+ __Pyx_XDECREF(__pyx_t_3);
9972
+ __Pyx_XDECREF(__pyx_t_4);
9973
+ __Pyx_XDECREF(__pyx_t_6);
9974
+ __Pyx_AddTraceback("a_sync._smart.SmartTask._make_cancelled_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
9975
+ __pyx_r = NULL;
9976
+ __pyx_L0:;
9977
+ __Pyx_XDECREF(__pyx_v_exc);
9978
+ __Pyx_XGIVEREF(__pyx_r);
9979
+ __Pyx_TraceReturn(__pyx_r, 0);
9980
+ __Pyx_RefNannyFinishContext();
9981
+ return __pyx_r;
9982
+ }
9983
+
9984
+ /* "a_sync/_smart.pyx":534
9664
9985
  *
9665
9986
  * @cython.linetrace(False)
9666
9987
  * cpdef object smart_task_factory(loop: AbstractEventLoop, coro: Awaitable[T]): # <<<<<<<<<<<<<<
@@ -9686,7 +10007,7 @@ static PyObject *__pyx_f_6a_sync_6_smart_smart_task_factory(PyObject *__pyx_v_lo
9686
10007
  int __pyx_clineno = 0;
9687
10008
  __Pyx_RefNannySetupContext("smart_task_factory", 1);
9688
10009
 
9689
- /* "a_sync/_smart.pyx":543
10010
+ /* "a_sync/_smart.pyx":559
9690
10011
  * - :class:`SmartTask`
9691
10012
  * """
9692
10013
  * return _SmartTask(coro, loop=loop) # <<<<<<<<<<<<<<
@@ -9694,15 +10015,15 @@ static PyObject *__pyx_f_6a_sync_6_smart_smart_task_factory(PyObject *__pyx_v_lo
9694
10015
  *
9695
10016
  */
9696
10017
  __Pyx_XDECREF(__pyx_r);
9697
- __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error)
10018
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
9698
10019
  __Pyx_GOTREF(__pyx_t_1);
9699
10020
  __Pyx_INCREF(__pyx_v_coro);
9700
10021
  __Pyx_GIVEREF(__pyx_v_coro);
9701
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_coro)) __PYX_ERR(0, 543, __pyx_L1_error);
9702
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error)
10022
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_coro)) __PYX_ERR(0, 559, __pyx_L1_error);
10023
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error)
9703
10024
  __Pyx_GOTREF(__pyx_t_2);
9704
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_loop, __pyx_v_loop) < 0) __PYX_ERR(0, 543, __pyx_L1_error)
9705
- __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_6a_sync_6_smart__SmartTask, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 543, __pyx_L1_error)
10025
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_loop, __pyx_v_loop) < 0) __PYX_ERR(0, 559, __pyx_L1_error)
10026
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_6a_sync_6_smart__SmartTask, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error)
9706
10027
  __Pyx_GOTREF(__pyx_t_3);
9707
10028
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
9708
10029
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
@@ -9710,7 +10031,7 @@ static PyObject *__pyx_f_6a_sync_6_smart_smart_task_factory(PyObject *__pyx_v_lo
9710
10031
  __pyx_t_3 = 0;
9711
10032
  goto __pyx_L0;
9712
10033
 
9713
- /* "a_sync/_smart.pyx":518
10034
+ /* "a_sync/_smart.pyx":534
9714
10035
  *
9715
10036
  * @cython.linetrace(False)
9716
10037
  * cpdef object smart_task_factory(loop: AbstractEventLoop, coro: Awaitable[T]): # <<<<<<<<<<<<<<
@@ -9788,7 +10109,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
9788
10109
  (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
9789
10110
  kw_args--;
9790
10111
  }
9791
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 518, __pyx_L3_error)
10112
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 534, __pyx_L3_error)
9792
10113
  else goto __pyx_L5_argtuple_error;
9793
10114
  CYTHON_FALLTHROUGH;
9794
10115
  case 1:
@@ -9796,14 +10117,14 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
9796
10117
  (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
9797
10118
  kw_args--;
9798
10119
  }
9799
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 518, __pyx_L3_error)
10120
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 534, __pyx_L3_error)
9800
10121
  else {
9801
- __Pyx_RaiseArgtupleInvalid("smart_task_factory", 1, 2, 2, 1); __PYX_ERR(0, 518, __pyx_L3_error)
10122
+ __Pyx_RaiseArgtupleInvalid("smart_task_factory", 1, 2, 2, 1); __PYX_ERR(0, 534, __pyx_L3_error)
9802
10123
  }
9803
10124
  }
9804
10125
  if (unlikely(kw_args > 0)) {
9805
10126
  const Py_ssize_t kwd_pos_args = __pyx_nargs;
9806
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "smart_task_factory") < 0)) __PYX_ERR(0, 518, __pyx_L3_error)
10127
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "smart_task_factory") < 0)) __PYX_ERR(0, 534, __pyx_L3_error)
9807
10128
  }
9808
10129
  } else if (unlikely(__pyx_nargs != 2)) {
9809
10130
  goto __pyx_L5_argtuple_error;
@@ -9816,7 +10137,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
9816
10137
  }
9817
10138
  goto __pyx_L6_skip;
9818
10139
  __pyx_L5_argtuple_error:;
9819
- __Pyx_RaiseArgtupleInvalid("smart_task_factory", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 518, __pyx_L3_error)
10140
+ __Pyx_RaiseArgtupleInvalid("smart_task_factory", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 534, __pyx_L3_error)
9820
10141
  __pyx_L6_skip:;
9821
10142
  goto __pyx_L4_argument_unpacking_done;
9822
10143
  __pyx_L3_error:;
@@ -9852,7 +10173,7 @@ static PyObject *__pyx_pf_6a_sync_6_smart_2smart_task_factory(CYTHON_UNUSED PyOb
9852
10173
  int __pyx_clineno = 0;
9853
10174
  __Pyx_RefNannySetupContext("smart_task_factory", 1);
9854
10175
  __Pyx_XDECREF(__pyx_r);
9855
- __pyx_t_1 = __pyx_f_6a_sync_6_smart_smart_task_factory(__pyx_v_loop, __pyx_v_coro, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error)
10176
+ __pyx_t_1 = __pyx_f_6a_sync_6_smart_smart_task_factory(__pyx_v_loop, __pyx_v_coro, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
9856
10177
  __Pyx_GOTREF(__pyx_t_1);
9857
10178
  __pyx_r = __pyx_t_1;
9858
10179
  __pyx_t_1 = 0;
@@ -9869,7 +10190,7 @@ static PyObject *__pyx_pf_6a_sync_6_smart_2smart_task_factory(CYTHON_UNUSED PyOb
9869
10190
  return __pyx_r;
9870
10191
  }
9871
10192
 
9872
- /* "a_sync/_smart.pyx":546
10193
+ /* "a_sync/_smart.pyx":562
9873
10194
  *
9874
10195
  *
9875
10196
  * def set_smart_task_factory(loop: AbstractEventLoop = None) -> None: # <<<<<<<<<<<<<<
@@ -9931,12 +10252,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
9931
10252
  if (kw_args > 0) {
9932
10253
  PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_loop);
9933
10254
  if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
9934
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 546, __pyx_L3_error)
10255
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 562, __pyx_L3_error)
9935
10256
  }
9936
10257
  }
9937
10258
  if (unlikely(kw_args > 0)) {
9938
10259
  const Py_ssize_t kwd_pos_args = __pyx_nargs;
9939
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_smart_task_factory") < 0)) __PYX_ERR(0, 546, __pyx_L3_error)
10260
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_smart_task_factory") < 0)) __PYX_ERR(0, 562, __pyx_L3_error)
9940
10261
  }
9941
10262
  } else {
9942
10263
  switch (__pyx_nargs) {
@@ -9950,7 +10271,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
9950
10271
  }
9951
10272
  goto __pyx_L6_skip;
9952
10273
  __pyx_L5_argtuple_error:;
9953
- __Pyx_RaiseArgtupleInvalid("set_smart_task_factory", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 546, __pyx_L3_error)
10274
+ __Pyx_RaiseArgtupleInvalid("set_smart_task_factory", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 562, __pyx_L3_error)
9954
10275
  __pyx_L6_skip:;
9955
10276
  goto __pyx_L4_argument_unpacking_done;
9956
10277
  __pyx_L3_error:;
@@ -9991,46 +10312,46 @@ static PyObject *__pyx_pf_6a_sync_6_smart_4set_smart_task_factory(CYTHON_UNUSED
9991
10312
  int __pyx_lineno = 0;
9992
10313
  const char *__pyx_filename = NULL;
9993
10314
  int __pyx_clineno = 0;
9994
- __Pyx_TraceFrameInit(__pyx_codeobj__18)
10315
+ __Pyx_TraceFrameInit(__pyx_codeobj__19)
9995
10316
  __Pyx_RefNannySetupContext("set_smart_task_factory", 0);
9996
- __Pyx_TraceCall("set_smart_task_factory", __pyx_f[0], 546, 0, __PYX_ERR(0, 546, __pyx_L1_error));
10317
+ __Pyx_TraceCall("set_smart_task_factory", __pyx_f[0], 562, 0, __PYX_ERR(0, 562, __pyx_L1_error));
9997
10318
  __Pyx_INCREF(__pyx_v_loop);
9998
10319
 
9999
- /* "a_sync/_smart.pyx":563
10320
+ /* "a_sync/_smart.pyx":579
10000
10321
  * - :func:`smart_task_factory`
10001
10322
  * """
10002
10323
  * if loop is None: # <<<<<<<<<<<<<<
10003
10324
  * import a_sync.asyncio
10004
10325
  * loop = a_sync.asyncio.get_event_loop()
10005
10326
  */
10006
- __Pyx_TraceLine(563,0,__PYX_ERR(0, 563, __pyx_L1_error))
10327
+ __Pyx_TraceLine(579,0,__PYX_ERR(0, 579, __pyx_L1_error))
10007
10328
  __pyx_t_1 = (__pyx_v_loop == Py_None);
10008
10329
  if (__pyx_t_1) {
10009
10330
 
10010
- /* "a_sync/_smart.pyx":564
10331
+ /* "a_sync/_smart.pyx":580
10011
10332
  * """
10012
10333
  * if loop is None:
10013
10334
  * import a_sync.asyncio # <<<<<<<<<<<<<<
10014
10335
  * loop = a_sync.asyncio.get_event_loop()
10015
10336
  * loop.set_task_factory(smart_task_factory)
10016
10337
  */
10017
- __Pyx_TraceLine(564,0,__PYX_ERR(0, 564, __pyx_L1_error))
10018
- __pyx_t_2 = __Pyx_Import(__pyx_n_s_a_sync_asyncio, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 564, __pyx_L1_error)
10338
+ __Pyx_TraceLine(580,0,__PYX_ERR(0, 580, __pyx_L1_error))
10339
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_a_sync_asyncio, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 580, __pyx_L1_error)
10019
10340
  __Pyx_GOTREF(__pyx_t_2);
10020
10341
  __pyx_v_a_sync = __pyx_t_2;
10021
10342
  __pyx_t_2 = 0;
10022
10343
 
10023
- /* "a_sync/_smart.pyx":565
10344
+ /* "a_sync/_smart.pyx":581
10024
10345
  * if loop is None:
10025
10346
  * import a_sync.asyncio
10026
10347
  * loop = a_sync.asyncio.get_event_loop() # <<<<<<<<<<<<<<
10027
10348
  * loop.set_task_factory(smart_task_factory)
10028
10349
  *
10029
10350
  */
10030
- __Pyx_TraceLine(565,0,__PYX_ERR(0, 565, __pyx_L1_error))
10031
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_a_sync, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
10351
+ __Pyx_TraceLine(581,0,__PYX_ERR(0, 581, __pyx_L1_error))
10352
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_a_sync, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 581, __pyx_L1_error)
10032
10353
  __Pyx_GOTREF(__pyx_t_3);
10033
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get_event_loop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 565, __pyx_L1_error)
10354
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get_event_loop); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L1_error)
10034
10355
  __Pyx_GOTREF(__pyx_t_4);
10035
10356
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10036
10357
  __pyx_t_3 = NULL;
@@ -10051,14 +10372,14 @@ static PyObject *__pyx_pf_6a_sync_6_smart_4set_smart_task_factory(CYTHON_UNUSED
10051
10372
  PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
10052
10373
  __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
10053
10374
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10054
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error)
10375
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error)
10055
10376
  __Pyx_GOTREF(__pyx_t_2);
10056
10377
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10057
10378
  }
10058
10379
  __Pyx_DECREF_SET(__pyx_v_loop, __pyx_t_2);
10059
10380
  __pyx_t_2 = 0;
10060
10381
 
10061
- /* "a_sync/_smart.pyx":563
10382
+ /* "a_sync/_smart.pyx":579
10062
10383
  * - :func:`smart_task_factory`
10063
10384
  * """
10064
10385
  * if loop is None: # <<<<<<<<<<<<<<
@@ -10067,17 +10388,17 @@ static PyObject *__pyx_pf_6a_sync_6_smart_4set_smart_task_factory(CYTHON_UNUSED
10067
10388
  */
10068
10389
  }
10069
10390
 
10070
- /* "a_sync/_smart.pyx":566
10391
+ /* "a_sync/_smart.pyx":582
10071
10392
  * import a_sync.asyncio
10072
10393
  * loop = a_sync.asyncio.get_event_loop()
10073
10394
  * loop.set_task_factory(smart_task_factory) # <<<<<<<<<<<<<<
10074
10395
  *
10075
10396
  *
10076
10397
  */
10077
- __Pyx_TraceLine(566,0,__PYX_ERR(0, 566, __pyx_L1_error))
10078
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_loop, __pyx_n_s_set_task_factory); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 566, __pyx_L1_error)
10398
+ __Pyx_TraceLine(582,0,__PYX_ERR(0, 582, __pyx_L1_error))
10399
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_loop, __pyx_n_s_set_task_factory); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error)
10079
10400
  __Pyx_GOTREF(__pyx_t_4);
10080
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_smart_task_factory); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 566, __pyx_L1_error)
10401
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_smart_task_factory); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 582, __pyx_L1_error)
10081
10402
  __Pyx_GOTREF(__pyx_t_3);
10082
10403
  __pyx_t_6 = NULL;
10083
10404
  __pyx_t_5 = 0;
@@ -10098,13 +10419,13 @@ static PyObject *__pyx_pf_6a_sync_6_smart_4set_smart_task_factory(CYTHON_UNUSED
10098
10419
  __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
10099
10420
  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
10100
10421
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10101
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error)
10422
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error)
10102
10423
  __Pyx_GOTREF(__pyx_t_2);
10103
10424
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10104
10425
  }
10105
10426
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10106
10427
 
10107
- /* "a_sync/_smart.pyx":546
10428
+ /* "a_sync/_smart.pyx":562
10108
10429
  *
10109
10430
  *
10110
10431
  * def set_smart_task_factory(loop: AbstractEventLoop = None) -> None: # <<<<<<<<<<<<<<
@@ -10131,7 +10452,7 @@ static PyObject *__pyx_pf_6a_sync_6_smart_4set_smart_task_factory(CYTHON_UNUSED
10131
10452
  return __pyx_r;
10132
10453
  }
10133
10454
 
10134
- /* "a_sync/_smart.pyx":569
10455
+ /* "a_sync/_smart.pyx":585
10135
10456
  *
10136
10457
  *
10137
10458
  * cpdef object shield(arg: Awaitable[T]): # <<<<<<<<<<<<<<
@@ -10164,18 +10485,18 @@ static PyObject *__pyx_f_6a_sync_6_smart_shield(PyObject *__pyx_v_arg, CYTHON_UN
10164
10485
  int __pyx_lineno = 0;
10165
10486
  const char *__pyx_filename = NULL;
10166
10487
  int __pyx_clineno = 0;
10167
- __Pyx_TraceFrameInit(__pyx_codeobj__20)
10488
+ __Pyx_TraceFrameInit(__pyx_codeobj__21)
10168
10489
  __Pyx_RefNannySetupContext("shield", 1);
10169
- __Pyx_TraceCall("shield", __pyx_f[0], 569, 0, __PYX_ERR(0, 569, __pyx_L1_error));
10490
+ __Pyx_TraceCall("shield", __pyx_f[0], 585, 0, __PYX_ERR(0, 585, __pyx_L1_error));
10170
10491
 
10171
- /* "a_sync/_smart.pyx":613
10492
+ /* "a_sync/_smart.pyx":629
10172
10493
  * - :func:`asyncio.shield`
10173
10494
  * """
10174
10495
  * inner = ensure_future(arg) # <<<<<<<<<<<<<<
10175
10496
  * if _is_done(inner):
10176
10497
  * # Shortcut.
10177
10498
  */
10178
- __Pyx_TraceLine(613,0,__PYX_ERR(0, 613, __pyx_L1_error))
10499
+ __Pyx_TraceLine(629,0,__PYX_ERR(0, 629, __pyx_L1_error))
10179
10500
  __Pyx_INCREF(__pyx_v_6a_sync_6_smart_ensure_future);
10180
10501
  __pyx_t_2 = __pyx_v_6a_sync_6_smart_ensure_future; __pyx_t_3 = NULL;
10181
10502
  __pyx_t_4 = 0;
@@ -10195,38 +10516,38 @@ static PyObject *__pyx_f_6a_sync_6_smart_shield(PyObject *__pyx_v_arg, CYTHON_UN
10195
10516
  PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_arg};
10196
10517
  __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
10197
10518
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10198
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error)
10519
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error)
10199
10520
  __Pyx_GOTREF(__pyx_t_1);
10200
10521
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10201
10522
  }
10202
10523
  __pyx_v_inner = __pyx_t_1;
10203
10524
  __pyx_t_1 = 0;
10204
10525
 
10205
- /* "a_sync/_smart.pyx":614
10526
+ /* "a_sync/_smart.pyx":630
10206
10527
  * """
10207
10528
  * inner = ensure_future(arg)
10208
10529
  * if _is_done(inner): # <<<<<<<<<<<<<<
10209
10530
  * # Shortcut.
10210
10531
  * return inner
10211
10532
  */
10212
- __Pyx_TraceLine(614,0,__PYX_ERR(0, 614, __pyx_L1_error))
10213
- __pyx_t_5 = __pyx_f_6a_sync_6_smart__is_done(__pyx_v_inner); if (unlikely(__pyx_t_5 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 614, __pyx_L1_error)
10533
+ __Pyx_TraceLine(630,0,__PYX_ERR(0, 630, __pyx_L1_error))
10534
+ __pyx_t_5 = __pyx_f_6a_sync_6_smart__is_done(__pyx_v_inner); if (unlikely(__pyx_t_5 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 630, __pyx_L1_error)
10214
10535
  if (__pyx_t_5) {
10215
10536
 
10216
- /* "a_sync/_smart.pyx":616
10537
+ /* "a_sync/_smart.pyx":632
10217
10538
  * if _is_done(inner):
10218
10539
  * # Shortcut.
10219
10540
  * return inner # <<<<<<<<<<<<<<
10220
10541
  *
10221
10542
  * loop = _get_loop(inner)
10222
10543
  */
10223
- __Pyx_TraceLine(616,0,__PYX_ERR(0, 616, __pyx_L1_error))
10544
+ __Pyx_TraceLine(632,0,__PYX_ERR(0, 632, __pyx_L1_error))
10224
10545
  __Pyx_XDECREF(__pyx_r);
10225
10546
  __Pyx_INCREF(__pyx_v_inner);
10226
10547
  __pyx_r = __pyx_v_inner;
10227
10548
  goto __pyx_L0;
10228
10549
 
10229
- /* "a_sync/_smart.pyx":614
10550
+ /* "a_sync/_smart.pyx":630
10230
10551
  * """
10231
10552
  * inner = ensure_future(arg)
10232
10553
  * if _is_done(inner): # <<<<<<<<<<<<<<
@@ -10235,14 +10556,14 @@ static PyObject *__pyx_f_6a_sync_6_smart_shield(PyObject *__pyx_v_arg, CYTHON_UN
10235
10556
  */
10236
10557
  }
10237
10558
 
10238
- /* "a_sync/_smart.pyx":618
10559
+ /* "a_sync/_smart.pyx":634
10239
10560
  * return inner
10240
10561
  *
10241
10562
  * loop = _get_loop(inner) # <<<<<<<<<<<<<<
10242
10563
  * outer = _SmartFuture(loop=loop)
10243
10564
  *
10244
10565
  */
10245
- __Pyx_TraceLine(618,0,__PYX_ERR(0, 618, __pyx_L1_error))
10566
+ __Pyx_TraceLine(634,0,__PYX_ERR(0, 634, __pyx_L1_error))
10246
10567
  __Pyx_INCREF(__pyx_v_6a_sync_6_smart__get_loop);
10247
10568
  __pyx_t_2 = __pyx_v_6a_sync_6_smart__get_loop; __pyx_t_3 = NULL;
10248
10569
  __pyx_t_4 = 0;
@@ -10262,39 +10583,39 @@ static PyObject *__pyx_f_6a_sync_6_smart_shield(PyObject *__pyx_v_arg, CYTHON_UN
10262
10583
  PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_inner};
10263
10584
  __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
10264
10585
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10265
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error)
10586
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
10266
10587
  __Pyx_GOTREF(__pyx_t_1);
10267
10588
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10268
10589
  }
10269
10590
  __pyx_v_loop = __pyx_t_1;
10270
10591
  __pyx_t_1 = 0;
10271
10592
 
10272
- /* "a_sync/_smart.pyx":619
10593
+ /* "a_sync/_smart.pyx":635
10273
10594
  *
10274
10595
  * loop = _get_loop(inner)
10275
10596
  * outer = _SmartFuture(loop=loop) # <<<<<<<<<<<<<<
10276
10597
  *
10277
10598
  * # special handling to connect SmartFutures to SmartTasks if enabled
10278
10599
  */
10279
- __Pyx_TraceLine(619,0,__PYX_ERR(0, 619, __pyx_L1_error))
10280
- __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error)
10600
+ __Pyx_TraceLine(635,0,__PYX_ERR(0, 635, __pyx_L1_error))
10601
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error)
10281
10602
  __Pyx_GOTREF(__pyx_t_1);
10282
- if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_loop, __pyx_v_loop) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
10283
- __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_6a_sync_6_smart__SmartFuture, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error)
10603
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_loop, __pyx_v_loop) < 0) __PYX_ERR(0, 635, __pyx_L1_error)
10604
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_6a_sync_6_smart__SmartFuture, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error)
10284
10605
  __Pyx_GOTREF(__pyx_t_2);
10285
10606
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10286
10607
  __pyx_v_outer = __pyx_t_2;
10287
10608
  __pyx_t_2 = 0;
10288
10609
 
10289
- /* "a_sync/_smart.pyx":622
10610
+ /* "a_sync/_smart.pyx":638
10290
10611
  *
10291
10612
  * # special handling to connect SmartFutures to SmartTasks if enabled
10292
10613
  * if (waiters := getattr(inner, "_waiters", None)) is not None: # <<<<<<<<<<<<<<
10293
10614
  * waiters.add(outer)
10294
10615
  *
10295
10616
  */
10296
- __Pyx_TraceLine(622,0,__PYX_ERR(0, 622, __pyx_L1_error))
10297
- __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_inner, __pyx_n_u_waiters, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error)
10617
+ __Pyx_TraceLine(638,0,__PYX_ERR(0, 638, __pyx_L1_error))
10618
+ __pyx_t_2 = __Pyx_GetAttr3(__pyx_v_inner, __pyx_n_u_waiters, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error)
10298
10619
  __Pyx_GOTREF(__pyx_t_2);
10299
10620
  __pyx_v_waiters = __pyx_t_2;
10300
10621
  __Pyx_INCREF(__pyx_t_2);
@@ -10302,15 +10623,15 @@ static PyObject *__pyx_f_6a_sync_6_smart_shield(PyObject *__pyx_v_arg, CYTHON_UN
10302
10623
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10303
10624
  if (__pyx_t_5) {
10304
10625
 
10305
- /* "a_sync/_smart.pyx":623
10626
+ /* "a_sync/_smart.pyx":639
10306
10627
  * # special handling to connect SmartFutures to SmartTasks if enabled
10307
10628
  * if (waiters := getattr(inner, "_waiters", None)) is not None:
10308
10629
  * waiters.add(outer) # <<<<<<<<<<<<<<
10309
10630
  *
10310
10631
  * _inner_done_callback, _outer_done_callback = _get_done_callbacks(inner, outer)
10311
10632
  */
10312
- __Pyx_TraceLine(623,0,__PYX_ERR(0, 623, __pyx_L1_error))
10313
- __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiters, __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 623, __pyx_L1_error)
10633
+ __Pyx_TraceLine(639,0,__PYX_ERR(0, 639, __pyx_L1_error))
10634
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_waiters, __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error)
10314
10635
  __Pyx_GOTREF(__pyx_t_1);
10315
10636
  __pyx_t_3 = NULL;
10316
10637
  __pyx_t_4 = 0;
@@ -10330,13 +10651,13 @@ static PyObject *__pyx_f_6a_sync_6_smart_shield(PyObject *__pyx_v_arg, CYTHON_UN
10330
10651
  PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_outer};
10331
10652
  __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
10332
10653
  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
10333
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 623, __pyx_L1_error)
10654
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error)
10334
10655
  __Pyx_GOTREF(__pyx_t_2);
10335
10656
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10336
10657
  }
10337
10658
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10338
10659
 
10339
- /* "a_sync/_smart.pyx":622
10660
+ /* "a_sync/_smart.pyx":638
10340
10661
  *
10341
10662
  * # special handling to connect SmartFutures to SmartTasks if enabled
10342
10663
  * if (waiters := getattr(inner, "_waiters", None)) is not None: # <<<<<<<<<<<<<<
@@ -10345,15 +10666,15 @@ static PyObject *__pyx_f_6a_sync_6_smart_shield(PyObject *__pyx_v_arg, CYTHON_UN
10345
10666
  */
10346
10667
  }
10347
10668
 
10348
- /* "a_sync/_smart.pyx":625
10669
+ /* "a_sync/_smart.pyx":641
10349
10670
  * waiters.add(outer)
10350
10671
  *
10351
10672
  * _inner_done_callback, _outer_done_callback = _get_done_callbacks(inner, outer) # <<<<<<<<<<<<<<
10352
10673
  *
10353
10674
  * inner.add_done_callback(_inner_done_callback)
10354
10675
  */
10355
- __Pyx_TraceLine(625,0,__PYX_ERR(0, 625, __pyx_L1_error))
10356
- __pyx_t_2 = __pyx_f_6a_sync_6_smart__get_done_callbacks(__pyx_v_inner, __pyx_v_outer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error)
10676
+ __Pyx_TraceLine(641,0,__PYX_ERR(0, 641, __pyx_L1_error))
10677
+ __pyx_t_2 = __pyx_f_6a_sync_6_smart__get_done_callbacks(__pyx_v_inner, __pyx_v_outer); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error)
10357
10678
  __Pyx_GOTREF(__pyx_t_2);
10358
10679
  if (likely(__pyx_t_2 != Py_None)) {
10359
10680
  PyObject* sequence = __pyx_t_2;
@@ -10361,7 +10682,7 @@ static PyObject *__pyx_f_6a_sync_6_smart_shield(PyObject *__pyx_v_arg, CYTHON_UN
10361
10682
  if (unlikely(size != 2)) {
10362
10683
  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
10363
10684
  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
10364
- __PYX_ERR(0, 625, __pyx_L1_error)
10685
+ __PYX_ERR(0, 641, __pyx_L1_error)
10365
10686
  }
10366
10687
  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
10367
10688
  __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
@@ -10369,29 +10690,29 @@ static PyObject *__pyx_f_6a_sync_6_smart_shield(PyObject *__pyx_v_arg, CYTHON_UN
10369
10690
  __Pyx_INCREF(__pyx_t_1);
10370
10691
  __Pyx_INCREF(__pyx_t_3);
10371
10692
  #else
10372
- __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error)
10693
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error)
10373
10694
  __Pyx_GOTREF(__pyx_t_1);
10374
- __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 625, __pyx_L1_error)
10695
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error)
10375
10696
  __Pyx_GOTREF(__pyx_t_3);
10376
10697
  #endif
10377
10698
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10378
10699
  } else {
10379
- __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 625, __pyx_L1_error)
10700
+ __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 641, __pyx_L1_error)
10380
10701
  }
10381
10702
  __pyx_v__inner_done_callback = __pyx_t_1;
10382
10703
  __pyx_t_1 = 0;
10383
10704
  __pyx_v__outer_done_callback = __pyx_t_3;
10384
10705
  __pyx_t_3 = 0;
10385
10706
 
10386
- /* "a_sync/_smart.pyx":627
10707
+ /* "a_sync/_smart.pyx":643
10387
10708
  * _inner_done_callback, _outer_done_callback = _get_done_callbacks(inner, outer)
10388
10709
  *
10389
10710
  * inner.add_done_callback(_inner_done_callback) # <<<<<<<<<<<<<<
10390
10711
  * outer.add_done_callback(_outer_done_callback)
10391
10712
  * return outer
10392
10713
  */
10393
- __Pyx_TraceLine(627,0,__PYX_ERR(0, 627, __pyx_L1_error))
10394
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_inner, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 627, __pyx_L1_error)
10714
+ __Pyx_TraceLine(643,0,__PYX_ERR(0, 643, __pyx_L1_error))
10715
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_inner, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 643, __pyx_L1_error)
10395
10716
  __Pyx_GOTREF(__pyx_t_3);
10396
10717
  __pyx_t_1 = NULL;
10397
10718
  __pyx_t_4 = 0;
@@ -10411,21 +10732,21 @@ static PyObject *__pyx_f_6a_sync_6_smart_shield(PyObject *__pyx_v_arg, CYTHON_UN
10411
10732
  PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v__inner_done_callback};
10412
10733
  __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
10413
10734
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10414
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error)
10735
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 643, __pyx_L1_error)
10415
10736
  __Pyx_GOTREF(__pyx_t_2);
10416
10737
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10417
10738
  }
10418
10739
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10419
10740
 
10420
- /* "a_sync/_smart.pyx":628
10741
+ /* "a_sync/_smart.pyx":644
10421
10742
  *
10422
10743
  * inner.add_done_callback(_inner_done_callback)
10423
10744
  * outer.add_done_callback(_outer_done_callback) # <<<<<<<<<<<<<<
10424
10745
  * return outer
10425
10746
  *
10426
10747
  */
10427
- __Pyx_TraceLine(628,0,__PYX_ERR(0, 628, __pyx_L1_error))
10428
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_outer, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 628, __pyx_L1_error)
10748
+ __Pyx_TraceLine(644,0,__PYX_ERR(0, 644, __pyx_L1_error))
10749
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_outer, __pyx_n_s_add_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 644, __pyx_L1_error)
10429
10750
  __Pyx_GOTREF(__pyx_t_3);
10430
10751
  __pyx_t_1 = NULL;
10431
10752
  __pyx_t_4 = 0;
@@ -10445,26 +10766,26 @@ static PyObject *__pyx_f_6a_sync_6_smart_shield(PyObject *__pyx_v_arg, CYTHON_UN
10445
10766
  PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v__outer_done_callback};
10446
10767
  __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
10447
10768
  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
10448
- if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 628, __pyx_L1_error)
10769
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error)
10449
10770
  __Pyx_GOTREF(__pyx_t_2);
10450
10771
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
10451
10772
  }
10452
10773
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
10453
10774
 
10454
- /* "a_sync/_smart.pyx":629
10775
+ /* "a_sync/_smart.pyx":645
10455
10776
  * inner.add_done_callback(_inner_done_callback)
10456
10777
  * outer.add_done_callback(_outer_done_callback)
10457
10778
  * return outer # <<<<<<<<<<<<<<
10458
10779
  *
10459
10780
  *
10460
10781
  */
10461
- __Pyx_TraceLine(629,0,__PYX_ERR(0, 629, __pyx_L1_error))
10782
+ __Pyx_TraceLine(645,0,__PYX_ERR(0, 645, __pyx_L1_error))
10462
10783
  __Pyx_XDECREF(__pyx_r);
10463
10784
  __Pyx_INCREF(__pyx_v_outer);
10464
10785
  __pyx_r = __pyx_v_outer;
10465
10786
  goto __pyx_L0;
10466
10787
 
10467
- /* "a_sync/_smart.pyx":569
10788
+ /* "a_sync/_smart.pyx":585
10468
10789
  *
10469
10790
  *
10470
10791
  * cpdef object shield(arg: Awaitable[T]): # <<<<<<<<<<<<<<
@@ -10546,12 +10867,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
10546
10867
  (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
10547
10868
  kw_args--;
10548
10869
  }
10549
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 569, __pyx_L3_error)
10870
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 585, __pyx_L3_error)
10550
10871
  else goto __pyx_L5_argtuple_error;
10551
10872
  }
10552
10873
  if (unlikely(kw_args > 0)) {
10553
10874
  const Py_ssize_t kwd_pos_args = __pyx_nargs;
10554
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "shield") < 0)) __PYX_ERR(0, 569, __pyx_L3_error)
10875
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "shield") < 0)) __PYX_ERR(0, 585, __pyx_L3_error)
10555
10876
  }
10556
10877
  } else if (unlikely(__pyx_nargs != 1)) {
10557
10878
  goto __pyx_L5_argtuple_error;
@@ -10562,7 +10883,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
10562
10883
  }
10563
10884
  goto __pyx_L6_skip;
10564
10885
  __pyx_L5_argtuple_error:;
10565
- __Pyx_RaiseArgtupleInvalid("shield", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 569, __pyx_L3_error)
10886
+ __Pyx_RaiseArgtupleInvalid("shield", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 585, __pyx_L3_error)
10566
10887
  __pyx_L6_skip:;
10567
10888
  goto __pyx_L4_argument_unpacking_done;
10568
10889
  __pyx_L3_error:;
@@ -10597,11 +10918,11 @@ static PyObject *__pyx_pf_6a_sync_6_smart_6shield(CYTHON_UNUSED PyObject *__pyx_
10597
10918
  int __pyx_lineno = 0;
10598
10919
  const char *__pyx_filename = NULL;
10599
10920
  int __pyx_clineno = 0;
10600
- __Pyx_TraceFrameInit(__pyx_codeobj__20)
10921
+ __Pyx_TraceFrameInit(__pyx_codeobj__21)
10601
10922
  __Pyx_RefNannySetupContext("shield", 1);
10602
- __Pyx_TraceCall("shield (wrapper)", __pyx_f[0], 569, 0, __PYX_ERR(0, 569, __pyx_L1_error));
10923
+ __Pyx_TraceCall("shield (wrapper)", __pyx_f[0], 585, 0, __PYX_ERR(0, 585, __pyx_L1_error));
10603
10924
  __Pyx_XDECREF(__pyx_r);
10604
- __pyx_t_1 = __pyx_f_6a_sync_6_smart_shield(__pyx_v_arg, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 569, __pyx_L1_error)
10925
+ __pyx_t_1 = __pyx_f_6a_sync_6_smart_shield(__pyx_v_arg, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error)
10605
10926
  __Pyx_GOTREF(__pyx_t_1);
10606
10927
  __pyx_r = __pyx_t_1;
10607
10928
  __pyx_t_1 = 0;
@@ -10619,7 +10940,7 @@ static PyObject *__pyx_pf_6a_sync_6_smart_6shield(CYTHON_UNUSED PyObject *__pyx_
10619
10940
  return __pyx_r;
10620
10941
  }
10621
10942
 
10622
- /* "a_sync/_smart.pyx":634
10943
+ /* "a_sync/_smart.pyx":650
10623
10944
  * cdef tuple _get_done_callbacks(inner: Task, outer: Future):
10624
10945
  *
10625
10946
  * def _inner_done_callback(inner): # <<<<<<<<<<<<<<
@@ -10680,12 +11001,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
10680
11001
  (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
10681
11002
  kw_args--;
10682
11003
  }
10683
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 634, __pyx_L3_error)
11004
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 650, __pyx_L3_error)
10684
11005
  else goto __pyx_L5_argtuple_error;
10685
11006
  }
10686
11007
  if (unlikely(kw_args > 0)) {
10687
11008
  const Py_ssize_t kwd_pos_args = __pyx_nargs;
10688
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_inner_done_callback") < 0)) __PYX_ERR(0, 634, __pyx_L3_error)
11009
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_inner_done_callback") < 0)) __PYX_ERR(0, 650, __pyx_L3_error)
10689
11010
  }
10690
11011
  } else if (unlikely(__pyx_nargs != 1)) {
10691
11012
  goto __pyx_L5_argtuple_error;
@@ -10696,7 +11017,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
10696
11017
  }
10697
11018
  goto __pyx_L6_skip;
10698
11019
  __pyx_L5_argtuple_error:;
10699
- __Pyx_RaiseArgtupleInvalid("_inner_done_callback", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 634, __pyx_L3_error)
11020
+ __Pyx_RaiseArgtupleInvalid("_inner_done_callback", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 650, __pyx_L3_error)
10700
11021
  __pyx_L6_skip:;
10701
11022
  goto __pyx_L4_argument_unpacking_done;
10702
11023
  __pyx_L3_error:;
@@ -10743,46 +11064,46 @@ static PyObject *__pyx_pf_6a_sync_6_smart_19_get_done_callbacks__inner_done_call
10743
11064
  __Pyx_RefNannySetupContext("_inner_done_callback", 1);
10744
11065
  __pyx_outer_scope = (struct __pyx_obj_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks *) __Pyx_CyFunction_GetClosure(__pyx_self);
10745
11066
  __pyx_cur_scope = __pyx_outer_scope;
10746
- __Pyx_TraceCall("_inner_done_callback", __pyx_f[0], 634, 0, __PYX_ERR(0, 634, __pyx_L1_error));
11067
+ __Pyx_TraceCall("_inner_done_callback", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
10747
11068
 
10748
- /* "a_sync/_smart.pyx":635
11069
+ /* "a_sync/_smart.pyx":651
10749
11070
  *
10750
11071
  * def _inner_done_callback(inner):
10751
11072
  * if _is_cancelled(outer): # <<<<<<<<<<<<<<
10752
11073
  * if not _is_cancelled(inner):
10753
11074
  * # Mark inner's result as retrieved.
10754
11075
  */
10755
- __Pyx_TraceLine(635,0,__PYX_ERR(0, 635, __pyx_L1_error))
10756
- if (unlikely(!__pyx_cur_scope->__pyx_v_outer)) { __Pyx_RaiseClosureNameError("outer"); __PYX_ERR(0, 635, __pyx_L1_error) }
11076
+ __Pyx_TraceLine(651,0,__PYX_ERR(0, 651, __pyx_L1_error))
11077
+ if (unlikely(!__pyx_cur_scope->__pyx_v_outer)) { __Pyx_RaiseClosureNameError("outer"); __PYX_ERR(0, 651, __pyx_L1_error) }
10757
11078
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_outer;
10758
11079
  __Pyx_INCREF(__pyx_t_1);
10759
- __pyx_t_2 = __pyx_f_6a_sync_6_smart__is_cancelled(__pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 635, __pyx_L1_error)
11080
+ __pyx_t_2 = __pyx_f_6a_sync_6_smart__is_cancelled(__pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 651, __pyx_L1_error)
10760
11081
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10761
11082
  if (__pyx_t_2) {
10762
11083
 
10763
- /* "a_sync/_smart.pyx":636
11084
+ /* "a_sync/_smart.pyx":652
10764
11085
  * def _inner_done_callback(inner):
10765
11086
  * if _is_cancelled(outer):
10766
11087
  * if not _is_cancelled(inner): # <<<<<<<<<<<<<<
10767
11088
  * # Mark inner's result as retrieved.
10768
11089
  * inner._Future__log_traceback = False
10769
11090
  */
10770
- __Pyx_TraceLine(636,0,__PYX_ERR(0, 636, __pyx_L1_error))
10771
- __pyx_t_2 = __pyx_f_6a_sync_6_smart__is_cancelled(__pyx_v_inner); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 636, __pyx_L1_error)
11091
+ __Pyx_TraceLine(652,0,__PYX_ERR(0, 652, __pyx_L1_error))
11092
+ __pyx_t_2 = __pyx_f_6a_sync_6_smart__is_cancelled(__pyx_v_inner); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 652, __pyx_L1_error)
10772
11093
  __pyx_t_3 = (!__pyx_t_2);
10773
11094
  if (__pyx_t_3) {
10774
11095
 
10775
- /* "a_sync/_smart.pyx":638
11096
+ /* "a_sync/_smart.pyx":654
10776
11097
  * if not _is_cancelled(inner):
10777
11098
  * # Mark inner's result as retrieved.
10778
11099
  * inner._Future__log_traceback = False # <<<<<<<<<<<<<<
10779
11100
  * return
10780
11101
  *
10781
11102
  */
10782
- __Pyx_TraceLine(638,0,__PYX_ERR(0, 638, __pyx_L1_error))
10783
- if (__Pyx_PyObject_SetAttrStr(__pyx_v_inner, __pyx_n_s_Future__log_traceback, Py_False) < 0) __PYX_ERR(0, 638, __pyx_L1_error)
11103
+ __Pyx_TraceLine(654,0,__PYX_ERR(0, 654, __pyx_L1_error))
11104
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_inner, __pyx_n_s_Future__log_traceback, Py_False) < 0) __PYX_ERR(0, 654, __pyx_L1_error)
10784
11105
 
10785
- /* "a_sync/_smart.pyx":636
11106
+ /* "a_sync/_smart.pyx":652
10786
11107
  * def _inner_done_callback(inner):
10787
11108
  * if _is_cancelled(outer):
10788
11109
  * if not _is_cancelled(inner): # <<<<<<<<<<<<<<
@@ -10791,19 +11112,19 @@ static PyObject *__pyx_pf_6a_sync_6_smart_19_get_done_callbacks__inner_done_call
10791
11112
  */
10792
11113
  }
10793
11114
 
10794
- /* "a_sync/_smart.pyx":639
11115
+ /* "a_sync/_smart.pyx":655
10795
11116
  * # Mark inner's result as retrieved.
10796
11117
  * inner._Future__log_traceback = False
10797
11118
  * return # <<<<<<<<<<<<<<
10798
11119
  *
10799
11120
  * if _is_cancelled(inner):
10800
11121
  */
10801
- __Pyx_TraceLine(639,0,__PYX_ERR(0, 639, __pyx_L1_error))
11122
+ __Pyx_TraceLine(655,0,__PYX_ERR(0, 655, __pyx_L1_error))
10802
11123
  __Pyx_XDECREF(__pyx_r);
10803
11124
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
10804
11125
  goto __pyx_L0;
10805
11126
 
10806
- /* "a_sync/_smart.pyx":635
11127
+ /* "a_sync/_smart.pyx":651
10807
11128
  *
10808
11129
  * def _inner_done_callback(inner):
10809
11130
  * if _is_cancelled(outer): # <<<<<<<<<<<<<<
@@ -10812,27 +11133,27 @@ static PyObject *__pyx_pf_6a_sync_6_smart_19_get_done_callbacks__inner_done_call
10812
11133
  */
10813
11134
  }
10814
11135
 
10815
- /* "a_sync/_smart.pyx":641
11136
+ /* "a_sync/_smart.pyx":657
10816
11137
  * return
10817
11138
  *
10818
11139
  * if _is_cancelled(inner): # <<<<<<<<<<<<<<
10819
11140
  * outer.cancel()
10820
11141
  * else:
10821
11142
  */
10822
- __Pyx_TraceLine(641,0,__PYX_ERR(0, 641, __pyx_L1_error))
10823
- __pyx_t_3 = __pyx_f_6a_sync_6_smart__is_cancelled(__pyx_v_inner); if (unlikely(__pyx_t_3 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 641, __pyx_L1_error)
11143
+ __Pyx_TraceLine(657,0,__PYX_ERR(0, 657, __pyx_L1_error))
11144
+ __pyx_t_3 = __pyx_f_6a_sync_6_smart__is_cancelled(__pyx_v_inner); if (unlikely(__pyx_t_3 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 657, __pyx_L1_error)
10824
11145
  if (__pyx_t_3) {
10825
11146
 
10826
- /* "a_sync/_smart.pyx":642
11147
+ /* "a_sync/_smart.pyx":658
10827
11148
  *
10828
11149
  * if _is_cancelled(inner):
10829
11150
  * outer.cancel() # <<<<<<<<<<<<<<
10830
11151
  * else:
10831
11152
  * exc = _get_exception(inner)
10832
11153
  */
10833
- __Pyx_TraceLine(642,0,__PYX_ERR(0, 642, __pyx_L1_error))
10834
- if (unlikely(!__pyx_cur_scope->__pyx_v_outer)) { __Pyx_RaiseClosureNameError("outer"); __PYX_ERR(0, 642, __pyx_L1_error) }
10835
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_outer, __pyx_n_s_cancel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 642, __pyx_L1_error)
11154
+ __Pyx_TraceLine(658,0,__PYX_ERR(0, 658, __pyx_L1_error))
11155
+ if (unlikely(!__pyx_cur_scope->__pyx_v_outer)) { __Pyx_RaiseClosureNameError("outer"); __PYX_ERR(0, 658, __pyx_L1_error) }
11156
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_outer, __pyx_n_s_cancel); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 658, __pyx_L1_error)
10836
11157
  __Pyx_GOTREF(__pyx_t_4);
10837
11158
  __pyx_t_5 = NULL;
10838
11159
  __pyx_t_6 = 0;
@@ -10852,13 +11173,13 @@ static PyObject *__pyx_pf_6a_sync_6_smart_19_get_done_callbacks__inner_done_call
10852
11173
  PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
10853
11174
  __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 0+__pyx_t_6);
10854
11175
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10855
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
11176
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error)
10856
11177
  __Pyx_GOTREF(__pyx_t_1);
10857
11178
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10858
11179
  }
10859
11180
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10860
11181
 
10861
- /* "a_sync/_smart.pyx":641
11182
+ /* "a_sync/_smart.pyx":657
10862
11183
  * return
10863
11184
  *
10864
11185
  * if _is_cancelled(inner): # <<<<<<<<<<<<<<
@@ -10868,41 +11189,41 @@ static PyObject *__pyx_pf_6a_sync_6_smart_19_get_done_callbacks__inner_done_call
10868
11189
  goto __pyx_L5;
10869
11190
  }
10870
11191
 
10871
- /* "a_sync/_smart.pyx":644
11192
+ /* "a_sync/_smart.pyx":660
10872
11193
  * outer.cancel()
10873
11194
  * else:
10874
11195
  * exc = _get_exception(inner) # <<<<<<<<<<<<<<
10875
11196
  * if exc is not None:
10876
11197
  * outer.set_exception(exc)
10877
11198
  */
10878
- __Pyx_TraceLine(644,0,__PYX_ERR(0, 644, __pyx_L1_error))
11199
+ __Pyx_TraceLine(660,0,__PYX_ERR(0, 660, __pyx_L1_error))
10879
11200
  /*else*/ {
10880
- __pyx_t_1 = __pyx_f_6a_sync_6_smart__get_exception(__pyx_v_inner); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error)
11201
+ __pyx_t_1 = __pyx_f_6a_sync_6_smart__get_exception(__pyx_v_inner); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error)
10881
11202
  __Pyx_GOTREF(__pyx_t_1);
10882
11203
  __pyx_v_exc = __pyx_t_1;
10883
11204
  __pyx_t_1 = 0;
10884
11205
 
10885
- /* "a_sync/_smart.pyx":645
11206
+ /* "a_sync/_smart.pyx":661
10886
11207
  * else:
10887
11208
  * exc = _get_exception(inner)
10888
11209
  * if exc is not None: # <<<<<<<<<<<<<<
10889
11210
  * outer.set_exception(exc)
10890
11211
  * else:
10891
11212
  */
10892
- __Pyx_TraceLine(645,0,__PYX_ERR(0, 645, __pyx_L1_error))
11213
+ __Pyx_TraceLine(661,0,__PYX_ERR(0, 661, __pyx_L1_error))
10893
11214
  __pyx_t_3 = (__pyx_v_exc != Py_None);
10894
11215
  if (__pyx_t_3) {
10895
11216
 
10896
- /* "a_sync/_smart.pyx":646
11217
+ /* "a_sync/_smart.pyx":662
10897
11218
  * exc = _get_exception(inner)
10898
11219
  * if exc is not None:
10899
11220
  * outer.set_exception(exc) # <<<<<<<<<<<<<<
10900
11221
  * else:
10901
11222
  * outer.set_result(inner._result)
10902
11223
  */
10903
- __Pyx_TraceLine(646,0,__PYX_ERR(0, 646, __pyx_L1_error))
10904
- if (unlikely(!__pyx_cur_scope->__pyx_v_outer)) { __Pyx_RaiseClosureNameError("outer"); __PYX_ERR(0, 646, __pyx_L1_error) }
10905
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_outer, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 646, __pyx_L1_error)
11224
+ __Pyx_TraceLine(662,0,__PYX_ERR(0, 662, __pyx_L1_error))
11225
+ if (unlikely(!__pyx_cur_scope->__pyx_v_outer)) { __Pyx_RaiseClosureNameError("outer"); __PYX_ERR(0, 662, __pyx_L1_error) }
11226
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_outer, __pyx_n_s_set_exception); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 662, __pyx_L1_error)
10906
11227
  __Pyx_GOTREF(__pyx_t_4);
10907
11228
  __pyx_t_5 = NULL;
10908
11229
  __pyx_t_6 = 0;
@@ -10922,13 +11243,13 @@ static PyObject *__pyx_pf_6a_sync_6_smart_19_get_done_callbacks__inner_done_call
10922
11243
  PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_exc};
10923
11244
  __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
10924
11245
  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
10925
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
11246
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
10926
11247
  __Pyx_GOTREF(__pyx_t_1);
10927
11248
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10928
11249
  }
10929
11250
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
10930
11251
 
10931
- /* "a_sync/_smart.pyx":645
11252
+ /* "a_sync/_smart.pyx":661
10932
11253
  * else:
10933
11254
  * exc = _get_exception(inner)
10934
11255
  * if exc is not None: # <<<<<<<<<<<<<<
@@ -10938,19 +11259,19 @@ static PyObject *__pyx_pf_6a_sync_6_smart_19_get_done_callbacks__inner_done_call
10938
11259
  goto __pyx_L6;
10939
11260
  }
10940
11261
 
10941
- /* "a_sync/_smart.pyx":648
11262
+ /* "a_sync/_smart.pyx":664
10942
11263
  * outer.set_exception(exc)
10943
11264
  * else:
10944
11265
  * outer.set_result(inner._result) # <<<<<<<<<<<<<<
10945
11266
  *
10946
11267
  * def _outer_done_callback(outer):
10947
11268
  */
10948
- __Pyx_TraceLine(648,0,__PYX_ERR(0, 648, __pyx_L1_error))
11269
+ __Pyx_TraceLine(664,0,__PYX_ERR(0, 664, __pyx_L1_error))
10949
11270
  /*else*/ {
10950
- if (unlikely(!__pyx_cur_scope->__pyx_v_outer)) { __Pyx_RaiseClosureNameError("outer"); __PYX_ERR(0, 648, __pyx_L1_error) }
10951
- __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_outer, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 648, __pyx_L1_error)
11271
+ if (unlikely(!__pyx_cur_scope->__pyx_v_outer)) { __Pyx_RaiseClosureNameError("outer"); __PYX_ERR(0, 664, __pyx_L1_error) }
11272
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_outer, __pyx_n_s_set_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L1_error)
10952
11273
  __Pyx_GOTREF(__pyx_t_4);
10953
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_inner, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 648, __pyx_L1_error)
11274
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_inner, __pyx_n_s_result); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 664, __pyx_L1_error)
10954
11275
  __Pyx_GOTREF(__pyx_t_5);
10955
11276
  __pyx_t_7 = NULL;
10956
11277
  __pyx_t_6 = 0;
@@ -10971,7 +11292,7 @@ static PyObject *__pyx_pf_6a_sync_6_smart_19_get_done_callbacks__inner_done_call
10971
11292
  __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
10972
11293
  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
10973
11294
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
10974
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
11295
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 664, __pyx_L1_error)
10975
11296
  __Pyx_GOTREF(__pyx_t_1);
10976
11297
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
10977
11298
  }
@@ -10981,7 +11302,7 @@ static PyObject *__pyx_pf_6a_sync_6_smart_19_get_done_callbacks__inner_done_call
10981
11302
  }
10982
11303
  __pyx_L5:;
10983
11304
 
10984
- /* "a_sync/_smart.pyx":634
11305
+ /* "a_sync/_smart.pyx":650
10985
11306
  * cdef tuple _get_done_callbacks(inner: Task, outer: Future):
10986
11307
  *
10987
11308
  * def _inner_done_callback(inner): # <<<<<<<<<<<<<<
@@ -11007,7 +11328,7 @@ static PyObject *__pyx_pf_6a_sync_6_smart_19_get_done_callbacks__inner_done_call
11007
11328
  return __pyx_r;
11008
11329
  }
11009
11330
 
11010
- /* "a_sync/_smart.pyx":650
11331
+ /* "a_sync/_smart.pyx":666
11011
11332
  * outer.set_result(inner._result)
11012
11333
  *
11013
11334
  * def _outer_done_callback(outer): # <<<<<<<<<<<<<<
@@ -11068,12 +11389,12 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
11068
11389
  (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
11069
11390
  kw_args--;
11070
11391
  }
11071
- else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 650, __pyx_L3_error)
11392
+ else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 666, __pyx_L3_error)
11072
11393
  else goto __pyx_L5_argtuple_error;
11073
11394
  }
11074
11395
  if (unlikely(kw_args > 0)) {
11075
11396
  const Py_ssize_t kwd_pos_args = __pyx_nargs;
11076
- if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_outer_done_callback") < 0)) __PYX_ERR(0, 650, __pyx_L3_error)
11397
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_outer_done_callback") < 0)) __PYX_ERR(0, 666, __pyx_L3_error)
11077
11398
  }
11078
11399
  } else if (unlikely(__pyx_nargs != 1)) {
11079
11400
  goto __pyx_L5_argtuple_error;
@@ -11084,7 +11405,7 @@ PyObject *__pyx_args, PyObject *__pyx_kwds
11084
11405
  }
11085
11406
  goto __pyx_L6_skip;
11086
11407
  __pyx_L5_argtuple_error:;
11087
- __Pyx_RaiseArgtupleInvalid("_outer_done_callback", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 650, __pyx_L3_error)
11408
+ __Pyx_RaiseArgtupleInvalid("_outer_done_callback", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 666, __pyx_L3_error)
11088
11409
  __pyx_L6_skip:;
11089
11410
  goto __pyx_L4_argument_unpacking_done;
11090
11411
  __pyx_L3_error:;
@@ -11128,35 +11449,35 @@ static PyObject *__pyx_pf_6a_sync_6_smart_19_get_done_callbacks_2_outer_done_cal
11128
11449
  __Pyx_RefNannySetupContext("_outer_done_callback", 1);
11129
11450
  __pyx_outer_scope = (struct __pyx_obj_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks *) __Pyx_CyFunction_GetClosure(__pyx_self);
11130
11451
  __pyx_cur_scope = __pyx_outer_scope;
11131
- __Pyx_TraceCall("_outer_done_callback", __pyx_f[0], 650, 0, __PYX_ERR(0, 650, __pyx_L1_error));
11452
+ __Pyx_TraceCall("_outer_done_callback", __pyx_f[0], 666, 0, __PYX_ERR(0, 666, __pyx_L1_error));
11132
11453
 
11133
- /* "a_sync/_smart.pyx":651
11454
+ /* "a_sync/_smart.pyx":667
11134
11455
  *
11135
11456
  * def _outer_done_callback(outer):
11136
11457
  * if _is_not_done(inner): # <<<<<<<<<<<<<<
11137
11458
  * inner.remove_done_callback(_inner_done_callback)
11138
11459
  *
11139
11460
  */
11140
- __Pyx_TraceLine(651,0,__PYX_ERR(0, 651, __pyx_L1_error))
11141
- if (unlikely(!__pyx_cur_scope->__pyx_v_inner)) { __Pyx_RaiseClosureNameError("inner"); __PYX_ERR(0, 651, __pyx_L1_error) }
11461
+ __Pyx_TraceLine(667,0,__PYX_ERR(0, 667, __pyx_L1_error))
11462
+ if (unlikely(!__pyx_cur_scope->__pyx_v_inner)) { __Pyx_RaiseClosureNameError("inner"); __PYX_ERR(0, 667, __pyx_L1_error) }
11142
11463
  __pyx_t_1 = __pyx_cur_scope->__pyx_v_inner;
11143
11464
  __Pyx_INCREF(__pyx_t_1);
11144
- __pyx_t_2 = __pyx_f_6a_sync_6_smart__is_not_done(__pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 651, __pyx_L1_error)
11465
+ __pyx_t_2 = __pyx_f_6a_sync_6_smart__is_not_done(__pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1) && PyErr_Occurred())) __PYX_ERR(0, 667, __pyx_L1_error)
11145
11466
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11146
11467
  if (__pyx_t_2) {
11147
11468
 
11148
- /* "a_sync/_smart.pyx":652
11469
+ /* "a_sync/_smart.pyx":668
11149
11470
  * def _outer_done_callback(outer):
11150
11471
  * if _is_not_done(inner):
11151
11472
  * inner.remove_done_callback(_inner_done_callback) # <<<<<<<<<<<<<<
11152
11473
  *
11153
11474
  * return _inner_done_callback, _outer_done_callback
11154
11475
  */
11155
- __Pyx_TraceLine(652,0,__PYX_ERR(0, 652, __pyx_L1_error))
11156
- if (unlikely(!__pyx_cur_scope->__pyx_v_inner)) { __Pyx_RaiseClosureNameError("inner"); __PYX_ERR(0, 652, __pyx_L1_error) }
11157
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_inner, __pyx_n_s_remove_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L1_error)
11476
+ __Pyx_TraceLine(668,0,__PYX_ERR(0, 668, __pyx_L1_error))
11477
+ if (unlikely(!__pyx_cur_scope->__pyx_v_inner)) { __Pyx_RaiseClosureNameError("inner"); __PYX_ERR(0, 668, __pyx_L1_error) }
11478
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_inner, __pyx_n_s_remove_done_callback); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 668, __pyx_L1_error)
11158
11479
  __Pyx_GOTREF(__pyx_t_3);
11159
- if (unlikely(!__pyx_cur_scope->__pyx_v__inner_done_callback)) { __Pyx_RaiseClosureNameError("_inner_done_callback"); __PYX_ERR(0, 652, __pyx_L1_error) }
11480
+ if (unlikely(!__pyx_cur_scope->__pyx_v__inner_done_callback)) { __Pyx_RaiseClosureNameError("_inner_done_callback"); __PYX_ERR(0, 668, __pyx_L1_error) }
11160
11481
  __pyx_t_4 = NULL;
11161
11482
  __pyx_t_5 = 0;
11162
11483
  #if CYTHON_UNPACK_METHODS
@@ -11175,13 +11496,13 @@ static PyObject *__pyx_pf_6a_sync_6_smart_19_get_done_callbacks_2_outer_done_cal
11175
11496
  PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v__inner_done_callback};
11176
11497
  __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
11177
11498
  __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
11178
- if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error)
11499
+ if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
11179
11500
  __Pyx_GOTREF(__pyx_t_1);
11180
11501
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
11181
11502
  }
11182
11503
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
11183
11504
 
11184
- /* "a_sync/_smart.pyx":651
11505
+ /* "a_sync/_smart.pyx":667
11185
11506
  *
11186
11507
  * def _outer_done_callback(outer):
11187
11508
  * if _is_not_done(inner): # <<<<<<<<<<<<<<
@@ -11190,7 +11511,7 @@ static PyObject *__pyx_pf_6a_sync_6_smart_19_get_done_callbacks_2_outer_done_cal
11190
11511
  */
11191
11512
  }
11192
11513
 
11193
- /* "a_sync/_smart.pyx":650
11514
+ /* "a_sync/_smart.pyx":666
11194
11515
  * outer.set_result(inner._result)
11195
11516
  *
11196
11517
  * def _outer_done_callback(outer): # <<<<<<<<<<<<<<
@@ -11214,7 +11535,7 @@ static PyObject *__pyx_pf_6a_sync_6_smart_19_get_done_callbacks_2_outer_done_cal
11214
11535
  return __pyx_r;
11215
11536
  }
11216
11537
 
11217
- /* "a_sync/_smart.pyx":632
11538
+ /* "a_sync/_smart.pyx":648
11218
11539
  *
11219
11540
  *
11220
11541
  * cdef tuple _get_done_callbacks(inner: Task, outer: Future): # <<<<<<<<<<<<<<
@@ -11237,11 +11558,11 @@ static PyObject *__pyx_f_6a_sync_6_smart__get_done_callbacks(PyObject *__pyx_v_i
11237
11558
  if (unlikely(!__pyx_cur_scope)) {
11238
11559
  __pyx_cur_scope = ((struct __pyx_obj_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks *)Py_None);
11239
11560
  __Pyx_INCREF(Py_None);
11240
- __PYX_ERR(0, 632, __pyx_L1_error)
11561
+ __PYX_ERR(0, 648, __pyx_L1_error)
11241
11562
  } else {
11242
11563
  __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
11243
11564
  }
11244
- __Pyx_TraceCall("_get_done_callbacks", __pyx_f[0], 632, 0, __PYX_ERR(0, 632, __pyx_L1_error));
11565
+ __Pyx_TraceCall("_get_done_callbacks", __pyx_f[0], 648, 0, __PYX_ERR(0, 648, __pyx_L1_error));
11245
11566
  __pyx_cur_scope->__pyx_v_inner = __pyx_v_inner;
11246
11567
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_inner);
11247
11568
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_inner);
@@ -11249,55 +11570,55 @@ static PyObject *__pyx_f_6a_sync_6_smart__get_done_callbacks(PyObject *__pyx_v_i
11249
11570
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_outer);
11250
11571
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_outer);
11251
11572
 
11252
- /* "a_sync/_smart.pyx":634
11573
+ /* "a_sync/_smart.pyx":650
11253
11574
  * cdef tuple _get_done_callbacks(inner: Task, outer: Future):
11254
11575
  *
11255
11576
  * def _inner_done_callback(inner): # <<<<<<<<<<<<<<
11256
11577
  * if _is_cancelled(outer):
11257
11578
  * if not _is_cancelled(inner):
11258
11579
  */
11259
- __Pyx_TraceLine(634,0,__PYX_ERR(0, 634, __pyx_L1_error))
11260
- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_19_get_done_callbacks_1_inner_done_callback, 0, __pyx_n_s_get_done_callbacks_locals__inne, ((PyObject*)__pyx_cur_scope), __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
11580
+ __Pyx_TraceLine(650,0,__PYX_ERR(0, 650, __pyx_L1_error))
11581
+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_19_get_done_callbacks_1_inner_done_callback, 0, __pyx_n_s_get_done_callbacks_locals__inne, ((PyObject*)__pyx_cur_scope), __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
11261
11582
  __Pyx_GOTREF(__pyx_t_1);
11262
11583
  __Pyx_GIVEREF(__pyx_t_1);
11263
11584
  __pyx_cur_scope->__pyx_v__inner_done_callback = __pyx_t_1;
11264
11585
  __pyx_t_1 = 0;
11265
11586
 
11266
- /* "a_sync/_smart.pyx":650
11587
+ /* "a_sync/_smart.pyx":666
11267
11588
  * outer.set_result(inner._result)
11268
11589
  *
11269
11590
  * def _outer_done_callback(outer): # <<<<<<<<<<<<<<
11270
11591
  * if _is_not_done(inner):
11271
11592
  * inner.remove_done_callback(_inner_done_callback)
11272
11593
  */
11273
- __Pyx_TraceLine(650,0,__PYX_ERR(0, 650, __pyx_L1_error))
11274
- __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_19_get_done_callbacks_3_outer_done_callback, 0, __pyx_n_s_get_done_callbacks_locals__oute, ((PyObject*)__pyx_cur_scope), __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
11594
+ __Pyx_TraceLine(666,0,__PYX_ERR(0, 666, __pyx_L1_error))
11595
+ __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_19_get_done_callbacks_3_outer_done_callback, 0, __pyx_n_s_get_done_callbacks_locals__oute, ((PyObject*)__pyx_cur_scope), __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error)
11275
11596
  __Pyx_GOTREF(__pyx_t_1);
11276
11597
  __pyx_v__outer_done_callback = __pyx_t_1;
11277
11598
  __pyx_t_1 = 0;
11278
11599
 
11279
- /* "a_sync/_smart.pyx":654
11600
+ /* "a_sync/_smart.pyx":670
11280
11601
  * inner.remove_done_callback(_inner_done_callback)
11281
11602
  *
11282
11603
  * return _inner_done_callback, _outer_done_callback # <<<<<<<<<<<<<<
11283
11604
  *
11284
11605
  *
11285
11606
  */
11286
- __Pyx_TraceLine(654,0,__PYX_ERR(0, 654, __pyx_L1_error))
11607
+ __Pyx_TraceLine(670,0,__PYX_ERR(0, 670, __pyx_L1_error))
11287
11608
  __Pyx_XDECREF(__pyx_r);
11288
- __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
11609
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 670, __pyx_L1_error)
11289
11610
  __Pyx_GOTREF(__pyx_t_1);
11290
11611
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v__inner_done_callback);
11291
11612
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v__inner_done_callback);
11292
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v__inner_done_callback)) __PYX_ERR(0, 654, __pyx_L1_error);
11613
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v__inner_done_callback)) __PYX_ERR(0, 670, __pyx_L1_error);
11293
11614
  __Pyx_INCREF(__pyx_v__outer_done_callback);
11294
11615
  __Pyx_GIVEREF(__pyx_v__outer_done_callback);
11295
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v__outer_done_callback)) __PYX_ERR(0, 654, __pyx_L1_error);
11616
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v__outer_done_callback)) __PYX_ERR(0, 670, __pyx_L1_error);
11296
11617
  __pyx_r = ((PyObject*)__pyx_t_1);
11297
11618
  __pyx_t_1 = 0;
11298
11619
  goto __pyx_L0;
11299
11620
 
11300
- /* "a_sync/_smart.pyx":632
11621
+ /* "a_sync/_smart.pyx":648
11301
11622
  *
11302
11623
  *
11303
11624
  * cdef tuple _get_done_callbacks(inner: Task, outer: Future): # <<<<<<<<<<<<<<
@@ -12475,6 +12796,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
12475
12796
  {&__pyx_n_s_Any, __pyx_k_Any, sizeof(__pyx_k_Any), 0, 0, 1, 1},
12476
12797
  {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
12477
12798
  {&__pyx_kp_s_Awaitable_T, __pyx_k_Awaitable_T, sizeof(__pyx_k_Awaitable_T), 0, 0, 1, 0},
12799
+ {&__pyx_n_s_CancelledError, __pyx_k_CancelledError, sizeof(__pyx_k_CancelledError), 0, 0, 1, 1},
12478
12800
  {&__pyx_kp_u_Could_not_create_proxy, __pyx_k_Could_not_create_proxy, sizeof(__pyx_k_Could_not_create_proxy), 0, 1, 0, 0},
12479
12801
  {&__pyx_kp_u_Could_not_create_ref, __pyx_k_Could_not_create_ref, sizeof(__pyx_k_Could_not_create_ref), 0, 1, 0, 0},
12480
12802
  {&__pyx_kp_u_Exception_is_not_set, __pyx_k_Exception_is_not_set, sizeof(__pyx_k_Exception_is_not_set), 0, 1, 0, 0},
@@ -12512,6 +12834,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
12512
12834
  {&__pyx_n_u_SmartTask_2, __pyx_k_SmartTask_2, sizeof(__pyx_k_SmartTask_2), 0, 1, 0, 1},
12513
12835
  {&__pyx_n_s_SmartTask___await, __pyx_k_SmartTask___await, sizeof(__pyx_k_SmartTask___await), 0, 0, 1, 1},
12514
12836
  {&__pyx_n_s_SmartTask___init, __pyx_k_SmartTask___init, sizeof(__pyx_k_SmartTask___init), 0, 0, 1, 1},
12837
+ {&__pyx_n_s_SmartTask__make_cancelled_error, __pyx_k_SmartTask__make_cancelled_error, sizeof(__pyx_k_SmartTask__make_cancelled_error), 0, 0, 1, 1},
12515
12838
  {&__pyx_n_s_SmartTask__waiter_done_cleanup_c, __pyx_k_SmartTask__waiter_done_cleanup_c, sizeof(__pyx_k_SmartTask__waiter_done_cleanup_c), 0, 0, 1, 1},
12516
12839
  {&__pyx_n_s_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 0, 1, 1},
12517
12840
  {&__pyx_n_s_TYPE_CHECKING, __pyx_k_TYPE_CHECKING, sizeof(__pyx_k_TYPE_CHECKING), 0, 0, 1, 1},
@@ -12528,11 +12851,11 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
12528
12851
  {&__pyx_kp_u__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 1, 0, 0},
12529
12852
  {&__pyx_kp_u__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 1, 0, 0},
12530
12853
  {&__pyx_kp_u__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 1, 0, 0},
12531
- {&__pyx_n_s__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 0, 1, 1},
12532
- {&__pyx_kp_u__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 1, 0, 0},
12854
+ {&__pyx_n_s__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 0, 1, 1},
12855
+ {&__pyx_kp_u__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 1, 0, 0},
12533
12856
  {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0},
12534
12857
  {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0},
12535
- {&__pyx_n_s__46, __pyx_k__46, sizeof(__pyx_k__46), 0, 0, 1, 1},
12858
+ {&__pyx_n_s__48, __pyx_k__48, sizeof(__pyx_k__48), 0, 0, 1, 1},
12536
12859
  {&__pyx_n_s_a_sync, __pyx_k_a_sync, sizeof(__pyx_k_a_sync), 0, 0, 1, 1},
12537
12860
  {&__pyx_n_s_a_sync__smart, __pyx_k_a_sync__smart, sizeof(__pyx_k_a_sync__smart), 0, 0, 1, 1},
12538
12861
  {&__pyx_kp_s_a_sync__smart_pyx, __pyx_k_a_sync__smart_pyx, sizeof(__pyx_k_a_sync__smart_pyx), 0, 0, 1, 0},
@@ -12545,6 +12868,7 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
12545
12868
  {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1},
12546
12869
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
12547
12870
  {&__pyx_n_s_asyncio, __pyx_k_asyncio, sizeof(__pyx_k_asyncio), 0, 0, 1, 1},
12871
+ {&__pyx_kp_s_asyncio_CancelledError, __pyx_k_asyncio_CancelledError, sizeof(__pyx_k_asyncio_CancelledError), 0, 0, 1, 0},
12548
12872
  {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
12549
12873
  {&__pyx_n_s_asyncio_future_blocking, __pyx_k_asyncio_future_blocking, sizeof(__pyx_k_asyncio_future_blocking), 0, 0, 1, 1},
12550
12874
  {&__pyx_n_s_asyncio_tasks, __pyx_k_asyncio_tasks, sizeof(__pyx_k_asyncio_tasks), 0, 0, 1, 1},
@@ -12553,11 +12877,14 @@ static int __Pyx_CreateStringTabAndInitStrings(void) {
12553
12877
  {&__pyx_kp_u_awaiting_s, __pyx_k_awaiting_s, sizeof(__pyx_k_awaiting_s), 0, 1, 0, 0},
12554
12878
  {&__pyx_n_s_bint, __pyx_k_bint, sizeof(__pyx_k_bint), 0, 0, 1, 1},
12555
12879
  {&__pyx_n_s_cancel, __pyx_k_cancel, sizeof(__pyx_k_cancel), 0, 0, 1, 1},
12880
+ {&__pyx_n_s_cancel_message, __pyx_k_cancel_message, sizeof(__pyx_k_cancel_message), 0, 0, 1, 1},
12881
+ {&__pyx_n_s_cancelled_exc, __pyx_k_cancelled_exc, sizeof(__pyx_k_cancelled_exc), 0, 0, 1, 1},
12556
12882
  {&__pyx_n_s_cause, __pyx_k_cause, sizeof(__pyx_k_cause), 0, 0, 1, 1},
12557
12883
  {&__pyx_n_s_cfunc_to_py, __pyx_k_cfunc_to_py, sizeof(__pyx_k_cfunc_to_py), 0, 0, 1, 1},
12558
12884
  {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
12559
12885
  {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
12560
12886
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
12887
+ {&__pyx_n_s_context, __pyx_k_context, sizeof(__pyx_k_context), 0, 0, 1, 1},
12561
12888
  {&__pyx_n_s_coro, __pyx_k_coro, sizeof(__pyx_k_coro), 0, 0, 1, 1},
12562
12889
  {&__pyx_n_s_create_future, __pyx_k_create_future, sizeof(__pyx_k_create_future), 0, 0, 1, 1},
12563
12890
  {&__pyx_n_u_create_future, __pyx_k_create_future, sizeof(__pyx_k_create_future), 0, 1, 0, 1},
@@ -12732,50 +13059,50 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
12732
13059
  __Pyx_GOTREF(__pyx_tuple__16);
12733
13060
  __Pyx_GIVEREF(__pyx_tuple__16);
12734
13061
 
12735
- /* "a_sync/_smart.pyx":564
13062
+ /* "a_sync/_smart.pyx":580
12736
13063
  * """
12737
13064
  * if loop is None:
12738
13065
  * import a_sync.asyncio # <<<<<<<<<<<<<<
12739
13066
  * loop = a_sync.asyncio.get_event_loop()
12740
13067
  * loop.set_task_factory(smart_task_factory)
12741
13068
  */
12742
- __pyx_tuple__19 = PyTuple_Pack(2, __pyx_n_s_a_sync, __pyx_n_s_asyncio); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 564, __pyx_L1_error)
12743
- __Pyx_GOTREF(__pyx_tuple__19);
12744
- __Pyx_GIVEREF(__pyx_tuple__19);
13069
+ __pyx_tuple__20 = PyTuple_Pack(2, __pyx_n_s_a_sync, __pyx_n_s_asyncio); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 580, __pyx_L1_error)
13070
+ __Pyx_GOTREF(__pyx_tuple__20);
13071
+ __Pyx_GIVEREF(__pyx_tuple__20);
12745
13072
 
12746
- /* "a_sync/_smart.pyx":634
13073
+ /* "a_sync/_smart.pyx":650
12747
13074
  * cdef tuple _get_done_callbacks(inner: Task, outer: Future):
12748
13075
  *
12749
13076
  * def _inner_done_callback(inner): # <<<<<<<<<<<<<<
12750
13077
  * if _is_cancelled(outer):
12751
13078
  * if not _is_cancelled(inner):
12752
13079
  */
12753
- __pyx_tuple__21 = PyTuple_Pack(2, __pyx_n_s_inner, __pyx_n_s_exc); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 634, __pyx_L1_error)
12754
- __Pyx_GOTREF(__pyx_tuple__21);
12755
- __Pyx_GIVEREF(__pyx_tuple__21);
12756
- __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__21, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_inner_done_callback, 634, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(0, 634, __pyx_L1_error)
13080
+ __pyx_tuple__22 = PyTuple_Pack(2, __pyx_n_s_inner, __pyx_n_s_exc); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 650, __pyx_L1_error)
13081
+ __Pyx_GOTREF(__pyx_tuple__22);
13082
+ __Pyx_GIVEREF(__pyx_tuple__22);
13083
+ __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_inner_done_callback, 650, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 650, __pyx_L1_error)
12757
13084
 
12758
- /* "a_sync/_smart.pyx":650
13085
+ /* "a_sync/_smart.pyx":666
12759
13086
  * outer.set_result(inner._result)
12760
13087
  *
12761
13088
  * def _outer_done_callback(outer): # <<<<<<<<<<<<<<
12762
13089
  * if _is_not_done(inner):
12763
13090
  * inner.remove_done_callback(_inner_done_callback)
12764
13091
  */
12765
- __pyx_tuple__23 = PyTuple_Pack(1, __pyx_n_s_outer); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 650, __pyx_L1_error)
12766
- __Pyx_GOTREF(__pyx_tuple__23);
12767
- __Pyx_GIVEREF(__pyx_tuple__23);
12768
- __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_outer_done_callback, 650, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 650, __pyx_L1_error)
13092
+ __pyx_tuple__24 = PyTuple_Pack(1, __pyx_n_s_outer); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 666, __pyx_L1_error)
13093
+ __Pyx_GOTREF(__pyx_tuple__24);
13094
+ __Pyx_GIVEREF(__pyx_tuple__24);
13095
+ __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_outer_done_callback, 666, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 666, __pyx_L1_error)
12769
13096
 
12770
13097
  /* "(tree fragment)":1
12771
13098
  * def __reduce_cython__(self): # <<<<<<<<<<<<<<
12772
13099
  * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12773
13100
  * def __setstate_cython__(self, __pyx_state):
12774
13101
  */
12775
- __pyx_tuple__27 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(1, 1, __pyx_L1_error)
12776
- __Pyx_GOTREF(__pyx_tuple__27);
12777
- __Pyx_GIVEREF(__pyx_tuple__27);
12778
- __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(1, 1, __pyx_L1_error)
13102
+ __pyx_tuple__28 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 1, __pyx_L1_error)
13103
+ __Pyx_GOTREF(__pyx_tuple__28);
13104
+ __Pyx_GIVEREF(__pyx_tuple__28);
13105
+ __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(1, 1, __pyx_L1_error)
12779
13106
 
12780
13107
  /* "(tree fragment)":3
12781
13108
  * def __reduce_cython__(self):
@@ -12783,10 +13110,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
12783
13110
  * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
12784
13111
  * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
12785
13112
  */
12786
- __pyx_tuple__28 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(1, 3, __pyx_L1_error)
12787
- __Pyx_GOTREF(__pyx_tuple__28);
12788
- __Pyx_GIVEREF(__pyx_tuple__28);
12789
- __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(1, 3, __pyx_L1_error)
13113
+ __pyx_tuple__29 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(1, 3, __pyx_L1_error)
13114
+ __Pyx_GOTREF(__pyx_tuple__29);
13115
+ __Pyx_GIVEREF(__pyx_tuple__29);
13116
+ __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(1, 3, __pyx_L1_error)
12790
13117
 
12791
13118
  /* "a_sync/_smart.pyx":243
12792
13119
  * __traceback__: Optional[TracebackType] = None
@@ -12795,10 +13122,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
12795
13122
  * self,
12796
13123
  * *,
12797
13124
  */
12798
- __pyx_tuple__29 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_queue, __pyx_n_s_key, __pyx_n_s_loop, __pyx_n_s_queue_ptr, __pyx_n_s_proxy_ptr); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 243, __pyx_L1_error)
12799
- __Pyx_GOTREF(__pyx_tuple__29);
12800
- __Pyx_GIVEREF(__pyx_tuple__29);
12801
- __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_init, 243, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 243, __pyx_L1_error)
13125
+ __pyx_tuple__30 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_queue, __pyx_n_s_key, __pyx_n_s_loop, __pyx_n_s_queue_ptr, __pyx_n_s_proxy_ptr); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 243, __pyx_L1_error)
13126
+ __Pyx_GOTREF(__pyx_tuple__30);
13127
+ __Pyx_GIVEREF(__pyx_tuple__30);
13128
+ __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_init, 243, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 243, __pyx_L1_error)
12802
13129
 
12803
13130
  /* "a_sync/_smart.pyx":279
12804
13131
  * self._waiters = WeakSet()
@@ -12807,7 +13134,7 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
12807
13134
  * return f"<{type(self).__name__} key={self._key} waiters={count_waiters(self)} {<str>self._state}>"
12808
13135
  *
12809
13136
  */
12810
- __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__27, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_repr_2, 279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 279, __pyx_L1_error)
13137
+ __pyx_codeobj__10 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_repr_2, 279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__10)) __PYX_ERR(0, 279, __pyx_L1_error)
12811
13138
 
12812
13139
  /* "a_sync/_smart.pyx":282
12813
13140
  * return f"<{type(self).__name__} key={self._key} waiters={count_waiters(self)} {<str>self._state}>"
@@ -12816,10 +13143,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
12816
13143
  * """
12817
13144
  * Compare the number of waiters to determine priority in a heap.
12818
13145
  */
12819
- __pyx_tuple__30 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 282, __pyx_L1_error)
12820
- __Pyx_GOTREF(__pyx_tuple__30);
12821
- __Pyx_GIVEREF(__pyx_tuple__30);
12822
- __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_lt, 282, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 282, __pyx_L1_error)
13146
+ __pyx_tuple__31 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_other); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 282, __pyx_L1_error)
13147
+ __Pyx_GOTREF(__pyx_tuple__31);
13148
+ __Pyx_GIVEREF(__pyx_tuple__31);
13149
+ __pyx_codeobj__14 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_lt, 282, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(0, 282, __pyx_L1_error)
12823
13150
 
12824
13151
  /* "a_sync/_smart.pyx":302
12825
13152
  * return count_waiters(self) > count_waiters(other)
@@ -12828,10 +13155,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
12828
13155
  * """
12829
13156
  * Await the future, handling waiters and logging.
12830
13157
  */
12831
- __pyx_tuple__31 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_task, __pyx_n_s_queue); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 302, __pyx_L1_error)
12832
- __Pyx_GOTREF(__pyx_tuple__31);
12833
- __Pyx_GIVEREF(__pyx_tuple__31);
12834
- __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_await, 302, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 302, __pyx_L1_error)
13158
+ __pyx_tuple__32 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_task, __pyx_n_s_queue); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 302, __pyx_L1_error)
13159
+ __Pyx_GOTREF(__pyx_tuple__32);
13160
+ __Pyx_GIVEREF(__pyx_tuple__32);
13161
+ __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_await, 302, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 302, __pyx_L1_error)
12835
13162
 
12836
13163
  /* "a_sync/_smart.pyx":348
12837
13164
  * return _get_result(self) # May raise too.
@@ -12840,10 +13167,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
12840
13167
  * def _waiter_done_cleanup_callback(self, waiter: "SmartTask") -> None:
12841
13168
  * """
12842
13169
  */
12843
- __pyx_tuple__32 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_waiter); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 348, __pyx_L1_error)
12844
- __Pyx_GOTREF(__pyx_tuple__32);
12845
- __Pyx_GIVEREF(__pyx_tuple__32);
12846
- __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_waiter_done_cleanup_callback, 348, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 348, __pyx_L1_error)
13170
+ __pyx_tuple__33 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_waiter); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 348, __pyx_L1_error)
13171
+ __Pyx_GOTREF(__pyx_tuple__33);
13172
+ __Pyx_GIVEREF(__pyx_tuple__33);
13173
+ __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_waiter_done_cleanup_callback, 348, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 348, __pyx_L1_error)
12847
13174
 
12848
13175
  /* "a_sync/_smart.pyx":374
12849
13176
  *
@@ -12852,13 +13179,13 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
12852
13179
  * queue: Optional["SmartProcessingQueue"] = None,
12853
13180
  * key: Optional[Key] = None,
12854
13181
  */
12855
- __pyx_tuple__34 = PyTuple_Pack(3, __pyx_n_s_queue, __pyx_n_s_key, __pyx_n_s_loop); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 374, __pyx_L1_error)
12856
- __Pyx_GOTREF(__pyx_tuple__34);
12857
- __Pyx_GIVEREF(__pyx_tuple__34);
12858
- __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_create_future, 374, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 374, __pyx_L1_error)
12859
- __pyx_tuple__36 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 374, __pyx_L1_error)
12860
- __Pyx_GOTREF(__pyx_tuple__36);
12861
- __Pyx_GIVEREF(__pyx_tuple__36);
13182
+ __pyx_tuple__35 = PyTuple_Pack(3, __pyx_n_s_queue, __pyx_n_s_key, __pyx_n_s_loop); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 374, __pyx_L1_error)
13183
+ __Pyx_GOTREF(__pyx_tuple__35);
13184
+ __Pyx_GIVEREF(__pyx_tuple__35);
13185
+ __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_create_future, 374, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 374, __pyx_L1_error)
13186
+ __pyx_tuple__37 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 374, __pyx_L1_error)
13187
+ __Pyx_GOTREF(__pyx_tuple__37);
13188
+ __Pyx_GIVEREF(__pyx_tuple__37);
12862
13189
 
12863
13190
  /* "a_sync/_smart.pyx":425
12864
13191
  * __traceback__: Optional[TracebackType] = None
@@ -12867,10 +13194,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
12867
13194
  * def __init__(
12868
13195
  * self,
12869
13196
  */
12870
- __pyx_tuple__37 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_coro, __pyx_n_s_loop, __pyx_n_s_name_2); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 425, __pyx_L1_error)
12871
- __Pyx_GOTREF(__pyx_tuple__37);
12872
- __Pyx_GIVEREF(__pyx_tuple__37);
12873
- __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_init, 425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 425, __pyx_L1_error)
13197
+ __pyx_tuple__38 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_coro, __pyx_n_s_loop, __pyx_n_s_name_2); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 425, __pyx_L1_error)
13198
+ __Pyx_GOTREF(__pyx_tuple__38);
13199
+ __Pyx_GIVEREF(__pyx_tuple__38);
13200
+ __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_init, 425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 425, __pyx_L1_error)
12874
13201
 
12875
13202
  /* "a_sync/_smart.pyx":452
12876
13203
  * self._waiters = set()
@@ -12879,10 +13206,10 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
12879
13206
  * """
12880
13207
  * Await the task, handling waiters and logging.
12881
13208
  */
12882
- __pyx_tuple__39 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_task); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 452, __pyx_L1_error)
12883
- __Pyx_GOTREF(__pyx_tuple__39);
12884
- __Pyx_GIVEREF(__pyx_tuple__39);
12885
- __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_await, 452, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 452, __pyx_L1_error)
13209
+ __pyx_tuple__40 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_task); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 452, __pyx_L1_error)
13210
+ __Pyx_GOTREF(__pyx_tuple__40);
13211
+ __Pyx_GIVEREF(__pyx_tuple__40);
13212
+ __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_GENERATOR, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_await, 452, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 452, __pyx_L1_error)
12886
13213
 
12887
13214
  /* "a_sync/_smart.pyx":497
12888
13215
  * return _get_result(self) # May raise too.
@@ -12891,46 +13218,58 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
12891
13218
  * def _waiter_done_cleanup_callback(self, waiter: "SmartTask") -> None:
12892
13219
  * """
12893
13220
  */
12894
- __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_waiter_done_cleanup_callback, 497, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 497, __pyx_L1_error)
13221
+ __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_waiter_done_cleanup_callback, 497, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 497, __pyx_L1_error)
13222
+
13223
+ /* "a_sync/_smart.pyx":513
13224
+ * (<set>self._waiters).remove(waiter)
13225
+ *
13226
+ * def _make_cancelled_error(self) -> asyncio.CancelledError: # <<<<<<<<<<<<<<
13227
+ * # this function is not present in python3.8 so we're backporting it
13228
+ * """Create the CancelledError to raise if the Future is cancelled.
13229
+ */
13230
+ __pyx_tuple__42 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_exc); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 513, __pyx_L1_error)
13231
+ __Pyx_GOTREF(__pyx_tuple__42);
13232
+ __Pyx_GIVEREF(__pyx_tuple__42);
13233
+ __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_make_cancelled_error, 513, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 513, __pyx_L1_error)
12895
13234
 
12896
- /* "a_sync/_smart.pyx":518
13235
+ /* "a_sync/_smart.pyx":534
12897
13236
  *
12898
13237
  * @cython.linetrace(False)
12899
13238
  * cpdef object smart_task_factory(loop: AbstractEventLoop, coro: Awaitable[T]): # <<<<<<<<<<<<<<
12900
13239
  * """
12901
13240
  * Task factory function that an event loop calls to create new tasks.
12902
13241
  */
12903
- __pyx_tuple__41 = PyTuple_Pack(2, __pyx_n_s_loop, __pyx_n_s_coro); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 518, __pyx_L1_error)
12904
- __Pyx_GOTREF(__pyx_tuple__41);
12905
- __Pyx_GIVEREF(__pyx_tuple__41);
12906
- __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_smart_task_factory, 518, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 518, __pyx_L1_error)
13242
+ __pyx_tuple__43 = PyTuple_Pack(2, __pyx_n_s_loop, __pyx_n_s_coro); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 534, __pyx_L1_error)
13243
+ __Pyx_GOTREF(__pyx_tuple__43);
13244
+ __Pyx_GIVEREF(__pyx_tuple__43);
13245
+ __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_smart_task_factory, 534, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 534, __pyx_L1_error)
12907
13246
 
12908
- /* "a_sync/_smart.pyx":546
13247
+ /* "a_sync/_smart.pyx":562
12909
13248
  *
12910
13249
  *
12911
13250
  * def set_smart_task_factory(loop: AbstractEventLoop = None) -> None: # <<<<<<<<<<<<<<
12912
13251
  * """
12913
13252
  * Set the event loop's task factory to :func:`~smart_task_factory` so all tasks will be SmartTask instances.
12914
13253
  */
12915
- __pyx_tuple__43 = PyTuple_Pack(2, __pyx_n_s_loop, __pyx_n_s_a_sync); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 546, __pyx_L1_error)
12916
- __Pyx_GOTREF(__pyx_tuple__43);
12917
- __Pyx_GIVEREF(__pyx_tuple__43);
12918
- __pyx_codeobj__18 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_set_smart_task_factory, 546, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__18)) __PYX_ERR(0, 546, __pyx_L1_error)
12919
- __pyx_tuple__44 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 546, __pyx_L1_error)
12920
- __Pyx_GOTREF(__pyx_tuple__44);
12921
- __Pyx_GIVEREF(__pyx_tuple__44);
13254
+ __pyx_tuple__45 = PyTuple_Pack(2, __pyx_n_s_loop, __pyx_n_s_a_sync); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 562, __pyx_L1_error)
13255
+ __Pyx_GOTREF(__pyx_tuple__45);
13256
+ __Pyx_GIVEREF(__pyx_tuple__45);
13257
+ __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_set_smart_task_factory, 562, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 562, __pyx_L1_error)
13258
+ __pyx_tuple__46 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 562, __pyx_L1_error)
13259
+ __Pyx_GOTREF(__pyx_tuple__46);
13260
+ __Pyx_GIVEREF(__pyx_tuple__46);
12922
13261
 
12923
- /* "a_sync/_smart.pyx":569
13262
+ /* "a_sync/_smart.pyx":585
12924
13263
  *
12925
13264
  *
12926
13265
  * cpdef object shield(arg: Awaitable[T]): # <<<<<<<<<<<<<<
12927
13266
  * """
12928
13267
  * Wait for a future, shielding it from cancellation.
12929
13268
  */
12930
- __pyx_tuple__45 = PyTuple_Pack(1, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 569, __pyx_L1_error)
12931
- __Pyx_GOTREF(__pyx_tuple__45);
12932
- __Pyx_GIVEREF(__pyx_tuple__45);
12933
- __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_shield, 569, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 569, __pyx_L1_error)
13269
+ __pyx_tuple__47 = PyTuple_Pack(1, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 585, __pyx_L1_error)
13270
+ __Pyx_GOTREF(__pyx_tuple__47);
13271
+ __Pyx_GIVEREF(__pyx_tuple__47);
13272
+ __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_a_sync__smart_pyx, __pyx_n_s_shield, 585, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 585, __pyx_L1_error)
12934
13273
  __Pyx_RefNannyFinishContext();
12935
13274
  return 0;
12936
13275
  __pyx_L1_error:;
@@ -12974,6 +13313,7 @@ static int __Pyx_modinit_global_init_code(void) {
12974
13313
  __pyx_v_6a_sync_6_smart_AbstractEventLoop = Py_None; Py_INCREF(Py_None);
12975
13314
  __pyx_v_6a_sync_6_smart_Future = Py_None; Py_INCREF(Py_None);
12976
13315
  __pyx_v_6a_sync_6_smart_Task = Py_None; Py_INCREF(Py_None);
13316
+ __pyx_v_6a_sync_6_smart_CancelledError = Py_None; Py_INCREF(Py_None);
12977
13317
  __pyx_v_6a_sync_6_smart_InvalidStateError = Py_None; Py_INCREF(Py_None);
12978
13318
  __pyx_v_6a_sync_6_smart__current_tasks = ((PyObject*)Py_None); Py_INCREF(Py_None);
12979
13319
  __pyx_v_6a_sync_6_smart__future_init = Py_None; Py_INCREF(Py_None);
@@ -13115,15 +13455,15 @@ static int __Pyx_modinit_type_init_code(void) {
13115
13455
  }
13116
13456
  #endif
13117
13457
  #if CYTHON_USE_TYPE_SPECS
13118
- __pyx_ptype_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks_spec, NULL); if (unlikely(!__pyx_ptype_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks)) __PYX_ERR(0, 632, __pyx_L1_error)
13119
- if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks_spec, __pyx_ptype_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks) < 0) __PYX_ERR(0, 632, __pyx_L1_error)
13458
+ __pyx_ptype_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks_spec, NULL); if (unlikely(!__pyx_ptype_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks)) __PYX_ERR(0, 648, __pyx_L1_error)
13459
+ if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks_spec, __pyx_ptype_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks) < 0) __PYX_ERR(0, 648, __pyx_L1_error)
13120
13460
  #else
13121
13461
  __pyx_ptype_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks = &__pyx_type_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks;
13122
13462
  #endif
13123
13463
  #if !CYTHON_COMPILING_IN_LIMITED_API
13124
13464
  #endif
13125
13465
  #if !CYTHON_USE_TYPE_SPECS
13126
- if (__Pyx_PyType_Ready(__pyx_ptype_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks) < 0) __PYX_ERR(0, 632, __pyx_L1_error)
13466
+ if (__Pyx_PyType_Ready(__pyx_ptype_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks) < 0) __PYX_ERR(0, 648, __pyx_L1_error)
13127
13467
  #endif
13128
13468
  #if PY_MAJOR_VERSION < 3
13129
13469
  __pyx_ptype_6a_sync_6_smart___pyx_scope_struct_3___pyx_f_6a_sync_6_smart__get_done_callbacks->tp_print = 0;
@@ -13711,7 +14051,7 @@ if (!__Pyx_RefNanny) {
13711
14051
  * cdef object AbstractEventLoop = asyncio.AbstractEventLoop
13712
14052
  * cdef object Future = asyncio.Future # <<<<<<<<<<<<<<
13713
14053
  * cdef object Task = asyncio.Task
13714
- * cdef object InvalidStateError = asyncio.InvalidStateError
14054
+ * cdef object CancelledError = asyncio.CancelledError
13715
14055
  */
13716
14056
  __Pyx_TraceLine(35,0,__PYX_ERR(0, 35, __pyx_L1_error))
13717
14057
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 35, __pyx_L1_error)
@@ -13728,8 +14068,8 @@ if (!__Pyx_RefNanny) {
13728
14068
  * cdef object AbstractEventLoop = asyncio.AbstractEventLoop
13729
14069
  * cdef object Future = asyncio.Future
13730
14070
  * cdef object Task = asyncio.Task # <<<<<<<<<<<<<<
14071
+ * cdef object CancelledError = asyncio.CancelledError
13731
14072
  * cdef object InvalidStateError = asyncio.InvalidStateError
13732
- * cdef dict[object, object] _current_tasks = asyncio.tasks._current_tasks
13733
14073
  */
13734
14074
  __Pyx_TraceLine(36,0,__PYX_ERR(0, 36, __pyx_L1_error))
13735
14075
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error)
@@ -13745,115 +14085,123 @@ if (!__Pyx_RefNanny) {
13745
14085
  /* "a_sync/_smart.pyx":37
13746
14086
  * cdef object Future = asyncio.Future
13747
14087
  * cdef object Task = asyncio.Task
13748
- * cdef object InvalidStateError = asyncio.InvalidStateError # <<<<<<<<<<<<<<
14088
+ * cdef object CancelledError = asyncio.CancelledError # <<<<<<<<<<<<<<
14089
+ * cdef object InvalidStateError = asyncio.InvalidStateError
13749
14090
  * cdef dict[object, object] _current_tasks = asyncio.tasks._current_tasks
13750
- * cdef object _future_init = asyncio.Future.__init__
13751
14091
  */
13752
14092
  __Pyx_TraceLine(37,0,__PYX_ERR(0, 37, __pyx_L1_error))
13753
14093
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 37, __pyx_L1_error)
13754
14094
  __Pyx_GOTREF(__pyx_t_2);
13755
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_InvalidStateError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 37, __pyx_L1_error)
14095
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_CancelledError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 37, __pyx_L1_error)
13756
14096
  __Pyx_GOTREF(__pyx_t_3);
13757
14097
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13758
- __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart_InvalidStateError);
13759
- __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart_InvalidStateError, __pyx_t_3);
14098
+ __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart_CancelledError);
14099
+ __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart_CancelledError, __pyx_t_3);
13760
14100
  __Pyx_GIVEREF(__pyx_t_3);
13761
14101
  __pyx_t_3 = 0;
13762
14102
 
13763
14103
  /* "a_sync/_smart.pyx":38
13764
14104
  * cdef object Task = asyncio.Task
13765
- * cdef object InvalidStateError = asyncio.InvalidStateError
13766
- * cdef dict[object, object] _current_tasks = asyncio.tasks._current_tasks # <<<<<<<<<<<<<<
14105
+ * cdef object CancelledError = asyncio.CancelledError
14106
+ * cdef object InvalidStateError = asyncio.InvalidStateError # <<<<<<<<<<<<<<
14107
+ * cdef dict[object, object] _current_tasks = asyncio.tasks._current_tasks
13767
14108
  * cdef object _future_init = asyncio.Future.__init__
13768
- * cdef object _get_loop = asyncio.futures._get_loop
13769
14109
  */
13770
14110
  __Pyx_TraceLine(38,0,__PYX_ERR(0, 38, __pyx_L1_error))
13771
14111
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error)
13772
14112
  __Pyx_GOTREF(__pyx_t_3);
13773
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_tasks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
14113
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_InvalidStateError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 38, __pyx_L1_error)
13774
14114
  __Pyx_GOTREF(__pyx_t_2);
13775
14115
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13776
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_current_tasks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error)
13777
- __Pyx_GOTREF(__pyx_t_3);
13778
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13779
- if (!(likely(PyDict_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_3))) __PYX_ERR(0, 38, __pyx_L1_error)
13780
- __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart__current_tasks);
13781
- __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart__current_tasks, ((PyObject*)__pyx_t_3));
13782
- __Pyx_GIVEREF(__pyx_t_3);
13783
- __pyx_t_3 = 0;
14116
+ __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart_InvalidStateError);
14117
+ __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart_InvalidStateError, __pyx_t_2);
14118
+ __Pyx_GIVEREF(__pyx_t_2);
14119
+ __pyx_t_2 = 0;
13784
14120
 
13785
14121
  /* "a_sync/_smart.pyx":39
14122
+ * cdef object CancelledError = asyncio.CancelledError
13786
14123
  * cdef object InvalidStateError = asyncio.InvalidStateError
13787
- * cdef dict[object, object] _current_tasks = asyncio.tasks._current_tasks
13788
- * cdef object _future_init = asyncio.Future.__init__ # <<<<<<<<<<<<<<
14124
+ * cdef dict[object, object] _current_tasks = asyncio.tasks._current_tasks # <<<<<<<<<<<<<<
14125
+ * cdef object _future_init = asyncio.Future.__init__
13789
14126
  * cdef object _get_loop = asyncio.futures._get_loop
13790
- * cdef object _task_init = asyncio.Task.__init__
13791
14127
  */
13792
14128
  __Pyx_TraceLine(39,0,__PYX_ERR(0, 39, __pyx_L1_error))
13793
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 39, __pyx_L1_error)
13794
- __Pyx_GOTREF(__pyx_t_3);
13795
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Future); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
14129
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
13796
14130
  __Pyx_GOTREF(__pyx_t_2);
13797
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13798
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 39, __pyx_L1_error)
14131
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_tasks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 39, __pyx_L1_error)
13799
14132
  __Pyx_GOTREF(__pyx_t_3);
13800
14133
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13801
- __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart__future_init);
13802
- __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart__future_init, __pyx_t_3);
13803
- __Pyx_GIVEREF(__pyx_t_3);
13804
- __pyx_t_3 = 0;
14134
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_current_tasks); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
14135
+ __Pyx_GOTREF(__pyx_t_2);
14136
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14137
+ if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_t_2))) __PYX_ERR(0, 39, __pyx_L1_error)
14138
+ __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart__current_tasks);
14139
+ __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart__current_tasks, ((PyObject*)__pyx_t_2));
14140
+ __Pyx_GIVEREF(__pyx_t_2);
14141
+ __pyx_t_2 = 0;
13805
14142
 
13806
14143
  /* "a_sync/_smart.pyx":40
14144
+ * cdef object InvalidStateError = asyncio.InvalidStateError
13807
14145
  * cdef dict[object, object] _current_tasks = asyncio.tasks._current_tasks
13808
- * cdef object _future_init = asyncio.Future.__init__
13809
- * cdef object _get_loop = asyncio.futures._get_loop # <<<<<<<<<<<<<<
14146
+ * cdef object _future_init = asyncio.Future.__init__ # <<<<<<<<<<<<<<
14147
+ * cdef object _get_loop = asyncio.futures._get_loop
13810
14148
  * cdef object _task_init = asyncio.Task.__init__
13811
- * del asyncio
13812
14149
  */
13813
14150
  __Pyx_TraceLine(40,0,__PYX_ERR(0, 40, __pyx_L1_error))
13814
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 40, __pyx_L1_error)
13815
- __Pyx_GOTREF(__pyx_t_3);
13816
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_futures); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
14151
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
13817
14152
  __Pyx_GOTREF(__pyx_t_2);
13818
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13819
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_get_loop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 40, __pyx_L1_error)
14153
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Future); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 40, __pyx_L1_error)
13820
14154
  __Pyx_GOTREF(__pyx_t_3);
13821
14155
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13822
- __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart__get_loop);
13823
- __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart__get_loop, __pyx_t_3);
13824
- __Pyx_GIVEREF(__pyx_t_3);
13825
- __pyx_t_3 = 0;
14156
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
14157
+ __Pyx_GOTREF(__pyx_t_2);
14158
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14159
+ __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart__future_init);
14160
+ __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart__future_init, __pyx_t_2);
14161
+ __Pyx_GIVEREF(__pyx_t_2);
14162
+ __pyx_t_2 = 0;
13826
14163
 
13827
14164
  /* "a_sync/_smart.pyx":41
14165
+ * cdef dict[object, object] _current_tasks = asyncio.tasks._current_tasks
13828
14166
  * cdef object _future_init = asyncio.Future.__init__
13829
- * cdef object _get_loop = asyncio.futures._get_loop
13830
- * cdef object _task_init = asyncio.Task.__init__ # <<<<<<<<<<<<<<
13831
- * del asyncio
14167
+ * cdef object _get_loop = asyncio.futures._get_loop # <<<<<<<<<<<<<<
14168
+ * cdef object _task_init = asyncio.Task.__init__
13832
14169
  *
13833
14170
  */
13834
14171
  __Pyx_TraceLine(41,0,__PYX_ERR(0, 41, __pyx_L1_error))
13835
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
13836
- __Pyx_GOTREF(__pyx_t_3);
13837
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Task); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
14172
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
13838
14173
  __Pyx_GOTREF(__pyx_t_2);
13839
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13840
- __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
14174
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_futures); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
13841
14175
  __Pyx_GOTREF(__pyx_t_3);
13842
14176
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
13843
- __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart__task_init);
13844
- __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart__task_init, __pyx_t_3);
13845
- __Pyx_GIVEREF(__pyx_t_3);
13846
- __pyx_t_3 = 0;
14177
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_get_loop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
14178
+ __Pyx_GOTREF(__pyx_t_2);
14179
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14180
+ __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart__get_loop);
14181
+ __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart__get_loop, __pyx_t_2);
14182
+ __Pyx_GIVEREF(__pyx_t_2);
14183
+ __pyx_t_2 = 0;
13847
14184
 
13848
14185
  /* "a_sync/_smart.pyx":42
14186
+ * cdef object _future_init = asyncio.Future.__init__
13849
14187
  * cdef object _get_loop = asyncio.futures._get_loop
13850
- * cdef object _task_init = asyncio.Task.__init__
13851
- * del asyncio # <<<<<<<<<<<<<<
14188
+ * cdef object _task_init = asyncio.Task.__init__ # <<<<<<<<<<<<<<
13852
14189
  *
13853
14190
  * # cdef logging
13854
14191
  */
13855
14192
  __Pyx_TraceLine(42,0,__PYX_ERR(0, 42, __pyx_L1_error))
13856
- if (__Pyx_PyObject_DelAttrStr(__pyx_m, __pyx_n_s_asyncio) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
14193
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_asyncio); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
14194
+ __Pyx_GOTREF(__pyx_t_2);
14195
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Task); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error)
14196
+ __Pyx_GOTREF(__pyx_t_3);
14197
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14198
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
14199
+ __Pyx_GOTREF(__pyx_t_2);
14200
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14201
+ __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart__task_init);
14202
+ __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart__task_init, __pyx_t_2);
14203
+ __Pyx_GIVEREF(__pyx_t_2);
14204
+ __pyx_t_2 = 0;
13857
14205
 
13858
14206
  /* "a_sync/_smart.pyx":45
13859
14207
  *
@@ -13863,14 +14211,14 @@ if (!__Pyx_RefNanny) {
13863
14211
  * cdef bint _DEBUG_LOGS_ENABLED = logger.isEnabledFor(DEBUG)
13864
14212
  */
13865
14213
  __Pyx_TraceLine(45,0,__PYX_ERR(0, 45, __pyx_L1_error))
13866
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error)
13867
- __Pyx_GOTREF(__pyx_t_3);
13868
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
14214
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
13869
14215
  __Pyx_GOTREF(__pyx_t_2);
13870
- __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 45, __pyx_L1_error)
14216
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error)
14217
+ __Pyx_GOTREF(__pyx_t_3);
14218
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 45, __pyx_L1_error)
13871
14219
  __Pyx_GOTREF(__pyx_t_5);
13872
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13873
14220
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14221
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13874
14222
  __Pyx_XGOTREF(logger);
13875
14223
  __Pyx_DECREF_SET(logger, __pyx_t_5);
13876
14224
  __Pyx_GIVEREF(__pyx_t_5);
@@ -13899,11 +14247,11 @@ if (!__Pyx_RefNanny) {
13899
14247
  __Pyx_TraceLine(47,0,__PYX_ERR(0, 47, __pyx_L1_error))
13900
14248
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(logger, __pyx_n_s_isEnabledFor); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 47, __pyx_L1_error)
13901
14249
  __Pyx_GOTREF(__pyx_t_5);
13902
- __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_6a_sync_6_smart_DEBUG); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
13903
- __Pyx_GOTREF(__pyx_t_2);
14250
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_6a_sync_6_smart_DEBUG); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 47, __pyx_L1_error)
14251
+ __Pyx_GOTREF(__pyx_t_3);
13904
14252
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13905
- __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L1_error)
13906
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14253
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 47, __pyx_L1_error)
14254
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13907
14255
  __pyx_v_6a_sync_6_smart__DEBUG_LOGS_ENABLED = __pyx_t_4;
13908
14256
 
13909
14257
  /* "a_sync/_smart.pyx":48
@@ -13914,12 +14262,12 @@ if (!__Pyx_RefNanny) {
13914
14262
  *
13915
14263
  */
13916
14264
  __Pyx_TraceLine(48,0,__PYX_ERR(0, 48, __pyx_L1_error))
13917
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(logger, __pyx_n_s_log); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
13918
- __Pyx_GOTREF(__pyx_t_2);
14265
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(logger, __pyx_n_s_log); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 48, __pyx_L1_error)
14266
+ __Pyx_GOTREF(__pyx_t_3);
13919
14267
  __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart__logger_log);
13920
- __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart__logger_log, __pyx_t_2);
13921
- __Pyx_GIVEREF(__pyx_t_2);
13922
- __pyx_t_2 = 0;
14268
+ __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart__logger_log, __pyx_t_3);
14269
+ __Pyx_GIVEREF(__pyx_t_3);
14270
+ __pyx_t_3 = 0;
13923
14271
 
13924
14272
  /* "a_sync/_smart.pyx":49
13925
14273
  * cdef bint _DEBUG_LOGS_ENABLED = logger.isEnabledFor(DEBUG)
@@ -13939,11 +14287,11 @@ if (!__Pyx_RefNanny) {
13939
14287
  * cdef object Tuple = typing.Tuple
13940
14288
  */
13941
14289
  __Pyx_TraceLine(52,0,__PYX_ERR(0, 52, __pyx_L1_error))
13942
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_typing); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
13943
- __Pyx_GOTREF(__pyx_t_2);
13944
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Any); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 52, __pyx_L1_error)
14290
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_typing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L1_error)
14291
+ __Pyx_GOTREF(__pyx_t_3);
14292
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Any); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 52, __pyx_L1_error)
13945
14293
  __Pyx_GOTREF(__pyx_t_5);
13946
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14294
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13947
14295
  __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart_Any);
13948
14296
  __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart_Any, __pyx_t_5);
13949
14297
  __Pyx_GIVEREF(__pyx_t_5);
@@ -13959,13 +14307,13 @@ if (!__Pyx_RefNanny) {
13959
14307
  __Pyx_TraceLine(53,0,__PYX_ERR(0, 53, __pyx_L1_error))
13960
14308
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_typing); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 53, __pyx_L1_error)
13961
14309
  __Pyx_GOTREF(__pyx_t_5);
13962
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Generic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)
13963
- __Pyx_GOTREF(__pyx_t_2);
14310
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Generic); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 53, __pyx_L1_error)
14311
+ __Pyx_GOTREF(__pyx_t_3);
13964
14312
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
13965
14313
  __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart_Generic);
13966
- __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart_Generic, __pyx_t_2);
13967
- __Pyx_GIVEREF(__pyx_t_2);
13968
- __pyx_t_2 = 0;
14314
+ __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart_Generic, __pyx_t_3);
14315
+ __Pyx_GIVEREF(__pyx_t_3);
14316
+ __pyx_t_3 = 0;
13969
14317
 
13970
14318
  /* "a_sync/_smart.pyx":54
13971
14319
  * cdef object Any = typing.Any
@@ -13975,11 +14323,11 @@ if (!__Pyx_RefNanny) {
13975
14323
  * del typing
13976
14324
  */
13977
14325
  __Pyx_TraceLine(54,0,__PYX_ERR(0, 54, __pyx_L1_error))
13978
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_typing); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error)
13979
- __Pyx_GOTREF(__pyx_t_2);
13980
- __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 54, __pyx_L1_error)
14326
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_typing); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 54, __pyx_L1_error)
14327
+ __Pyx_GOTREF(__pyx_t_3);
14328
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_Tuple); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 54, __pyx_L1_error)
13981
14329
  __Pyx_GOTREF(__pyx_t_5);
13982
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14330
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
13983
14331
  __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart_Tuple);
13984
14332
  __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart_Tuple, __pyx_t_5);
13985
14333
  __Pyx_GIVEREF(__pyx_t_5);
@@ -13995,13 +14343,13 @@ if (!__Pyx_RefNanny) {
13995
14343
  __Pyx_TraceLine(55,0,__PYX_ERR(0, 55, __pyx_L1_error))
13996
14344
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_typing); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 55, __pyx_L1_error)
13997
14345
  __Pyx_GOTREF(__pyx_t_5);
13998
- __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Union); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 55, __pyx_L1_error)
13999
- __Pyx_GOTREF(__pyx_t_2);
14346
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_Union); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error)
14347
+ __Pyx_GOTREF(__pyx_t_3);
14000
14348
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14001
14349
  __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart_Union);
14002
- __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart_Union, __pyx_t_2);
14003
- __Pyx_GIVEREF(__pyx_t_2);
14004
- __pyx_t_2 = 0;
14350
+ __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart_Union, __pyx_t_3);
14351
+ __Pyx_GIVEREF(__pyx_t_3);
14352
+ __pyx_t_3 = 0;
14005
14353
 
14006
14354
  /* "a_sync/_smart.pyx":56
14007
14355
  * cdef object Tuple = typing.Tuple
@@ -14021,12 +14369,12 @@ if (!__Pyx_RefNanny) {
14021
14369
  * _Key = Tuple[Args, Kwargs]
14022
14370
  */
14023
14371
  __Pyx_TraceLine(59,0,__PYX_ERR(0, 59, __pyx_L1_error))
14024
- __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_6a_sync_6_smart_Tuple, __pyx_v_6a_sync_6_smart_Any); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 59, __pyx_L1_error)
14025
- __Pyx_GOTREF(__pyx_t_2);
14372
+ __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_6a_sync_6_smart_Tuple, __pyx_v_6a_sync_6_smart_Any); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 59, __pyx_L1_error)
14373
+ __Pyx_GOTREF(__pyx_t_3);
14026
14374
  __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart_Args);
14027
- __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart_Args, __pyx_t_2);
14028
- __Pyx_GIVEREF(__pyx_t_2);
14029
- __pyx_t_2 = 0;
14375
+ __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart_Args, __pyx_t_3);
14376
+ __Pyx_GIVEREF(__pyx_t_3);
14377
+ __pyx_t_3 = 0;
14030
14378
 
14031
14379
  /* "a_sync/_smart.pyx":60
14032
14380
  *
@@ -14036,24 +14384,24 @@ if (!__Pyx_RefNanny) {
14036
14384
  * cdef object Key = _Key
14037
14385
  */
14038
14386
  __Pyx_TraceLine(60,0,__PYX_ERR(0, 60, __pyx_L1_error))
14039
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
14040
- __Pyx_GOTREF(__pyx_t_2);
14387
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error)
14388
+ __Pyx_GOTREF(__pyx_t_3);
14041
14389
  __Pyx_INCREF((PyObject *)(&PyUnicode_Type));
14042
14390
  __Pyx_GIVEREF((PyObject *)(&PyUnicode_Type));
14043
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 60, __pyx_L1_error);
14391
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)(&PyUnicode_Type)))) __PYX_ERR(0, 60, __pyx_L1_error);
14044
14392
  __Pyx_INCREF(__pyx_v_6a_sync_6_smart_Any);
14045
14393
  __Pyx_GIVEREF(__pyx_v_6a_sync_6_smart_Any);
14046
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_6a_sync_6_smart_Any)) __PYX_ERR(0, 60, __pyx_L1_error);
14047
- __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_6a_sync_6_smart_Tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error)
14394
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_6a_sync_6_smart_Any)) __PYX_ERR(0, 60, __pyx_L1_error);
14395
+ __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_6a_sync_6_smart_Tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error)
14048
14396
  __Pyx_GOTREF(__pyx_t_5);
14049
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14050
- __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_6a_sync_6_smart_Tuple, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 60, __pyx_L1_error)
14051
- __Pyx_GOTREF(__pyx_t_2);
14397
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14398
+ __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_6a_sync_6_smart_Tuple, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error)
14399
+ __Pyx_GOTREF(__pyx_t_3);
14052
14400
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14053
14401
  __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart_Kwargs);
14054
- __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart_Kwargs, __pyx_t_2);
14055
- __Pyx_GIVEREF(__pyx_t_2);
14056
- __pyx_t_2 = 0;
14402
+ __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart_Kwargs, __pyx_t_3);
14403
+ __Pyx_GIVEREF(__pyx_t_3);
14404
+ __pyx_t_3 = 0;
14057
14405
 
14058
14406
  /* "a_sync/_smart.pyx":61
14059
14407
  * cdef object Args = Tuple[Any]
@@ -14063,17 +14411,17 @@ if (!__Pyx_RefNanny) {
14063
14411
  *
14064
14412
  */
14065
14413
  __Pyx_TraceLine(61,0,__PYX_ERR(0, 61, __pyx_L1_error))
14066
- __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error)
14067
- __Pyx_GOTREF(__pyx_t_2);
14414
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error)
14415
+ __Pyx_GOTREF(__pyx_t_3);
14068
14416
  __Pyx_INCREF(__pyx_v_6a_sync_6_smart_Args);
14069
14417
  __Pyx_GIVEREF(__pyx_v_6a_sync_6_smart_Args);
14070
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_6a_sync_6_smart_Args)) __PYX_ERR(0, 61, __pyx_L1_error);
14418
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_6a_sync_6_smart_Args)) __PYX_ERR(0, 61, __pyx_L1_error);
14071
14419
  __Pyx_INCREF(__pyx_v_6a_sync_6_smart_Kwargs);
14072
14420
  __Pyx_GIVEREF(__pyx_v_6a_sync_6_smart_Kwargs);
14073
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_6a_sync_6_smart_Kwargs)) __PYX_ERR(0, 61, __pyx_L1_error);
14074
- __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_6a_sync_6_smart_Tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error)
14421
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_6a_sync_6_smart_Kwargs)) __PYX_ERR(0, 61, __pyx_L1_error);
14422
+ __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_v_6a_sync_6_smart_Tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 61, __pyx_L1_error)
14075
14423
  __Pyx_GOTREF(__pyx_t_5);
14076
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14424
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14077
14425
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_Key, __pyx_t_5) < 0) __PYX_ERR(0, 61, __pyx_L1_error)
14078
14426
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14079
14427
 
@@ -14185,24 +14533,24 @@ if (!__Pyx_RefNanny) {
14185
14533
  __Pyx_TraceLine(219,0,__PYX_ERR(0, 219, __pyx_L1_error))
14186
14534
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_T); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 219, __pyx_L1_error)
14187
14535
  __Pyx_GOTREF(__pyx_t_5);
14188
- __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_6a_sync_6_smart_Generic, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error)
14189
- __Pyx_GOTREF(__pyx_t_2);
14536
+ __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_6a_sync_6_smart_Generic, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error)
14537
+ __Pyx_GOTREF(__pyx_t_3);
14190
14538
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14191
14539
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 219, __pyx_L1_error)
14192
14540
  __Pyx_GOTREF(__pyx_t_5);
14193
14541
  __Pyx_INCREF(__pyx_v_6a_sync_6_smart_Future);
14194
14542
  __Pyx_GIVEREF(__pyx_v_6a_sync_6_smart_Future);
14195
14543
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_6a_sync_6_smart_Future)) __PYX_ERR(0, 219, __pyx_L1_error);
14196
- __Pyx_GIVEREF(__pyx_t_2);
14197
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error);
14198
- __pyx_t_2 = 0;
14199
- __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error)
14200
- __Pyx_GOTREF(__pyx_t_2);
14201
- __pyx_t_3 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error)
14544
+ __Pyx_GIVEREF(__pyx_t_3);
14545
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error);
14546
+ __pyx_t_3 = 0;
14547
+ __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 219, __pyx_L1_error)
14202
14548
  __Pyx_GOTREF(__pyx_t_3);
14203
- __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_3, __pyx_t_2, __pyx_n_s_SmartFuture, __pyx_n_s_SmartFuture, (PyObject *) NULL, __pyx_n_s_a_sync__smart, __pyx_kp_s_A_smart_future_that_tracks_wait); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 219, __pyx_L1_error)
14549
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error)
14550
+ __Pyx_GOTREF(__pyx_t_2);
14551
+ __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_SmartFuture, __pyx_n_s_SmartFuture, (PyObject *) NULL, __pyx_n_s_a_sync__smart, __pyx_kp_s_A_smart_future_that_tracks_wait); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 219, __pyx_L1_error)
14204
14552
  __Pyx_GOTREF(__pyx_t_6);
14205
- if (__pyx_t_2 != __pyx_t_5) {
14553
+ if (__pyx_t_3 != __pyx_t_5) {
14206
14554
  if (unlikely((PyDict_SetItemString(__pyx_t_6, "__orig_bases__", __pyx_t_5) < 0))) __PYX_ERR(0, 219, __pyx_L1_error)
14207
14555
  }
14208
14556
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
@@ -14370,7 +14718,7 @@ if (!__Pyx_RefNanny) {
14370
14718
  __Pyx_GOTREF(__pyx_t_8);
14371
14719
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_waiter, __pyx_kp_s_SmartTask) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
14372
14720
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_return, __pyx_n_s_None) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
14373
- __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_11SmartFuture_10_waiter_done_cleanup_callback, 0, __pyx_n_s_SmartFuture__waiter_done_cleanup, NULL, __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 348, __pyx_L1_error)
14721
+ __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_11SmartFuture_10_waiter_done_cleanup_callback, 0, __pyx_n_s_SmartFuture__waiter_done_cleanup, NULL, __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 348, __pyx_L1_error)
14374
14722
  __Pyx_GOTREF(__pyx_t_7);
14375
14723
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_7, __pyx_t_8);
14376
14724
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
@@ -14385,13 +14733,13 @@ if (!__Pyx_RefNanny) {
14385
14733
  * A smart future that tracks waiters and integrates with a smart processing queue.
14386
14734
  */
14387
14735
  __Pyx_TraceLine(219,0,__PYX_ERR(0, 219, __pyx_L1_error))
14388
- __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_3, __pyx_n_s_SmartFuture, __pyx_t_2, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 219, __pyx_L1_error)
14736
+ __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SmartFuture, __pyx_t_3, __pyx_t_6, NULL, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 219, __pyx_L1_error)
14389
14737
  __Pyx_GOTREF(__pyx_t_7);
14390
14738
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_SmartFuture, __pyx_t_7) < 0) __PYX_ERR(0, 219, __pyx_L1_error)
14391
14739
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14392
14740
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14393
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14394
14741
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14742
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14395
14743
 
14396
14744
  /* "a_sync/_smart.pyx":365
14397
14745
  *
@@ -14401,12 +14749,12 @@ if (!__Pyx_RefNanny) {
14401
14749
  *
14402
14750
  */
14403
14751
  __Pyx_TraceLine(365,0,__PYX_ERR(0, 365, __pyx_L1_error))
14404
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SmartFuture); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 365, __pyx_L1_error)
14405
- __Pyx_GOTREF(__pyx_t_2);
14752
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SmartFuture); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 365, __pyx_L1_error)
14753
+ __Pyx_GOTREF(__pyx_t_3);
14406
14754
  __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart__SmartFuture);
14407
- __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart__SmartFuture, __pyx_t_2);
14408
- __Pyx_GIVEREF(__pyx_t_2);
14409
- __pyx_t_2 = 0;
14755
+ __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart__SmartFuture, __pyx_t_3);
14756
+ __Pyx_GIVEREF(__pyx_t_3);
14757
+ __pyx_t_3 = 0;
14410
14758
 
14411
14759
  /* "a_sync/_smart.pyx":374
14412
14760
  *
@@ -14415,18 +14763,18 @@ if (!__Pyx_RefNanny) {
14415
14763
  * queue: Optional["SmartProcessingQueue"] = None,
14416
14764
  * key: Optional[Key] = None,
14417
14765
  */
14418
- __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error)
14419
- __Pyx_GOTREF(__pyx_t_2);
14420
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_queue, __pyx_kp_s_Optional_SmartProcessingQueue) < 0) __PYX_ERR(0, 374, __pyx_L1_error)
14421
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_key, __pyx_kp_s_Optional_Key) < 0) __PYX_ERR(0, 374, __pyx_L1_error)
14422
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_loop, __pyx_kp_s_Optional_AbstractEventLoop) < 0) __PYX_ERR(0, 374, __pyx_L1_error)
14423
- __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_1create_future, 0, __pyx_n_s_create_future, NULL, __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error)
14766
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 374, __pyx_L1_error)
14424
14767
  __Pyx_GOTREF(__pyx_t_3);
14425
- __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__36);
14426
- __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_2);
14427
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14428
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_create_future, __pyx_t_3) < 0) __PYX_ERR(0, 374, __pyx_L1_error)
14768
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_queue, __pyx_kp_s_Optional_SmartProcessingQueue) < 0) __PYX_ERR(0, 374, __pyx_L1_error)
14769
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_key, __pyx_kp_s_Optional_Key) < 0) __PYX_ERR(0, 374, __pyx_L1_error)
14770
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_loop, __pyx_kp_s_Optional_AbstractEventLoop) < 0) __PYX_ERR(0, 374, __pyx_L1_error)
14771
+ __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_1create_future, 0, __pyx_n_s_create_future, NULL, __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error)
14772
+ __Pyx_GOTREF(__pyx_t_2);
14773
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__37);
14774
+ __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_3);
14429
14775
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14776
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_create_future, __pyx_t_2) < 0) __PYX_ERR(0, 374, __pyx_L1_error)
14777
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14430
14778
 
14431
14779
  /* "a_sync/_smart.pyx":403
14432
14780
  *
@@ -14436,35 +14784,35 @@ if (!__Pyx_RefNanny) {
14436
14784
  * A smart task that tracks waiters and integrates with a smart processing queue.
14437
14785
  */
14438
14786
  __Pyx_TraceLine(403,0,__PYX_ERR(0, 403, __pyx_L1_error))
14439
- __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_T); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error)
14440
- __Pyx_GOTREF(__pyx_t_3);
14441
- __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_6a_sync_6_smart_Generic, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error)
14787
+ __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_T); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error)
14442
14788
  __Pyx_GOTREF(__pyx_t_2);
14443
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14444
- __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error)
14789
+ __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_6a_sync_6_smart_Generic, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error)
14445
14790
  __Pyx_GOTREF(__pyx_t_3);
14791
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14792
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error)
14793
+ __Pyx_GOTREF(__pyx_t_2);
14446
14794
  __Pyx_INCREF(__pyx_v_6a_sync_6_smart_Task);
14447
14795
  __Pyx_GIVEREF(__pyx_v_6a_sync_6_smart_Task);
14448
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_6a_sync_6_smart_Task)) __PYX_ERR(0, 403, __pyx_L1_error);
14449
- __Pyx_GIVEREF(__pyx_t_2);
14450
- if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error);
14451
- __pyx_t_2 = 0;
14452
- __pyx_t_2 = __Pyx_PEP560_update_bases(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error)
14453
- __Pyx_GOTREF(__pyx_t_2);
14454
- __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L1_error)
14796
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_6a_sync_6_smart_Task)) __PYX_ERR(0, 403, __pyx_L1_error);
14797
+ __Pyx_GIVEREF(__pyx_t_3);
14798
+ if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error);
14799
+ __pyx_t_3 = 0;
14800
+ __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error)
14801
+ __Pyx_GOTREF(__pyx_t_3);
14802
+ __pyx_t_6 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L1_error)
14455
14803
  __Pyx_GOTREF(__pyx_t_6);
14456
- __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_2, __pyx_n_s_SmartTask_2, __pyx_n_s_SmartTask_2, (PyObject *) NULL, __pyx_n_s_a_sync__smart, __pyx_kp_s_A_smart_task_that_tracks_waiter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 403, __pyx_L1_error)
14804
+ __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_6, __pyx_t_3, __pyx_n_s_SmartTask_2, __pyx_n_s_SmartTask_2, (PyObject *) NULL, __pyx_n_s_a_sync__smart, __pyx_kp_s_A_smart_task_that_tracks_waiter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 403, __pyx_L1_error)
14457
14805
  __Pyx_GOTREF(__pyx_t_7);
14458
- if (__pyx_t_2 != __pyx_t_3) {
14459
- if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_3) < 0))) __PYX_ERR(0, 403, __pyx_L1_error)
14806
+ if (__pyx_t_3 != __pyx_t_2) {
14807
+ if (unlikely((PyDict_SetItemString(__pyx_t_7, "__orig_bases__", __pyx_t_2) < 0))) __PYX_ERR(0, 403, __pyx_L1_error)
14460
14808
  }
14461
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14462
- __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error)
14463
- __Pyx_GOTREF(__pyx_t_3);
14464
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_waiters, __pyx_kp_s_Set_Task_T) < 0) __PYX_ERR(0, 403, __pyx_L1_error)
14465
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_traceback, __pyx_kp_s_Optional_TracebackType) < 0) __PYX_ERR(0, 403, __pyx_L1_error)
14466
- if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_annotations, __pyx_t_3) < 0) __PYX_ERR(0, 403, __pyx_L1_error)
14467
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14809
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14810
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error)
14811
+ __Pyx_GOTREF(__pyx_t_2);
14812
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_waiters, __pyx_kp_s_Set_Task_T) < 0) __PYX_ERR(0, 403, __pyx_L1_error)
14813
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_traceback, __pyx_kp_s_Optional_TracebackType) < 0) __PYX_ERR(0, 403, __pyx_L1_error)
14814
+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_annotations, __pyx_t_2) < 0) __PYX_ERR(0, 403, __pyx_L1_error)
14815
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14468
14816
 
14469
14817
  /* "a_sync/_smart.pyx":423
14470
14818
  * _waiters: Set["Task[T]"]
@@ -14483,8 +14831,8 @@ if (!__Pyx_RefNanny) {
14483
14831
  * def __init__(
14484
14832
  * self,
14485
14833
  */
14486
- __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 425, __pyx_L1_error)
14487
- __Pyx_GOTREF(__pyx_t_3);
14834
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error)
14835
+ __Pyx_GOTREF(__pyx_t_2);
14488
14836
 
14489
14837
  /* "a_sync/_smart.pyx":430
14490
14838
  * coro: Awaitable[T],
@@ -14493,7 +14841,7 @@ if (!__Pyx_RefNanny) {
14493
14841
  * name: Optional[str] = None,
14494
14842
  * ) -> None:
14495
14843
  */
14496
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_loop, Py_None) < 0) __PYX_ERR(0, 425, __pyx_L1_error)
14844
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_loop, Py_None) < 0) __PYX_ERR(0, 425, __pyx_L1_error)
14497
14845
 
14498
14846
  /* "a_sync/_smart.pyx":431
14499
14847
  * *,
@@ -14502,7 +14850,7 @@ if (!__Pyx_RefNanny) {
14502
14850
  * ) -> None:
14503
14851
  * """
14504
14852
  */
14505
- if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name_2, Py_None) < 0) __PYX_ERR(0, 425, __pyx_L1_error)
14853
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_name_2, Py_None) < 0) __PYX_ERR(0, 425, __pyx_L1_error)
14506
14854
 
14507
14855
  /* "a_sync/_smart.pyx":425
14508
14856
  * __traceback__: Optional[TracebackType] = None
@@ -14517,11 +14865,11 @@ if (!__Pyx_RefNanny) {
14517
14865
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_loop, __pyx_kp_s_Optional_AbstractEventLoop) < 0) __PYX_ERR(0, 425, __pyx_L1_error)
14518
14866
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_name_2, __pyx_kp_s_Optional_str) < 0) __PYX_ERR(0, 425, __pyx_L1_error)
14519
14867
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_return, __pyx_n_s_None) < 0) __PYX_ERR(0, 425, __pyx_L1_error)
14520
- __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_9SmartTask_1__init__, 0, __pyx_n_s_SmartTask___init, NULL, __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 425, __pyx_L1_error)
14868
+ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_9SmartTask_1__init__, 0, __pyx_n_s_SmartTask___init, NULL, __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 425, __pyx_L1_error)
14521
14869
  __Pyx_GOTREF(__pyx_t_5);
14522
- __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_5, __pyx_t_3);
14870
+ __Pyx_CyFunction_SetDefaultsKwDict(__pyx_t_5, __pyx_t_2);
14523
14871
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_8);
14524
- __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14872
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14525
14873
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14526
14874
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 425, __pyx_L1_error)
14527
14875
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
@@ -14555,13 +14903,31 @@ if (!__Pyx_RefNanny) {
14555
14903
  __Pyx_GOTREF(__pyx_t_8);
14556
14904
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_waiter, __pyx_kp_s_SmartTask) < 0) __PYX_ERR(0, 497, __pyx_L1_error)
14557
14905
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_return, __pyx_n_s_None) < 0) __PYX_ERR(0, 497, __pyx_L1_error)
14558
- __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_9SmartTask_6_waiter_done_cleanup_callback, 0, __pyx_n_s_SmartTask__waiter_done_cleanup_c, NULL, __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 497, __pyx_L1_error)
14906
+ __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_9SmartTask_6_waiter_done_cleanup_callback, 0, __pyx_n_s_SmartTask__waiter_done_cleanup_c, NULL, __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 497, __pyx_L1_error)
14559
14907
  __Pyx_GOTREF(__pyx_t_5);
14560
14908
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_8);
14561
14909
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14562
14910
  if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_waiter_done_cleanup_callback, __pyx_t_5) < 0) __PYX_ERR(0, 497, __pyx_L1_error)
14563
14911
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14564
14912
 
14913
+ /* "a_sync/_smart.pyx":513
14914
+ * (<set>self._waiters).remove(waiter)
14915
+ *
14916
+ * def _make_cancelled_error(self) -> asyncio.CancelledError: # <<<<<<<<<<<<<<
14917
+ * # this function is not present in python3.8 so we're backporting it
14918
+ * """Create the CancelledError to raise if the Future is cancelled.
14919
+ */
14920
+ __Pyx_TraceLine(513,0,__PYX_ERR(0, 513, __pyx_L1_error))
14921
+ __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 513, __pyx_L1_error)
14922
+ __Pyx_GOTREF(__pyx_t_5);
14923
+ if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_return, __pyx_kp_s_asyncio_CancelledError) < 0) __PYX_ERR(0, 513, __pyx_L1_error)
14924
+ __pyx_t_8 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_9SmartTask_8_make_cancelled_error, 0, __pyx_n_s_SmartTask__make_cancelled_error, NULL, __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 513, __pyx_L1_error)
14925
+ __Pyx_GOTREF(__pyx_t_8);
14926
+ __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_8, __pyx_t_5);
14927
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14928
+ if (__Pyx_SetNameInClass(__pyx_t_7, __pyx_n_s_make_cancelled_error, __pyx_t_8) < 0) __PYX_ERR(0, 513, __pyx_L1_error)
14929
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14930
+
14565
14931
  /* "a_sync/_smart.pyx":403
14566
14932
  *
14567
14933
  *
@@ -14570,125 +14936,125 @@ if (!__Pyx_RefNanny) {
14570
14936
  * A smart task that tracks waiters and integrates with a smart processing queue.
14571
14937
  */
14572
14938
  __Pyx_TraceLine(403,0,__PYX_ERR(0, 403, __pyx_L1_error))
14573
- __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_SmartTask_2, __pyx_t_2, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 403, __pyx_L1_error)
14574
- __Pyx_GOTREF(__pyx_t_5);
14575
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_SmartTask_2, __pyx_t_5) < 0) __PYX_ERR(0, 403, __pyx_L1_error)
14576
- __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
14939
+ __pyx_t_8 = __Pyx_Py3ClassCreate(__pyx_t_6, __pyx_n_s_SmartTask_2, __pyx_t_3, __pyx_t_7, NULL, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 403, __pyx_L1_error)
14940
+ __Pyx_GOTREF(__pyx_t_8);
14941
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SmartTask_2, __pyx_t_8) < 0) __PYX_ERR(0, 403, __pyx_L1_error)
14942
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
14577
14943
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
14578
14944
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14579
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14945
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14580
14946
 
14581
- /* "a_sync/_smart.pyx":514
14947
+ /* "a_sync/_smart.pyx":530
14582
14948
  *
14583
14949
  *
14584
14950
  * cdef object _SmartTask = SmartTask # <<<<<<<<<<<<<<
14585
14951
  *
14586
14952
  *
14587
14953
  */
14588
- __Pyx_TraceLine(514,0,__PYX_ERR(0, 514, __pyx_L1_error))
14589
- __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_SmartTask_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 514, __pyx_L1_error)
14590
- __Pyx_GOTREF(__pyx_t_2);
14954
+ __Pyx_TraceLine(530,0,__PYX_ERR(0, 530, __pyx_L1_error))
14955
+ __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_SmartTask_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error)
14956
+ __Pyx_GOTREF(__pyx_t_3);
14591
14957
  __Pyx_XGOTREF(__pyx_v_6a_sync_6_smart__SmartTask);
14592
- __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart__SmartTask, __pyx_t_2);
14593
- __Pyx_GIVEREF(__pyx_t_2);
14594
- __pyx_t_2 = 0;
14958
+ __Pyx_DECREF_SET(__pyx_v_6a_sync_6_smart__SmartTask, __pyx_t_3);
14959
+ __Pyx_GIVEREF(__pyx_t_3);
14960
+ __pyx_t_3 = 0;
14595
14961
 
14596
- /* "a_sync/_smart.pyx":518
14962
+ /* "a_sync/_smart.pyx":534
14597
14963
  *
14598
14964
  * @cython.linetrace(False)
14599
14965
  * cpdef object smart_task_factory(loop: AbstractEventLoop, coro: Awaitable[T]): # <<<<<<<<<<<<<<
14600
14966
  * """
14601
14967
  * Task factory function that an event loop calls to create new tasks.
14602
14968
  */
14603
- __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error)
14604
- __Pyx_GOTREF(__pyx_t_2);
14605
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_loop, __pyx_n_s_AbstractEventLoop) < 0) __PYX_ERR(0, 518, __pyx_L1_error)
14606
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_coro, __pyx_kp_s_Awaitable_T) < 0) __PYX_ERR(0, 518, __pyx_L1_error)
14607
- __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_3smart_task_factory, 0, __pyx_n_s_smart_task_factory, NULL, __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 518, __pyx_L1_error)
14969
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 534, __pyx_L1_error)
14970
+ __Pyx_GOTREF(__pyx_t_3);
14971
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_loop, __pyx_n_s_AbstractEventLoop) < 0) __PYX_ERR(0, 534, __pyx_L1_error)
14972
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_coro, __pyx_kp_s_Awaitable_T) < 0) __PYX_ERR(0, 534, __pyx_L1_error)
14973
+ __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_3smart_task_factory, 0, __pyx_n_s_smart_task_factory, NULL, __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 534, __pyx_L1_error)
14608
14974
  __Pyx_GOTREF(__pyx_t_6);
14609
- __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2);
14610
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14611
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_smart_task_factory, __pyx_t_6) < 0) __PYX_ERR(0, 518, __pyx_L1_error)
14975
+ __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_3);
14976
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14977
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_smart_task_factory, __pyx_t_6) < 0) __PYX_ERR(0, 534, __pyx_L1_error)
14612
14978
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14613
14979
 
14614
- /* "a_sync/_smart.pyx":546
14980
+ /* "a_sync/_smart.pyx":562
14615
14981
  *
14616
14982
  *
14617
14983
  * def set_smart_task_factory(loop: AbstractEventLoop = None) -> None: # <<<<<<<<<<<<<<
14618
14984
  * """
14619
14985
  * Set the event loop's task factory to :func:`~smart_task_factory` so all tasks will be SmartTask instances.
14620
14986
  */
14621
- __Pyx_TraceLine(546,0,__PYX_ERR(0, 546, __pyx_L1_error))
14622
- __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 546, __pyx_L1_error)
14987
+ __Pyx_TraceLine(562,0,__PYX_ERR(0, 562, __pyx_L1_error))
14988
+ __pyx_t_6 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 562, __pyx_L1_error)
14623
14989
  __Pyx_GOTREF(__pyx_t_6);
14624
- if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_loop, __pyx_n_s_AbstractEventLoop) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
14625
- if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_n_s_None) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
14626
- __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_5set_smart_task_factory, 0, __pyx_n_s_set_smart_task_factory, NULL, __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__18)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
14627
- __Pyx_GOTREF(__pyx_t_2);
14628
- __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__44);
14629
- __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_6);
14990
+ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_loop, __pyx_n_s_AbstractEventLoop) < 0) __PYX_ERR(0, 562, __pyx_L1_error)
14991
+ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_n_s_None) < 0) __PYX_ERR(0, 562, __pyx_L1_error)
14992
+ __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_5set_smart_task_factory, 0, __pyx_n_s_set_smart_task_factory, NULL, __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
14993
+ __Pyx_GOTREF(__pyx_t_3);
14994
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_tuple__46);
14995
+ __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_6);
14630
14996
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14631
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_smart_task_factory, __pyx_t_2) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
14632
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14997
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_set_smart_task_factory, __pyx_t_3) < 0) __PYX_ERR(0, 562, __pyx_L1_error)
14998
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
14633
14999
 
14634
- /* "a_sync/_smart.pyx":569
15000
+ /* "a_sync/_smart.pyx":585
14635
15001
  *
14636
15002
  *
14637
15003
  * cpdef object shield(arg: Awaitable[T]): # <<<<<<<<<<<<<<
14638
15004
  * """
14639
15005
  * Wait for a future, shielding it from cancellation.
14640
15006
  */
14641
- __Pyx_TraceLine(569,0,__PYX_ERR(0, 569, __pyx_L1_error))
15007
+ __Pyx_TraceLine(585,0,__PYX_ERR(0, 585, __pyx_L1_error))
14642
15008
 
14643
- __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 569, __pyx_L1_error)
14644
- __Pyx_GOTREF(__pyx_t_2);
14645
- if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_arg, __pyx_kp_s_Awaitable_T) < 0) __PYX_ERR(0, 569, __pyx_L1_error)
14646
- __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_7shield, 0, __pyx_n_s_shield, NULL, __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 569, __pyx_L1_error)
15009
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 585, __pyx_L1_error)
15010
+ __Pyx_GOTREF(__pyx_t_3);
15011
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_arg, __pyx_kp_s_Awaitable_T) < 0) __PYX_ERR(0, 585, __pyx_L1_error)
15012
+ __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_6a_sync_6_smart_7shield, 0, __pyx_n_s_shield, NULL, __pyx_n_s_a_sync__smart, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 585, __pyx_L1_error)
14647
15013
  __Pyx_GOTREF(__pyx_t_6);
14648
- __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_2);
14649
- __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
14650
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_shield, __pyx_t_6) < 0) __PYX_ERR(0, 569, __pyx_L1_error)
15014
+ __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_3);
15015
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
15016
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_shield, __pyx_t_6) < 0) __PYX_ERR(0, 585, __pyx_L1_error)
14651
15017
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14652
15018
 
14653
- /* "a_sync/_smart.pyx":632
15019
+ /* "a_sync/_smart.pyx":648
14654
15020
  *
14655
15021
  *
14656
15022
  * cdef tuple _get_done_callbacks(inner: Task, outer: Future): # <<<<<<<<<<<<<<
14657
15023
  *
14658
15024
  * def _inner_done_callback(inner):
14659
15025
  */
14660
- __Pyx_TraceLine(632,0,__PYX_ERR(0, 632, __pyx_L1_error))
15026
+ __Pyx_TraceLine(648,0,__PYX_ERR(0, 648, __pyx_L1_error))
14661
15027
 
14662
15028
 
14663
- /* "a_sync/_smart.pyx":657
15029
+ /* "a_sync/_smart.pyx":673
14664
15030
  *
14665
15031
  *
14666
15032
  * __all__ = [ # <<<<<<<<<<<<<<
14667
15033
  * "create_future",
14668
15034
  * "shield",
14669
15035
  */
14670
- __Pyx_TraceLine(657,0,__PYX_ERR(0, 657, __pyx_L1_error))
14671
- __pyx_t_6 = PyList_New(6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 657, __pyx_L1_error)
15036
+ __Pyx_TraceLine(673,0,__PYX_ERR(0, 673, __pyx_L1_error))
15037
+ __pyx_t_6 = PyList_New(6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 673, __pyx_L1_error)
14672
15038
  __Pyx_GOTREF(__pyx_t_6);
14673
15039
  __Pyx_INCREF(__pyx_n_u_create_future);
14674
15040
  __Pyx_GIVEREF(__pyx_n_u_create_future);
14675
- if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_u_create_future)) __PYX_ERR(0, 657, __pyx_L1_error);
15041
+ if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_u_create_future)) __PYX_ERR(0, 673, __pyx_L1_error);
14676
15042
  __Pyx_INCREF(__pyx_n_u_shield);
14677
15043
  __Pyx_GIVEREF(__pyx_n_u_shield);
14678
- if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_u_shield)) __PYX_ERR(0, 657, __pyx_L1_error);
15044
+ if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_u_shield)) __PYX_ERR(0, 673, __pyx_L1_error);
14679
15045
  __Pyx_INCREF(__pyx_n_u_SmartFuture);
14680
15046
  __Pyx_GIVEREF(__pyx_n_u_SmartFuture);
14681
- if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_n_u_SmartFuture)) __PYX_ERR(0, 657, __pyx_L1_error);
15047
+ if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_n_u_SmartFuture)) __PYX_ERR(0, 673, __pyx_L1_error);
14682
15048
  __Pyx_INCREF(__pyx_n_u_SmartTask_2);
14683
15049
  __Pyx_GIVEREF(__pyx_n_u_SmartTask_2);
14684
- if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 3, __pyx_n_u_SmartTask_2)) __PYX_ERR(0, 657, __pyx_L1_error);
15050
+ if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 3, __pyx_n_u_SmartTask_2)) __PYX_ERR(0, 673, __pyx_L1_error);
14685
15051
  __Pyx_INCREF(__pyx_n_u_smart_task_factory);
14686
15052
  __Pyx_GIVEREF(__pyx_n_u_smart_task_factory);
14687
- if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 4, __pyx_n_u_smart_task_factory)) __PYX_ERR(0, 657, __pyx_L1_error);
15053
+ if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 4, __pyx_n_u_smart_task_factory)) __PYX_ERR(0, 673, __pyx_L1_error);
14688
15054
  __Pyx_INCREF(__pyx_n_u_set_smart_task_factory);
14689
15055
  __Pyx_GIVEREF(__pyx_n_u_set_smart_task_factory);
14690
- if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 5, __pyx_n_u_set_smart_task_factory)) __PYX_ERR(0, 657, __pyx_L1_error);
14691
- if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_6) < 0) __PYX_ERR(0, 657, __pyx_L1_error)
15056
+ if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 5, __pyx_n_u_set_smart_task_factory)) __PYX_ERR(0, 673, __pyx_L1_error);
15057
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_6) < 0) __PYX_ERR(0, 673, __pyx_L1_error)
14692
15058
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
14693
15059
 
14694
15060
  /* "a_sync/_smart.pyx":1
@@ -19160,7 +19526,7 @@ static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *
19160
19526
  #endif
19161
19527
  static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
19162
19528
  #if PY_MAJOR_VERSION < 3
19163
- PyObject *module, *from_list, *star = __pyx_n_s__25;
19529
+ PyObject *module, *from_list, *star = __pyx_n_s__26;
19164
19530
  CYTHON_UNUSED_VAR(parts_tuple);
19165
19531
  from_list = PyList_New(1);
19166
19532
  if (unlikely(!from_list))
@@ -19371,7 +19737,7 @@ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
19371
19737
  if (unlikely(!module_name_str)) { goto modbad; }
19372
19738
  module_name = PyUnicode_FromString(module_name_str);
19373
19739
  if (unlikely(!module_name)) { goto modbad; }
19374
- module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__26);
19740
+ module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__27);
19375
19741
  if (unlikely(!module_dot)) { goto modbad; }
19376
19742
  full_name = PyUnicode_Concat(module_dot, name);
19377
19743
  if (unlikely(!full_name)) { goto modbad; }
@@ -20517,7 +20883,7 @@ __Pyx_PyType_GetName(PyTypeObject* tp)
20517
20883
  if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
20518
20884
  PyErr_Clear();
20519
20885
  Py_XDECREF(name);
20520
- name = __Pyx_NewRef(__pyx_n_s__46);
20886
+ name = __Pyx_NewRef(__pyx_n_s__48);
20521
20887
  }
20522
20888
  return name;
20523
20889
  }